Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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