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

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

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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/GrSoftwarePathRenderer.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrBuiltInPathRenderer_DEFINED 9 #ifndef GrBuiltInPathRenderer_DEFINED
10 #define GrBuiltInPathRenderer_DEFINED 10 #define GrBuiltInPathRenderer_DEFINED
11 11
12 #include "GrPathRenderer.h" 12 #include "GrPathRenderer.h"
13 13
14 class GrContext; 14 class GrContext;
15 class GrGpu; 15 class GrGpu;
16 16
17 /** 17 /**
18 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies 18 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
19 * on the target having MSAA if AA is desired. 19 * on the target having MSAA if AA is desired.
20 */ 20 */
21 class GrStencilAndCoverPathRenderer : public GrPathRenderer { 21 class GrStencilAndCoverPathRenderer : public GrPathRenderer {
22 public: 22 public:
23 23
24 static GrPathRenderer* Create(GrContext*); 24 static GrPathRenderer* Create(GrContext*);
25 25
26 virtual ~GrStencilAndCoverPathRenderer(); 26 virtual ~GrStencilAndCoverPathRenderer();
27 27
28 virtual bool canDrawPath(const SkPath&, 28 virtual bool canDrawPath(const GrDrawTarget*,
29 const GrDrawState*,
30 const SkPath&,
29 const SkStrokeRec&, 31 const SkStrokeRec&,
30 const GrDrawTarget*,
31 bool antiAlias) const SK_OVERRIDE; 32 bool antiAlias) const SK_OVERRIDE;
32 33
33 protected: 34 protected:
34 virtual StencilSupport onGetStencilSupport(const SkPath&, 35 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*,
35 const SkStrokeRec&, 36 const GrDrawState*,
36 const GrDrawTarget*) const SK_OVE RRIDE; 37 const SkPath&,
38 const SkStrokeRec&) const SK_OVER RIDE;
37 39
38 virtual bool onDrawPath(const SkPath&, 40 virtual bool onDrawPath(GrDrawTarget*,
41 GrDrawState*,
42 const SkPath&,
39 const SkStrokeRec&, 43 const SkStrokeRec&,
40 GrDrawTarget*,
41 bool antiAlias) SK_OVERRIDE; 44 bool antiAlias) SK_OVERRIDE;
42 45
43 virtual void onStencilPath(const SkPath&, 46 virtual void onStencilPath(GrDrawTarget*,
44 const SkStrokeRec&, 47 GrDrawState*,
45 GrDrawTarget*) SK_OVERRIDE; 48 const SkPath&,
49 const SkStrokeRec&) SK_OVERRIDE;
46 50
47 private: 51 private:
48 GrStencilAndCoverPathRenderer(GrGpu*); 52 GrStencilAndCoverPathRenderer(GrGpu*);
49 53
50 GrGpu* fGpu; 54 GrGpu* fGpu;
51 55
52 typedef GrPathRenderer INHERITED; 56 typedef GrPathRenderer INHERITED;
53 }; 57 };
54 58
55 #endif 59 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698