| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * 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 |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "GrPathRenderer.h" | 8 #include "GrPathRenderer.h" |
| 9 | 9 |
| 10 // This path renderer is made to create geometry (i.e. primitives) from the orig
inal path (before | 10 // This path renderer is made to create geometry (i.e. primitives) from the orig
inal path (before |
| 11 // the path is stroked) and render using the GPU directly rather than using any
software rendering | 11 // the path is stroked) and render using the GPU directly rather than using any
software rendering |
| 12 // step. It can be rendered in a single pass for simple cases and use multiple p
asses for features | 12 // step. It can be rendered in a single pass for simple cases and use multiple p
asses for features |
| 13 // like AA or opacity support. | 13 // like AA or opacity support. |
| 14 | 14 |
| 15 class GrStrokePathRenderer : public GrPathRenderer { | 15 class GrStrokePathRenderer : public GrPathRenderer { |
| 16 | 16 |
| 17 public: | 17 public: |
| 18 GrStrokePathRenderer(); | 18 GrStrokePathRenderer(); |
| 19 | 19 |
| 20 virtual bool canDrawPath(const SkPath& path, | 20 virtual bool canDrawPath(const SkPath& path, |
| 21 const SkStrokeRec& stroke, | 21 const SkStrokeRec& stroke, |
| 22 const GrDrawTarget* target, | 22 const GrDrawTarget* target, |
| 23 bool antiAlias) const SK_OVERRIDE; | 23 bool antiAlias) const override; |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 virtual bool onDrawPath(const SkPath& path, | 26 virtual bool onDrawPath(const SkPath& path, |
| 27 const SkStrokeRec& stroke, | 27 const SkStrokeRec& stroke, |
| 28 GrDrawTarget* target, | 28 GrDrawTarget* target, |
| 29 bool antiAlias) SK_OVERRIDE; | 29 bool antiAlias) override; |
| 30 }; | 30 }; |
| OLD | NEW |