gfx/skia/trunk/src/gpu/GrDefaultPathRenderer.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /*
     2  * Copyright 2011 Google Inc.
     3  *
     4  * Use of this source code is governed by a BSD-style license that can be
     5  * found in the LICENSE file.
     6  */
     8 #ifndef GrDefaultPathRenderer_DEFINED
     9 #define GrDefaultPathRenderer_DEFINED
    11 #include "GrPathRenderer.h"
    12 #include "SkTemplates.h"
    14 /**
    15  *  Subclass that renders the path using the stencil buffer to resolve fill rules
    16  * (e.g. winding, even-odd)
    17  */
    18 class SK_API GrDefaultPathRenderer : public GrPathRenderer {
    19 public:
    20     GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSupport);
    22     virtual bool canDrawPath(const SkPath&,
    23                              const SkStrokeRec&,
    24                              const GrDrawTarget*,
    25                              bool antiAlias) const SK_OVERRIDE;
    27 private:
    29     virtual StencilSupport onGetStencilSupport(const SkPath&,
    30                                                const SkStrokeRec&,
    31                                                const GrDrawTarget*) const SK_OVERRIDE;
    33     virtual bool onDrawPath(const SkPath&,
    34                             const SkStrokeRec&,
    35                             GrDrawTarget*,
    36                             bool antiAlias) SK_OVERRIDE;
    38     virtual void onStencilPath(const SkPath&,
    39                                const SkStrokeRec&,
    40                                GrDrawTarget*) SK_OVERRIDE;
    42     bool internalDrawPath(const SkPath&,
    43                           const SkStrokeRec&,
    44                           GrDrawTarget*,
    45                           bool stencilOnly);
    47     bool createGeom(const SkPath&,
    48                     const SkStrokeRec&,
    49                     SkScalar srcSpaceTol,
    50                     GrDrawTarget*,
    51                     GrPrimitiveType*,
    52                     int* vertexCnt,
    53                     int* indexCnt,
    54                     GrDrawTarget::AutoReleaseGeometry*);
    56     bool    fSeparateStencil;
    57     bool    fStencilWrapOps;
    59     typedef GrPathRenderer INHERITED;
    60 };
    62 #endif

mercurial