| 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 GrSoftwarePathRenderer_DEFINED | 9 #ifndef GrSoftwarePathRenderer_DEFINED |
| 10 #define GrSoftwarePathRenderer_DEFINED | 10 #define GrSoftwarePathRenderer_DEFINED |
| 11 | 11 |
| 12 #include "GrPathRenderer.h" | 12 #include "GrPathRenderer.h" |
| 13 | 13 |
| 14 class GrContext; | 14 class GrContext; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * This class uses the software side to render a path to an SkBitmap and | 17 * This class uses the software side to render a path to an SkBitmap and |
| 18 * then uploads the result to the gpu | 18 * then uploads the result to the gpu |
| 19 */ | 19 */ |
| 20 class GrSoftwarePathRenderer : public GrPathRenderer { | 20 class GrSoftwarePathRenderer : public GrPathRenderer { |
| 21 public: | 21 public: |
| 22 GrSoftwarePathRenderer(GrContext* context) | 22 GrSoftwarePathRenderer(GrContext* context) |
| 23 : fContext(context) { | 23 : fContext(context) { |
| 24 } | 24 } |
| 25 private: | 25 private: |
| 26 virtual StencilSupport onGetStencilSupport(const GrDrawTarget*, | 26 StencilSupport onGetStencilSupport(const SkPath&, const GrStrokeInfo&) const
override { |
| 27 const GrPipelineBuilder*, | 27 return GrPathRenderer::kNoSupport_StencilSupport; |
| 28 const SkPath&, | 28 } |
| 29 const GrStrokeInfo&) const overri
de; | |
| 30 | 29 |
| 31 bool onCanDrawPath(const CanDrawPathArgs&) const override; | 30 bool onCanDrawPath(const CanDrawPathArgs&) const override; |
| 32 | 31 |
| 33 bool onDrawPath(const DrawPathArgs&) override; | 32 bool onDrawPath(const DrawPathArgs&) override; |
| 34 | 33 |
| 35 private: | 34 private: |
| 36 GrContext* fContext; | 35 GrContext* fContext; |
| 37 | 36 |
| 38 typedef GrPathRenderer INHERITED; | 37 typedef GrPathRenderer INHERITED; |
| 39 }; | 38 }; |
| 40 | 39 |
| 41 #endif | 40 #endif |
| OLD | NEW |