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

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

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/GrPipelineBuilder.h ('k') | src/gpu/GrProcOptInfo.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 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 GrPipelineBuilder::~GrPipelineBuilder() { 120 GrPipelineBuilder::~GrPipelineBuilder() {
121 SkASSERT(0 == fBlockEffectRemovalCnt); 121 SkASSERT(0 == fBlockEffectRemovalCnt);
122 } 122 }
123 123
124 //////////////////////////////////////////////////////////////////////////////// 124 ////////////////////////////////////////////////////////////////////////////////
125 125
126 bool GrPipelineBuilder::willBlendWithDst(const GrPrimitiveProcessor* pp) const { 126 bool GrPipelineBuilder::willColorBlendWithDst(const GrPrimitiveProcessor* pp) co nst {
127 this->calcColorInvariantOutput(pp); 127 this->calcColorInvariantOutput(pp);
128 this->calcCoverageInvariantOutput(pp);
129 128
130 GrXPFactory::InvariantOutput output; 129 GrXPFactory::InvariantBlendedColor blendedColor;
131 fXPFactory->getInvariantOutput(fColorProcInfo, fCoverageProcInfo, &output); 130 fXPFactory->getInvariantBlendedColor(fColorProcInfo, &blendedColor);
132 return output.fWillBlendWithDst; 131 return blendedColor.fWillBlendWithDst;
133 } 132 }
134 133
135 void GrPipelineBuilder::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const { 134 void GrPipelineBuilder::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const {
136 fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColo rFragmentStages()); 135 fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColo rFragmentStages());
137 fColorProcInfoValid = false; 136 fColorProcInfoValid = false;
138 137
139 } 138 }
140 139
141 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrPrimitiveProcessor* pp) const { 140 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrPrimitiveProcessor* pp) const {
142 fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(), 141 fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(),
(...skipping 26 matching lines...) Expand all
169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 168 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 169 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 170 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 171 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
173 this->numCoverageFragmentStages( ), coverage, flags, 172 this->numCoverageFragmentStages( ), coverage, flags,
174 true); 173 true);
175 fCoverageProcInfoValid = true; 174 fCoverageProcInfoValid = true;
176 fCoverageCache = coverage; 175 fCoverageCache = coverage;
177 } 176 }
178 } 177 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrProcOptInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698