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

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

Issue 900883002: Revert of Move DstCopy on gpu into the GrXferProcessor. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrProgramDesc.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 "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::willEffectReadDstColor() const {
105 return this->getXPFactory()->willNeedDstCopy(caps); 105 return this->getXPFactory()->willReadDst();
106 } 106 }
107 107
108 void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuild er) { 108 void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuild er) {
109 if (fPipelineBuilder) { 109 if (fPipelineBuilder) {
110 int m = fPipelineBuilder->numColorStages() - fColorEffectCnt; 110 int m = fPipelineBuilder->numColorStages() - fColorEffectCnt;
111 SkASSERT(m >= 0); 111 SkASSERT(m >= 0);
112 fPipelineBuilder->fColorStages.pop_back_n(m); 112 fPipelineBuilder->fColorStages.pop_back_n(m);
113 113
114 int n = fPipelineBuilder->numCoverageStages() - fCoverageEffectCnt; 114 int n = fPipelineBuilder->numCoverageStages() - fCoverageEffectCnt;
115 SkASSERT(n >= 0); 115 SkASSERT(n >= 0);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { 190 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
191 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { 191 if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
192 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; 192 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
193 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), 193 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
194 this->numCoverageStages(), cover age, flags, 194 this->numCoverageStages(), cover age, flags,
195 true); 195 true);
196 fCoverageProcInfoValid = true; 196 fCoverageProcInfoValid = true;
197 fCoverageCache = coverage; 197 fCoverageCache = coverage;
198 } 198 }
199 } 199 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698