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

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

Issue 1285193004: Move willColorBlendWithDst from pipeline builder to GrPipelineOptimizations. (Closed) Base URL: https://skia.googlesource.com/skia.git@xpfail
Patch Set: Address comment Created 5 years, 4 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/GrPipeline.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 uint32_t fSaveMarker; 154 uint32_t fSaveMarker;
155 }; 155 };
156 156
157 /// @} 157 /// @}
158 158
159 /////////////////////////////////////////////////////////////////////////// 159 ///////////////////////////////////////////////////////////////////////////
160 /// @name Blending 160 /// @name Blending
161 //// 161 ////
162 162
163 /** 163 /**
164 * Returns true if this pipeline's color output will be affected by the exis ting render target
165 * destination pixel values (meaning we need to be careful with overlapping draws). Note that we
166 * can conflate coverage and color, so the destination color may still bleed into pixels that
167 * have partial coverage, even if this function returns false.
168 */
169 bool willColorBlendWithDst(const GrPrimitiveProcessor*) const;
170
171 /**
172 * Installs a GrXPFactory. This object controls how src color, fractional pi xel coverage, 164 * Installs a GrXPFactory. This object controls how src color, fractional pi xel coverage,
173 * and the dst color are blended. 165 * and the dst color are blended.
174 */ 166 */
175 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) { 167 const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) {
176 fXPFactory.reset(SkRef(xpFactory)); 168 fXPFactory.reset(SkRef(xpFactory));
177 return xpFactory; 169 return xpFactory;
178 } 170 }
179 171
180 /** 172 /**
181 * Sets a GrXPFactory that will ignore src color and perform a set operation between the draws 173 * Sets a GrXPFactory that will ignore src color and perform a set operation between the draws
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 415
424 GrProcessorDataManager* getProcessorDataManager() { return fProcDataManager. get(); } 416 GrProcessorDataManager* getProcessorDataManager() { return fProcDataManager. get(); }
425 const GrProcessorDataManager* processorDataManager() const { return fProcDat aManager.get(); } 417 const GrProcessorDataManager* processorDataManager() const { return fProcDat aManager.get(); }
426 418
427 private: 419 private:
428 // Calculating invariant color / coverage information is expensive, so we pa rtially cache the 420 // Calculating invariant color / coverage information is expensive, so we pa rtially cache the
429 // results. 421 // results.
430 // 422 //
431 // canUseFracCoveragePrimProc() - Called in regular skia draw, caches result s but only for a 423 // canUseFracCoveragePrimProc() - Called in regular skia draw, caches result s but only for a
432 // specific color and coverage. May be calle d multiple times 424 // specific color and coverage. May be calle d multiple times
433 // willColorBlendWithDst() - only called by Nvpr, does not cache results
434 // GrOptDrawState constructor - never caches results 425 // GrOptDrawState constructor - never caches results
435 426
436 /** 427 /**
437 * Primproc variants of the calc functions 428 * Primproc variants of the calc functions
438 * TODO remove these when batch is everywhere 429 * TODO remove these when batch is everywhere
439 */ 430 */
440 void calcColorInvariantOutput(const GrPrimitiveProcessor*) const; 431 void calcColorInvariantOutput(const GrPrimitiveProcessor*) const;
441 void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const; 432 void calcCoverageInvariantOutput(const GrPrimitiveProcessor*) const;
442 433
443 /** 434 /**
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 mutable GrProcOptInfo fCoverageProcInfo; 469 mutable GrProcOptInfo fCoverageProcInfo;
479 mutable bool fColorProcInfoValid; 470 mutable bool fColorProcInfoValid;
480 mutable bool fCoverageProcInfoValid; 471 mutable bool fCoverageProcInfoValid;
481 mutable GrColor fColorCache; 472 mutable GrColor fColorCache;
482 mutable GrColor fCoverageCache; 473 mutable GrColor fCoverageCache;
483 474
484 friend class GrPipeline; 475 friend class GrPipeline;
485 }; 476 };
486 477
487 #endif 478 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrPipelineBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698