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

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

Issue 851143003: Remove willReadDst from GrFragmentProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@xferXP
Patch Set: Rebase Created 5 years, 11 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/GrFragmentProcessor.h ('k') | include/gpu/effects/GrPorterDuffXferProcessor.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrXferProcessor_DEFINED 8 #ifndef GrXferProcessor_DEFINED
9 #define GrXferProcessor_DEFINED 9 #define GrXferProcessor_DEFINED
10 10
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 /** 198 /**
199 * Determines whether multiplying the computed per-pixel color by the pixel' s fractional 199 * Determines whether multiplying the computed per-pixel color by the pixel' s fractional
200 * coverage before the blend will give the correct final destination color. In general it 200 * coverage before the blend will give the correct final destination color. In general it
201 * will not as coverage is applied after blending. 201 * will not as coverage is applied after blending.
202 */ 202 */
203 virtual bool canTweakAlphaForCoverage() const = 0; 203 virtual bool canTweakAlphaForCoverage() const = 0;
204 204
205 /** 205 /**
206 * Returns true if the XP generated by this factory will read dst. 206 * Returns true if the XP generated by this factory will read dst.
207 */ 207 */
208 // TODO: Currently this function must also check if the color/coverage stage s read dst. 208 virtual bool willReadDst() const = 0;
209 // Once only XP's can read dst we can remove the ProcOptInfo's from th is function.
210 virtual bool willReadDst(const GrProcOptInfo& colorPOI,
211 const GrProcOptInfo& coveragePOI) const = 0;
212 209
213 bool isEqual(const GrXPFactory& that) const { 210 bool isEqual(const GrXPFactory& that) const {
214 if (this->classID() != that.classID()) { 211 if (this->classID() != that.classID()) {
215 return false; 212 return false;
216 } 213 }
217 return this->onIsEqual(that); 214 return this->onIsEqual(that);
218 } 215 }
219 216
220 /** 217 /**
221 * Helper for down-casting to a GrXPFactory subclass 218 * Helper for down-casting to a GrXPFactory subclass
(...skipping 30 matching lines...) Expand all
252 enum { 249 enum {
253 kIllegalXPFClassID = 0, 250 kIllegalXPFClassID = 0,
254 }; 251 };
255 static int32_t gCurrXPFClassID; 252 static int32_t gCurrXPFClassID;
256 253
257 typedef GrProgramElement INHERITED; 254 typedef GrProgramElement INHERITED;
258 }; 255 };
259 256
260 #endif 257 #endif
261 258
OLDNEW
« no previous file with comments | « include/gpu/GrFragmentProcessor.h ('k') | include/gpu/effects/GrPorterDuffXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698