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

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

Issue 1950893002: Make GrPathRenderer only support fills for path stenciling (Closed) Base URL: https://skia.googlesource.com/skia.git@styleiface
Patch Set: Set draw params to fill in default impl of GrPR::onStencilPath Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 GrBuiltInPathRenderer_DEFINED 8 #ifndef GrBuiltInPathRenderer_DEFINED
9 #define GrBuiltInPathRenderer_DEFINED 9 #define GrBuiltInPathRenderer_DEFINED
10 10
11 #include "GrPathRenderer.h" 11 #include "GrPathRenderer.h"
12 12
13 class GrContext; 13 class GrContext;
14 class GrGpu; 14 class GrGpu;
15 15
16 /** 16 /**
17 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies 17 * Uses GrGpu::stencilPath followed by a cover rectangle. This subclass doesn't apply AA; it relies
18 * on the target having MSAA if AA is desired. 18 * on the target having MSAA if AA is desired.
19 */ 19 */
20 class GrStencilAndCoverPathRenderer : public GrPathRenderer { 20 class GrStencilAndCoverPathRenderer : public GrPathRenderer {
21 public: 21 public:
22 22
23 static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&); 23 static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&);
24 24
25 25
26 private: 26 private:
27 StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const override { 27 StencilSupport onGetStencilSupport(const SkPath&) const override {
28 return GrPathRenderer::kStencilOnly_StencilSupport; 28 return GrPathRenderer::kStencilOnly_StencilSupport;
29 } 29 }
30 30
31 bool onCanDrawPath(const CanDrawPathArgs&) const override; 31 bool onCanDrawPath(const CanDrawPathArgs&) const override;
32 32
33 bool onDrawPath(const DrawPathArgs&) override; 33 bool onDrawPath(const DrawPathArgs&) override;
34 34
35 void onStencilPath(const StencilPathArgs&) override; 35 void onStencilPath(const StencilPathArgs&) override;
36 36
37 GrStencilAndCoverPathRenderer(GrResourceProvider*); 37 GrStencilAndCoverPathRenderer(GrResourceProvider*);
38 38
39 GrResourceProvider* fResourceProvider; 39 GrResourceProvider* fResourceProvider;
40 40
41 typedef GrPathRenderer INHERITED; 41 typedef GrPathRenderer INHERITED;
42 }; 42 };
43 43
44 #endif 44 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrMSAAPathRenderer.cpp ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698