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

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

Issue 912413002: Pass in ProcOptInfos into willNeedDstCopy on XPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Review cleanup Created 5 years, 10 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/GrXferProcessor.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 #include "GrPipelineBuilder.h" 8 #include "GrPipelineBuilder.h"
9 9
10 #include "GrBlend.h" 10 #include "GrBlend.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 // The coverage isn't actually white, its unknown, but this will produce the same effect 95 // The coverage isn't actually white, its unknown, but this will produce the same effect
96 // TODO we want to cache the result of this call, but we can probably clean up the interface 96 // TODO we want to cache the result of this call, but we can probably clean up the interface
97 // so we don't have to pass in a seemingly known coverage 97 // so we don't have to pass in a seemingly known coverage
98 this->calcCoverageInvariantOutput(GrColor_WHITE); 98 this->calcCoverageInvariantOutput(GrColor_WHITE);
99 return this->getXPFactory()->canApplyCoverage(fColorProcInfo, fCoverageProcI nfo); 99 return this->getXPFactory()->canApplyCoverage(fColorProcInfo, fCoverageProcI nfo);
100 } 100 }
101 101
102 //////////////////////////////////////////////////////////////////////////////s 102 //////////////////////////////////////////////////////////////////////////////s
103 103
104 bool GrPipelineBuilder::willXPNeedDstCopy(const GrDrawTargetCaps& caps) const { 104 bool GrPipelineBuilder::willXPNeedDstCopy(const GrDrawTargetCaps& caps,
105 return this->getXPFactory()->willNeedDstCopy(caps); 105 const GrProcOptInfo& colorPOI,
106 const GrProcOptInfo& coveragePOI) cons t {
107 return this->getXPFactory()->willNeedDstCopy(caps, colorPOI, coveragePOI);
106 } 108 }
107 109
108 void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuild er) { 110 void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuild er) {
109 if (fPipelineBuilder) { 111 if (fPipelineBuilder) {
110 int m = fPipelineBuilder->numColorStages() - fColorEffectCnt; 112 int m = fPipelineBuilder->numColorStages() - fColorEffectCnt;
111 SkASSERT(m >= 0); 113 SkASSERT(m >= 0);
112 fPipelineBuilder->fColorStages.pop_back_n(m); 114 fPipelineBuilder->fColorStages.pop_back_n(m);
113 115
114 int n = fPipelineBuilder->numCoverageStages() - fCoverageEffectCnt; 116 int n = fPipelineBuilder->numCoverageStages() - fCoverageEffectCnt;
115 SkASSERT(n >= 0); 117 SkASSERT(n >= 0);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 192 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
191 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 193 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
192 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 194 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
193 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 195 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
194 this->numCoverageStages(), cover age, flags, 196 this->numCoverageStages(), cover age, flags,
195 true); 197 true);
196 fCoverageProcInfoValid = true; 198 fCoverageProcInfoValid = true;
197 fCoverageCache = coverage; 199 fCoverageCache = coverage;
198 } 200 }
199 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698