| 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(GrContext*); | 24 static GrPathRenderer* Create(GrContext*); |
| 25 | 25 |
| 26 virtual ~GrStencilAndCoverPathRenderer(); | 26 virtual ~GrStencilAndCoverPathRenderer(); |
| 27 | 27 |
| 28 virtual bool canDrawPath(const SkStrokeRec&, | 28 virtual bool canDrawPath(const SkPath&, |
| 29 const SkStrokeRec&, |
| 29 const GrDrawTarget*, | 30 const GrDrawTarget*, |
| 30 bool antiAlias) const SK_OVERRIDE; | 31 bool antiAlias) const SK_OVERRIDE; |
| 31 | 32 |
| 32 protected: | 33 protected: |
| 33 virtual StencilSupport onGetStencilSupport(const SkStrokeRec&, | 34 virtual StencilSupport onGetStencilSupport(const SkPath&, |
| 35 const SkStrokeRec&, |
| 34 const GrDrawTarget*) const SK_OVE
RRIDE; | 36 const GrDrawTarget*) const SK_OVE
RRIDE; |
| 35 | 37 |
| 36 virtual bool onDrawPath(const SkStrokeRec&, | 38 virtual bool onDrawPath(const SkPath&, |
| 39 const SkStrokeRec&, |
| 37 GrDrawTarget*, | 40 GrDrawTarget*, |
| 38 bool antiAlias) SK_OVERRIDE; | 41 bool antiAlias) SK_OVERRIDE; |
| 39 | 42 |
| 40 virtual void onStencilPath(const SkStrokeRec&, | 43 virtual void onStencilPath(const SkPath&, |
| 44 const SkStrokeRec&, |
| 41 GrDrawTarget*) SK_OVERRIDE; | 45 GrDrawTarget*) SK_OVERRIDE; |
| 42 | 46 |
| 43 private: | 47 private: |
| 44 GrStencilAndCoverPathRenderer(GrGpu*); | 48 GrStencilAndCoverPathRenderer(GrGpu*); |
| 45 | 49 |
| 46 GrGpu* fGpu; | 50 GrGpu* fGpu; |
| 47 | 51 |
| 48 typedef GrPathRenderer INHERITED; | 52 typedef GrPathRenderer INHERITED; |
| 49 }; | 53 }; |
| 50 | 54 |
| 51 #endif | 55 #endif |
| OLD | NEW |