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

Side by Side Diff: include/gpu/GrPaint.h

Issue 372053003: Revert of Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: 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 | « include/gpu/GrEffectUnitTest.h ('k') | src/core/SkBitmapProcShader.h » ('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 2011 Google Inc. 3 * Copyright 2011 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 9
10 #ifndef GrPaint_DEFINED 10 #ifndef GrPaint_DEFINED
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 /** 81 /**
82 * Should dithering be applied. Defaults to false. 82 * Should dithering be applied. Defaults to false.
83 */ 83 */
84 void setDither(bool dither) { fDither = dither; } 84 void setDither(bool dither) { fDither = dither; }
85 bool isDither() const { return fDither; } 85 bool isDither() const { return fDither; }
86 86
87 /** 87 /**
88 * Appends an additional color effect to the color computation. 88 * Appends an additional color effect to the color computation.
89 */ 89 */
90 const GrEffect* addColorEffect(const GrEffect* effect, int attr0 = -1, int a ttr1 = -1) { 90 const GrEffectRef* addColorEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
91 SkASSERT(NULL != effect); 91 SkASSERT(NULL != effect);
92 if (!effect->willUseInputColor()) { 92 if (!(*effect)->willUseInputColor()) {
93 fColorStages.reset(); 93 fColorStages.reset();
94 } 94 }
95 SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, att r1)); 95 SkNEW_APPEND_TO_TARRAY(&fColorStages, GrEffectStage, (effect, attr0, att r1));
96 return effect; 96 return effect;
97 } 97 }
98 98
99 /** 99 /**
100 * Appends an additional coverage effect to the coverage computation. 100 * Appends an additional coverage effect to the coverage computation.
101 */ 101 */
102 const GrEffect* addCoverageEffect(const GrEffect* effect, int attr0 = -1, in t attr1 = -1) { 102 const GrEffectRef* addCoverageEffect(const GrEffectRef* effect, int attr0 = -1, int attr1 = -1) {
103 SkASSERT(NULL != effect); 103 SkASSERT(NULL != effect);
104 if (!effect->willUseInputColor()) { 104 if (!(*effect)->willUseInputColor()) {
105 fCoverageStages.reset(); 105 fCoverageStages.reset();
106 } 106 }
107 SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect, attr0, attr1)); 107 SkNEW_APPEND_TO_TARRAY(&fCoverageStages, GrEffectStage, (effect, attr0, attr1));
108 return effect; 108 return effect;
109 } 109 }
110 110
111 /** 111 /**
112 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied 112 * Helpers for adding color or coverage effects that sample a texture. The m atrix is applied
113 * to the src space position to compute texture coordinates. 113 * to the src space position to compute texture coordinates.
114 */ 114 */
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 fCoverage = 0xff; 245 fCoverage = 0xff;
246 } 246 }
247 247
248 void resetStages() { 248 void resetStages() {
249 fColorStages.reset(); 249 fColorStages.reset();
250 fCoverageStages.reset(); 250 fCoverageStages.reset();
251 } 251 }
252 }; 252 };
253 253
254 #endif 254 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrEffectUnitTest.h ('k') | src/core/SkBitmapProcShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698