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: |
kkinnunen | 1899651 | 2015-04-26 23:18:49 -0700 | [diff] [blame] | 16 | bool canDrawPath(const GrDrawTarget*, |
| 17 | const GrPipelineBuilder*, |
| 18 | const SkMatrix& viewMatrix, |
| 19 | const SkPath&, |
| 20 | const GrStrokeInfo&, |
| 21 | bool antiAlias) const override; |
| 22 | |
| 23 | protected: |
| 24 | StencilSupport onGetStencilSupport(const GrDrawTarget*, |
| 25 | const GrPipelineBuilder*, |
| 26 | const SkPath&, |
| 27 | const GrStrokeInfo&) const override { |
| 28 | return kNoSupport_StencilSupport; |
| 29 | } |
| 30 | |
| 31 | bool onDrawPath(GrDrawTarget*, |
| 32 | GrPipelineBuilder*, |
| 33 | GrColor, |
| 34 | const SkMatrix& viewMatrix, |
| 35 | const SkPath&, |
| 36 | const GrStrokeInfo&, |
| 37 | bool antiAlias) override; |
| 38 | SkAutoTUnref<GrGpu> fGpu; |
| 39 | typedef GrPathRenderer INHERITED; |
| 40 | }; |
| 41 | |
| 42 | |
| 43 | #endif |