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

Side by Side Diff: src/gpu/GrPipelineBuilder.h

Issue 1161273005: Update XPF invariant info to not account for conflation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_reenablebea
Patch Set: rebase Created 5 years, 6 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 | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrPipelineBuilder.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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 GrPipelineBuilder_DEFINED 8 #ifndef GrPipelineBuilder_DEFINED
9 #define GrPipelineBuilder_DEFINED 9 #define GrPipelineBuilder_DEFINED
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int fCoverageEffectCnt; 132 int fCoverageEffectCnt;
133 }; 133 };
134 134
135 /// @} 135 /// @}
136 136
137 /////////////////////////////////////////////////////////////////////////// 137 ///////////////////////////////////////////////////////////////////////////
138 /// @name Blending 138 /// @name Blending
139 //// 139 ////
140 140
141 /** 141 /**
142 * This function returns true if the render target destination pixel values will be read for 142 * Returns true if this pipeline's color output will be affected by the exis ting render target
143 * blending during draw. 143 * destination pixel values (meaning we need to be careful with overlapping draws). Note that we
144 * can conflate coverage and color, so the destination color may still bleed into pixels that
145 * have partial coverage, even if this function returns false.
144 */ 146 */
145 bool willBlendWithDst(const GrPrimitiveProcessor*) const; 147 bool willColorBlendWithDst(const GrPrimitiveProcessor*) const;
146 148
147 /** 149 /**
148 * Installs a GrXPFactory. This object controls how src color, fractional pi xel coverage, 150 * Installs a GrXPFactory. This object controls how src color, fractional pi xel coverage,
149 * and the dst color are blended. 151 * and the dst color are blended.
150 */ 152 */
151 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { 153 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) {
152 fXPFactory.reset(SkRef(xpFactory)); 154 fXPFactory.reset(SkRef(xpFactory));
153 return xpFactory; 155 return xpFactory;
154 } 156 }
155 157
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 382
381 void setClip(const GrClip& clip) { fClip = clip; } 383 void setClip(const GrClip& clip) { fClip = clip; }
382 const GrClip& clip() const { return fClip; } 384 const GrClip& clip() const { return fClip; }
383 385
384 private: 386 private:
385 // Calculating invariant color / coverage information is expensive, so we pa rtially cache the 387 // Calculating invariant color / coverage information is expensive, so we pa rtially cache the
386 // results. 388 // results.
387 // 389 //
388 // canUseFracCoveragePrimProc() - Called in regular skia draw, caches result s but only for a 390 // canUseFracCoveragePrimProc() - Called in regular skia draw, caches result s but only for a
389 // specific color and coverage. May be calle d multiple times 391 // specific color and coverage. May be calle d multiple times
390 // willBlendWithDst() - only called by Nvpr, does not cache results 392 // willColorBlendWithDst() - only called by Nvpr, does not cache results
391 // GrOptDrawState constructor - never caches results 393 // GrOptDrawState constructor - never caches results
392 394
393 /** 395 /**
394 * Primproc variants of the calc functions 396 * Primproc variants of the calc functions
395 * TODO remove these when batch is everywhere 397 * TODO remove these when batch is everywhere
396 */ 398 */
397 void calcColorInvariantOutput(const GrPrimitiveProcessor*) const; 399 void calcColorInvariantOutput(const GrPrimitiveProcessor*) const;
398 void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const; 400 void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
399 401
400 /** 402 /**
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 mutable GrProcOptInfo fCoverageProcInfo; 436 mutable GrProcOptInfo fCoverageProcInfo;
435 mutable bool fColorProcInfoValid; 437 mutable bool fColorProcInfoValid;
436 mutable bool fCoverageProcInfoValid; 438 mutable bool fCoverageProcInfoValid;
437 mutable GrColor fColorCache; 439 mutable GrColor fColorCache;
438 mutable GrColor fCoverageCache; 440 mutable GrColor fCoverageCache;
439 441
440 friend class GrPipeline; 442 friend class GrPipeline;
441 }; 443 };
442 444
443 #endif 445 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698