| OLD | NEW |
| 1 |
| 1 /* | 2 /* |
| 2 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 3 * | 4 * |
| 4 * 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 |
| 5 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 6 */ | 7 */ |
| 7 | 8 |
| 8 #ifndef GrTessellatingPathRenderer_DEFINED | 9 #ifndef GrDashLinePathRenderer_DEFINED |
| 9 #define GrTessellatingPathRenderer_DEFINED | 10 #define GrDashLinePathRenderer_DEFINED |
| 10 | 11 |
| 11 #include "GrPathRenderer.h" | 12 #include "GrPathRenderer.h" |
| 12 | 13 |
| 13 /** | 14 class GrDashLinePathRenderer : public GrPathRenderer { |
| 14 * Subclass that renders the path by converting to screen-space trapezoids plus | |
| 15 * extra 1-pixel geometry for AA. | |
| 16 */ | |
| 17 class SK_API GrTessellatingPathRenderer : public GrPathRenderer { | |
| 18 public: | 15 public: |
| 19 GrTessellatingPathRenderer(); | 16 GrDashLinePathRenderer(GrContext*); |
| 17 ~GrDashLinePathRenderer(); |
| 20 | 18 |
| 21 bool canDrawPath(const GrDrawTarget*, | 19 bool canDrawPath(const GrDrawTarget*, |
| 22 const GrPipelineBuilder*, | 20 const GrPipelineBuilder*, |
| 23 const SkMatrix&, | 21 const SkMatrix& viewMatrix, |
| 24 const SkPath&, | 22 const SkPath&, |
| 25 const SkStrokeRec&, | 23 const GrStrokeInfo&, |
| 26 bool antiAlias) const override; | 24 bool antiAlias) const override; |
| 25 |
| 27 protected: | 26 protected: |
| 28 | |
| 29 StencilSupport onGetStencilSupport(const GrDrawTarget*, | 27 StencilSupport onGetStencilSupport(const GrDrawTarget*, |
| 30 const GrPipelineBuilder*, | 28 const GrPipelineBuilder*, |
| 31 const SkPath&, | 29 const SkPath&, |
| 32 const SkStrokeRec&) const override; | 30 const GrStrokeInfo&) const override { |
| 31 return kNoSupport_StencilSupport; |
| 32 } |
| 33 | 33 |
| 34 bool onDrawPath(GrDrawTarget*, | 34 bool onDrawPath(GrDrawTarget*, |
| 35 GrPipelineBuilder*, | 35 GrPipelineBuilder*, |
| 36 GrColor, | 36 GrColor, |
| 37 const SkMatrix& viewMatrix, | 37 const SkMatrix& viewMatrix, |
| 38 const SkPath&, | 38 const SkPath&, |
| 39 const SkStrokeRec&, | 39 const GrStrokeInfo&, |
| 40 bool antiAlias) override; | 40 bool antiAlias) override; |
| 41 | 41 SkAutoTUnref<GrGpu> fGpu; |
| 42 typedef GrPathRenderer INHERITED; | 42 typedef GrPathRenderer INHERITED; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 |
| 45 #endif | 46 #endif |
| OLD | NEW |