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