Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: src/gpu/GrDefaultPathRenderer.h

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrDefaultPathRenderer_DEFINED 8 #ifndef GrDefaultPathRenderer_DEFINED
9 #define GrDefaultPathRenderer_DEFINED 9 #define GrDefaultPathRenderer_DEFINED
10 10
11 #include "GrPathRenderer.h" 11 #include "GrPathRenderer.h"
12 #include "SkTemplates.h" 12 #include "SkTemplates.h"
13 13
14 /** 14 /**
15 * Subclass that renders the path using the stencil buffer to resolve fill rule s 15 * Subclass that renders the path using the stencil buffer to resolve fill rule s
16 * (e.g. winding, even-odd) 16 * (e.g. winding, even-odd)
17 */ 17 */
18 class SK_API GrDefaultPathRenderer : public GrPathRenderer { 18 class SK_API GrDefaultPathRenderer : public GrPathRenderer {
19 public: 19 public:
20 GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSuppor t); 20 GrDefaultPathRenderer(bool separateStencilSupport, bool stencilWrapOpsSuppor t);
21 21
22 virtual bool canDrawPath(const GrDrawTarget*, 22 virtual bool canDrawPath(const GrDrawTarget*,
23 const GrDrawState*, 23 const GrDrawState*,
24 const SkMatrix& viewMatrix,
24 const SkPath&, 25 const SkPath&,
25 const SkStrokeRec&, 26 const SkStrokeRec&,
26 bool antiAlias) const SK_OVERRIDE; 27 bool antiAlias) const SK_OVERRIDE;
27 28
28 private: 29 private:
29 30
30 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, 31 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
31 const GrDrawState*, 32 const GrDrawState*,
32 const SkPath&, 33 const SkPath&,
33 const SkStrokeRec&) const SK_OVER RIDE; 34 const SkStrokeRec&) const SK_OVER RIDE;
34 35
35 virtual bool onDrawPath(GrDrawTarget*, 36 virtual bool onDrawPath(GrDrawTarget*,
36 GrDrawState*, 37 GrDrawState*,
37 GrColor, 38 GrColor,
39 const SkMatrix& viewMatrix,
38 const SkPath&, 40 const SkPath&,
39 const SkStrokeRec&, 41 const SkStrokeRec&,
40 bool antiAlias) SK_OVERRIDE; 42 bool antiAlias) SK_OVERRIDE;
41 43
42 virtual void onStencilPath(GrDrawTarget*, 44 virtual void onStencilPath(GrDrawTarget*,
43 GrDrawState*, 45 GrDrawState*,
46 const SkMatrix& viewMatrix,
44 const SkPath&, 47 const SkPath&,
45 const SkStrokeRec&) SK_OVERRIDE; 48 const SkStrokeRec&) SK_OVERRIDE;
46 49
47 bool internalDrawPath(GrDrawTarget*, 50 bool internalDrawPath(GrDrawTarget*,
48 GrDrawState*, 51 GrDrawState*,
49 GrColor, 52 GrColor,
53 const SkMatrix& viewMatrix,
50 const SkPath&, 54 const SkPath&,
51 const SkStrokeRec&, 55 const SkStrokeRec&,
52 bool stencilOnly); 56 bool stencilOnly);
53 57
54 bool createGeom(GrDrawTarget*, 58 bool createGeom(GrDrawTarget*,
55 GrDrawState*, 59 GrDrawState*,
56 GrPrimitiveType*, 60 GrPrimitiveType*,
57 int* vertexCnt, 61 int* vertexCnt,
58 int* indexCnt, 62 int* indexCnt,
59 GrDrawTarget::AutoReleaseGeometry*, 63 GrDrawTarget::AutoReleaseGeometry*,
60 const SkPath&, 64 const SkPath&,
61 const SkStrokeRec&, 65 const SkStrokeRec&,
62 SkScalar srcSpaceTol); 66 SkScalar srcSpaceTol);
63 67
64 bool fSeparateStencil; 68 bool fSeparateStencil;
65 bool fStencilWrapOps; 69 bool fStencilWrapOps;
66 70
67 typedef GrPathRenderer INHERITED; 71 typedef GrPathRenderer INHERITED;
68 }; 72 };
69 73
70 #endif 74 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698