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