| OLD | NEW |
| 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(GrResourceProvider*, const GrCaps&); | 24 static GrPathRenderer* Create(GrResourceProvider*, const GrCaps&); |
| 25 | 25 |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 StencilSupport onGetStencilSupport(const GrDrawTarget*, | 28 StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const
override { |
| 29 const GrPipelineBuilder*, | 29 return GrPathRenderer::kStencilOnly_StencilSupport; |
| 30 const SkPath&, | 30 } |
| 31 const GrStrokeInfo&) const override; | |
| 32 | 31 |
| 33 bool onCanDrawPath(const CanDrawPathArgs&) const override; | 32 bool onCanDrawPath(const CanDrawPathArgs&) const override; |
| 34 | 33 |
| 35 bool onDrawPath(const DrawPathArgs&) override; | 34 bool onDrawPath(const DrawPathArgs&) override; |
| 36 | 35 |
| 37 void onStencilPath(const StencilPathArgs&) override; | 36 void onStencilPath(const StencilPathArgs&) override; |
| 38 | 37 |
| 39 GrStencilAndCoverPathRenderer(GrResourceProvider*); | 38 GrStencilAndCoverPathRenderer(GrResourceProvider*); |
| 40 | 39 |
| 41 GrResourceProvider* fResourceProvider; | 40 GrResourceProvider* fResourceProvider; |
| 42 | 41 |
| 43 typedef GrPathRenderer INHERITED; | 42 typedef GrPathRenderer INHERITED; |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 #endif | 45 #endif |
| OLD | NEW |