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