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

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

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

Powered by Google App Engine
This is Rietveld 408576698