kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame^] | 1 | |
| 2 | /* |
| 3 | * Copyright 2015 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
| 9 | #ifndef GrDashLinePathRenderer_DEFINED |
| 10 | #define GrDashLinePathRenderer_DEFINED |
| 11 | |
| 12 | #include "GrPathRenderer.h" |
| 13 | |
| 14 | class GrDashLinePathRenderer : public GrPathRenderer { |
| 15 | public: |
| 16 | GrDashLinePathRenderer(GrContext*); |
| 17 | ~GrDashLinePathRenderer(); |
| 18 | |
| 19 | bool canDrawPath(const GrDrawTarget*, |
| 20 | const GrPipelineBuilder*, |
| 21 | const SkMatrix& viewMatrix, |
| 22 | const SkPath&, |
| 23 | const GrStrokeInfo&, |
| 24 | bool antiAlias) const override; |
| 25 | |
| 26 | protected: |
| 27 | StencilSupport onGetStencilSupport(const GrDrawTarget*, |
| 28 | const GrPipelineBuilder*, |
| 29 | const SkPath&, |
| 30 | const GrStrokeInfo&) const override { |
| 31 | return kNoSupport_StencilSupport; |
| 32 | } |
| 33 | |
| 34 | bool onDrawPath(GrDrawTarget*, |
| 35 | GrPipelineBuilder*, |
| 36 | GrColor, |
| 37 | const SkMatrix& viewMatrix, |
| 38 | const SkPath&, |
| 39 | const GrStrokeInfo&, |
| 40 | bool antiAlias) override; |
| 41 | SkAutoTUnref<GrGpu> fGpu; |
| 42 | typedef GrPathRenderer INHERITED; |
| 43 | }; |
| 44 | |
| 45 | |
| 46 | #endif |