Home | History | Annotate | Download | only in gpu
      1 
      2 /*
      3  * Copyright 2012 Google Inc.
      4  *
      5  * Use of this source code is governed by a BSD-style license that can be
      6  * found in the LICENSE file.
      7  */
      8 
      9 #ifndef GrSoftwarePathRenderer_DEFINED
     10 #define GrSoftwarePathRenderer_DEFINED
     11 
     12 #include "GrPathRenderer.h"
     13 
     14 class GrContext;
     15 
     16 /**
     17  * This class uses the software side to render a path to an SkBitmap and
     18  * then uploads the result to the gpu
     19  */
     20 class GrSoftwarePathRenderer : public GrPathRenderer {
     21 public:
     22     GrSoftwarePathRenderer(GrContext* context)
     23         : fContext(context) {
     24     }
     25 private:
     26     StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override {
     27         return GrPathRenderer::kNoSupport_StencilSupport;
     28     }
     29 
     30     bool onCanDrawPath(const CanDrawPathArgs&) const override;
     31 
     32     bool onDrawPath(const DrawPathArgs&) override;
     33 
     34 private:
     35     GrContext*     fContext;
     36 
     37     typedef GrPathRenderer INHERITED;
     38 };
     39 
     40 #endif
     41