commit-bot@chromium.org | 628ed0b | 2014-05-19 14:32:49 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2014 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 GrDashingEffect_DEFINED |
| 10 | #define GrDashingEffect_DEFINED |
| 11 | |
| 12 | #include "GrTypesPriv.h" |
| 13 | #include "SkPathEffect.h" |
| 14 | |
egdaniel | e61c411 | 2014-06-12 10:24:21 -0700 | [diff] [blame] | 15 | class GrGpu; |
| 16 | class GrDrawTarget; |
| 17 | class GrPaint; |
| 18 | class GrStrokeInfo; |
commit-bot@chromium.org | 628ed0b | 2014-05-19 14:32:49 +0000 | [diff] [blame] | 19 | |
| 20 | class GrGLDashingEffect; |
| 21 | class SkPath; |
| 22 | |
| 23 | namespace GrDashingEffect { |
egdaniel | e61c411 | 2014-06-12 10:24:21 -0700 | [diff] [blame] | 24 | bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStrokeInfo& strokeInfo, |
| 25 | GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); |
commit-bot@chromium.org | 628ed0b | 2014-05-19 14:32:49 +0000 | [diff] [blame] | 26 | |
egdaniel | f767e79 | 2014-07-02 06:21:32 -0700 | [diff] [blame^] | 27 | enum DashCap { |
| 28 | kRound_DashCap, |
| 29 | kNonRound_DashCap, |
| 30 | }; |
| 31 | |
commit-bot@chromium.org | 628ed0b | 2014-05-19 14:32:49 +0000 | [diff] [blame] | 32 | /** |
| 33 | * An effect that renders a dashed line. It is intended to be used as a coverage effect. |
| 34 | * The effect is meant for dashed lines that only have a single on/off interval pair. |
| 35 | * Bounding geometry is rendered and the effect computes coverage based on the fragment's |
| 36 | * position relative to the dashed line. |
| 37 | */ |
| 38 | GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info, |
egdaniel | f767e79 | 2014-07-02 06:21:32 -0700 | [diff] [blame^] | 39 | SkScalar strokeWidth, DashCap cap); |
commit-bot@chromium.org | 628ed0b | 2014-05-19 14:32:49 +0000 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | #endif |