OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 GrDashingEffect_DEFINED | 9 #ifndef GrDashingEffect_DEFINED |
10 #define GrDashingEffect_DEFINED | 10 #define GrDashingEffect_DEFINED |
11 | 11 |
12 #include "GrTypesPriv.h" | 12 #include "GrTypesPriv.h" |
13 #include "SkPathEffect.h" | 13 #include "SkPathEffect.h" |
14 | 14 |
15 class GrGpu; | 15 class GrGpu; |
| 16 class GrDrawState; |
16 class GrDrawTarget; | 17 class GrDrawTarget; |
17 class GrGeometryProcessor; | 18 class GrGeometryProcessor; |
18 class GrPaint; | 19 class GrPaint; |
19 class GrStrokeInfo; | 20 class GrStrokeInfo; |
20 | 21 |
21 class GrGLDashingEffect; | 22 class GrGLDashingEffect; |
22 class SkPath; | 23 class SkPath; |
23 | 24 |
24 namespace GrDashingEffect { | 25 namespace GrDashingEffect { |
25 bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStroke
Info& strokeInfo, | 26 bool DrawDashLine(GrGpu*, GrDrawTarget*, GrDrawState*, const SkPoint pts[2], |
26 GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); | 27 const GrPaint& paint, const GrStrokeInfo& strokeInfo, |
| 28 const SkMatrix& vm); |
27 | 29 |
28 enum DashCap { | 30 enum DashCap { |
29 kRound_DashCap, | 31 kRound_DashCap, |
30 kNonRound_DashCap, | 32 kNonRound_DashCap, |
31 }; | 33 }; |
32 | 34 |
33 /** | 35 /** |
34 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. | 36 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. |
35 * The effect is meant for dashed lines that only have a single on/off inter
val pair. | 37 * The effect is meant for dashed lines that only have a single on/off inter
val pair. |
36 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's | 38 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's |
37 * position relative to the dashed line. | 39 * position relative to the dashed line. |
38 */ | 40 */ |
39 GrGeometryProcessor* Create(GrPrimitiveEdgeType edgeType, | 41 GrGeometryProcessor* Create(GrPrimitiveEdgeType edgeType, |
40 const SkPathEffect::DashInfo& info, | 42 const SkPathEffect::DashInfo& info, |
41 SkScalar strokeWidth, | 43 SkScalar strokeWidth, |
42 DashCap cap); | 44 DashCap cap); |
43 } | 45 } |
44 | 46 |
45 #endif | 47 #endif |
OLD | NEW |