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 SkGpuDevice; | 15 class GrContext; |
16 | 16 |
17 class GrGLDashingEffect; | 17 class GrGLDashingEffect; |
18 class SkPath; | 18 class SkPath; |
19 | 19 |
20 namespace GrDashingEffect { | 20 namespace GrDashingEffect { |
21 bool DrawDashLine(const SkPoint pnts[2], const SkPaint& paint, SkGpuDevice*
dev); | 21 bool DrawDashLine(const SkPoint pnts[2], const SkPaint& paint, GrContext* co
ntext); |
22 | 22 |
23 /** | 23 /** |
24 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. | 24 * An effect that renders a dashed line. It is intended to be used as a cove
rage effect. |
25 * The effect is meant for dashed lines that only have a single on/off inter
val pair. | 25 * The effect is meant for dashed lines that only have a single on/off inter
val pair. |
26 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's | 26 * Bounding geometry is rendered and the effect computes coverage based on t
he fragment's |
27 * position relative to the dashed line. | 27 * position relative to the dashed line. |
28 */ | 28 */ |
29 GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo&
info, | 29 GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo&
info, |
30 const SkMatrix& matrix, SkScalar strokeWidth); | 30 const SkMatrix& matrix, SkScalar strokeWidth); |
31 } | 31 } |
32 | 32 |
33 #endif | 33 #endif |
OLD | NEW |