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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial