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

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

Issue 1040303002: Use texture barriers to read directly from the RT (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_zz1_reverseiter
Patch Set: Created 5 years, 8 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
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 #include "GrPipelineBuilder.h" 8 #include "GrPipelineBuilder.h"
9 9
10 #include "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 //////////////////////////////////////////////////////////////////////////////// 118 ////////////////////////////////////////////////////////////////////////////////
119 119
120 // Some blend modes allow folding a fractional coverage value into the color's a lpha channel, while 120 // Some blend modes allow folding a fractional coverage value into the color's a lpha channel, while
121 // others will blend incorrectly. 121 // others will blend incorrectly.
122 bool GrPipelineBuilder::canTweakAlphaForCoverage() const { 122 bool GrPipelineBuilder::canTweakAlphaForCoverage() const {
123 return this->getXPFactory()->canTweakAlphaForCoverage(); 123 return this->getXPFactory()->canTweakAlphaForCoverage();
124 } 124 }
125 125
126 // Some blending extensions require the use of a barrier to ensure coherent resu lts.
127 bool GrPipelineBuilder::willBlendCoherently(const GrDrawTargetCaps& caps) const {
128 return this->getXPFactory()->willBlendCoherently(caps);
Mark Kilgard 2015/04/02 23:02:38 this seems a lot of indirection to just return a b
129 }
130
126 //////////////////////////////////////////////////////////////////////////////// 131 ////////////////////////////////////////////////////////////////////////////////
127 132
128 GrPipelineBuilder::~GrPipelineBuilder() { 133 GrPipelineBuilder::~GrPipelineBuilder() {
129 SkASSERT(0 == fBlockEffectRemovalCnt); 134 SkASSERT(0 == fBlockEffectRemovalCnt);
130 } 135 }
131 136
132 //////////////////////////////////////////////////////////////////////////////// 137 ////////////////////////////////////////////////////////////////////////////////
133 138
134 bool GrPipelineBuilder::willBlendWithDst(const GrPrimitiveProcessor* pp) const { 139 bool GrPipelineBuilder::willBlendWithDst(const GrPrimitiveProcessor* pp) const {
135 this->calcColorInvariantOutput(pp); 140 this->calcColorInvariantOutput(pp);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 182 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
178 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 183 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
179 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 184 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
180 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 185 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
181 this->numCoverageFragmentStages( ), coverage, flags, 186 this->numCoverageFragmentStages( ), coverage, flags,
182 true); 187 true);
183 fCoverageProcInfoValid = true; 188 fCoverageProcInfoValid = true;
184 fCoverageCache = coverage; 189 fCoverageCache = coverage;
185 } 190 }
186 } 191 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698