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

Unified Diff: src/gpu/GrPipelineBuilder.cpp

Issue 956363003: Cleanup in GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPipelineBuilder.cpp
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp
index 89bf15fe849dc5425b798e6a3ccd184692008639..2a17c2863a1c80e19d6b04a5f55a3ca496f120e5 100644
--- a/src/gpu/GrPipelineBuilder.cpp
+++ b/src/gpu/GrPipelineBuilder.cpp
@@ -90,13 +90,13 @@ bool GrPipelineBuilder::willXPNeedDstCopy(const GrDrawTargetCaps& caps,
return this->getXPFactory()->willNeedDstCopy(caps, colorPOI, coveragePOI);
}
-void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuilder) {
+void GrPipelineBuilder::AutoRestoreFragmentProcessors::set(GrPipelineBuilder* pipelineBuilder) {
if (fPipelineBuilder) {
- int m = fPipelineBuilder->numColorStages() - fColorEffectCnt;
+ int m = fPipelineBuilder->numColorFragmentStages() - fColorEffectCnt;
SkASSERT(m >= 0);
fPipelineBuilder->fColorStages.pop_back_n(m);
- int n = fPipelineBuilder->numCoverageStages() - fCoverageEffectCnt;
+ int n = fPipelineBuilder->numCoverageFragmentStages() - fCoverageEffectCnt;
SkASSERT(n >= 0);
fPipelineBuilder->fCoverageStages.pop_back_n(n);
if (m + n > 0) {
@@ -107,8 +107,8 @@ void GrPipelineBuilder::AutoRestoreEffects::set(GrPipelineBuilder* pipelineBuild
}
fPipelineBuilder = pipelineBuilder;
if (NULL != pipelineBuilder) {
- fColorEffectCnt = pipelineBuilder->numColorStages();
- fCoverageEffectCnt = pipelineBuilder->numCoverageStages();
+ fColorEffectCnt = pipelineBuilder->numColorFragmentStages();
+ fCoverageEffectCnt = pipelineBuilder->numCoverageFragmentStages();
SkDEBUGCODE(++pipelineBuilder->fBlockEffectRemovalCnt;)
}
}
@@ -139,25 +139,25 @@ bool GrPipelineBuilder::willBlendWithDst(const GrPrimitiveProcessor* pp) const {
}
void GrPipelineBuilder::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const {
- fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorStages());
+ fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorFragmentStages());
fColorProcInfoValid = false;
}
void GrPipelineBuilder::calcCoverageInvariantOutput(const GrPrimitiveProcessor* pp) const {
fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(),
- this->numCoverageStages());
+ this->numCoverageFragmentStages());
fCoverageProcInfoValid = false;
}
void GrPipelineBuilder::calcColorInvariantOutput(const GrBatch* batch) const {
- fColorProcInfo.calcColorWithBatch(batch, fColorStages.begin(), this->numColorStages());
+ fColorProcInfo.calcColorWithBatch(batch, fColorStages.begin(), this->numColorFragmentStages());
fColorProcInfoValid = false;
}
void GrPipelineBuilder::calcCoverageInvariantOutput(const GrBatch* batch) const {
fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageStages.begin(),
- this->numCoverageStages());
+ this->numCoverageFragmentStages());
fCoverageProcInfoValid = false;
}
@@ -165,8 +165,8 @@ void GrPipelineBuilder::calcCoverageInvariantOutput(const GrBatch* batch) const
void GrPipelineBuilder::calcColorInvariantOutput(GrColor color) const {
if (!fColorProcInfoValid || color != fColorCache) {
GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
- fColorProcInfo.calcWithInitialValues(fColorStages.begin(), this->numColorStages(), color,
- flags, false);
+ fColorProcInfo.calcWithInitialValues(fColorStages.begin(),this->numColorFragmentStages(),
+ color, flags, false);
fColorProcInfoValid = true;
fColorCache = color;
}
@@ -176,7 +176,7 @@ void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const {
if (!fCoverageProcInfoValid || coverage != fCoverageCache) {
GrColorComponentFlags flags = kRGBA_GrColorComponentFlags;
fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(),
- this->numCoverageStages(), coverage, flags,
+ this->numCoverageFragmentStages(), coverage, flags,
true);
fCoverageProcInfoValid = true;
fCoverageCache = coverage;
« no previous file with comments | « src/gpu/GrPipelineBuilder.h ('k') | src/gpu/GrSWMaskHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698