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

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

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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 | « src/gpu/GrTest.cpp ('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 GrDrawState;
16 class GrDrawTarget; 17 class GrDrawTarget;
17 class GrGeometryProcessor; 18 class GrGeometryProcessor;
18 class GrPaint; 19 class GrPaint;
19 class GrStrokeInfo; 20 class GrStrokeInfo;
20 21
21 class GrGLDashingEffect; 22 class GrGLDashingEffect;
22 class SkPath; 23 class SkPath;
23 24
24 namespace GrDashingEffect { 25 namespace GrDashingEffect {
25 bool DrawDashLine(const SkPoint pts[2], const GrPaint& paint, const GrStroke Info& strokeInfo, 26 bool DrawDashLine(GrGpu*, GrDrawTarget*, GrDrawState*, const SkPoint pts[2],
26 GrGpu* gpu, GrDrawTarget* target, const SkMatrix& vm); 27 const GrPaint& paint, const GrStrokeInfo& strokeInfo,
28 const SkMatrix& vm);
27 29
28 enum DashCap { 30 enum DashCap {
29 kRound_DashCap, 31 kRound_DashCap,
30 kNonRound_DashCap, 32 kNonRound_DashCap,
31 }; 33 };
32 34
33 /** 35 /**
34 * An effect that renders a dashed line. It is intended to be used as a cove rage effect. 36 * An effect that renders a dashed line. It is intended to be used as a cove rage effect.
35 * The effect is meant for dashed lines that only have a single on/off inter val pair. 37 * The effect is meant for dashed lines that only have a single on/off inter val pair.
36 * Bounding geometry is rendered and the effect computes coverage based on t he fragment's 38 * Bounding geometry is rendered and the effect computes coverage based on t he fragment's
37 * position relative to the dashed line. 39 * position relative to the dashed line.
38 */ 40 */
39 GrGeometryProcessor* Create(GrPrimitiveEdgeType edgeType, 41 GrGeometryProcessor* Create(GrPrimitiveEdgeType edgeType,
40 const SkPathEffect::DashInfo& info, 42 const SkPathEffect::DashInfo& info,
41 SkScalar strokeWidth, 43 SkScalar strokeWidth,
42 DashCap cap); 44 DashCap cap);
43 } 45 }
44 46
45 #endif 47 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698