Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/gpu/effects/GrDashingEffect.h

Issue 345113003: Add the ability for gpu to render dotted lines (dashed line, 0 on interval, round caps) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up and Add GM ignore Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GrPaint; 17 class GrPaint;
18 class GrStrokeInfo; 18 class GrStrokeInfo;
19 19
20 class GrGLDashingEffect; 20 class GrGLDashingEffect;
21 class SkPath; 21 class SkPath;
22 22
23 namespace GrDashingEffect { 23 namespace GrDashingEffect {
24 bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStroke Info& strokeInfo, 24 bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStroke Info& strokeInfo,
25 GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); 25 GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm);
26 26
27 enum DashCap {
28 kRound_DashCap,
29 kNonRound_DashCap,
30 };
31
27 /** 32 /**
28 * An effect that renders a dashed line. It is intended to be used as a cove rage effect. 33 * An effect that renders a dashed line. It is intended to be used as a cove rage effect.
29 * The effect is meant for dashed lines that only have a single on/off inter val pair. 34 * The effect is meant for dashed lines that only have a single on/off inter val pair.
30 * Bounding geometry is rendered and the effect computes coverage based on t he fragment's 35 * Bounding geometry is rendered and the effect computes coverage based on t he fragment's
31 * position relative to the dashed line. 36 * position relative to the dashed line.
32 */ 37 */
33 GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info, 38 GrEffectRef* Create(GrEffectEdgeType edgeType, const SkPathEffect::DashInfo& info,
34 SkScalar strokeWidth); 39 SkScalar strokeWidth, DashCap cap);
35 } 40 }
36 41
37 #endif 42 #endif
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698