Index: src/gpu/GrPipelineBuilder.cpp |
diff --git a/src/gpu/GrPipelineBuilder.cpp b/src/gpu/GrPipelineBuilder.cpp |
index f329c05b91ed89829bd5463517600a5d1fe4bdfa..90aee748c9108411b46ede0dbe2ef7059e6045d5 100644 |
--- a/src/gpu/GrPipelineBuilder.cpp |
+++ b/src/gpu/GrPipelineBuilder.cpp |
@@ -20,9 +20,7 @@ GrPipelineBuilder::GrPipelineBuilder() |
, fColorProcInfoValid(false) |
, fCoverageProcInfoValid(false) |
, fColorCache(GrColor_ILLEGAL) |
- , fCoverageCache(GrColor_ILLEGAL) |
- , fColorPrimProc(NULL) |
- , fCoveragePrimProc(NULL) { |
+ , fCoverageCache(GrColor_ILLEGAL) { |
SkDEBUGCODE(fBlockEffectRemovalCnt = 0;) |
} |
@@ -39,8 +37,6 @@ GrPipelineBuilder& GrPipelineBuilder::operator=(const GrPipelineBuilder& that) { |
fCoverageProcInfoValid = that.fCoverageProcInfoValid; |
fColorCache = that.fColorCache; |
fCoverageCache = that.fCoverageCache; |
- fColorPrimProc = that.fColorPrimProc; |
- fCoveragePrimProc = that.fCoveragePrimProc; |
if (fColorProcInfoValid) { |
fColorProcInfo = that.fColorProcInfo; |
} |
@@ -84,9 +80,6 @@ void GrPipelineBuilder::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) { |
fColorCache = GrColor_ILLEGAL; |
fCoverageCache = GrColor_ILLEGAL; |
- |
- fColorPrimProc = NULL; |
- fCoveragePrimProc = NULL; |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -161,22 +154,29 @@ bool GrPipelineBuilder::willBlendWithDst(const GrPrimitiveProcessor* pp) const { |
} |
void GrPipelineBuilder::calcColorInvariantOutput(const GrPrimitiveProcessor* pp) const { |
- if (!fColorProcInfoValid || fColorPrimProc != pp) { |
- fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorStages()); |
- fColorProcInfoValid = true; |
- fColorPrimProc = pp; |
- } |
+ fColorProcInfo.calcColorWithPrimProc(pp, fColorStages.begin(), this->numColorStages()); |
+ fColorProcInfoValid = false; |
+ |
} |
void GrPipelineBuilder::calcCoverageInvariantOutput(const GrPrimitiveProcessor* pp) const { |
- if (!fCoverageProcInfoValid || fCoveragePrimProc != pp) { |
- fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(), |
- this->numCoverageStages()); |
- fCoverageProcInfoValid = true; |
- fCoveragePrimProc = pp; |
- } |
+ fCoverageProcInfo.calcCoverageWithPrimProc(pp, fCoverageStages.begin(), |
+ this->numCoverageStages()); |
+ fCoverageProcInfoValid = false; |
} |
+void GrPipelineBuilder::calcColorInvariantOutput(const GrBatch* batch) const { |
+ fColorProcInfo.calcColorWithBatch(batch, fColorStages.begin(), this->numColorStages()); |
+ fColorProcInfoValid = false; |
+} |
+ |
+void GrPipelineBuilder::calcCoverageInvariantOutput(const GrBatch* batch) const { |
+ fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageStages.begin(), |
+ this->numCoverageStages()); |
+ fCoverageProcInfoValid = false; |
+} |
+ |
+ |
void GrPipelineBuilder::calcColorInvariantOutput(GrColor color) const { |
if (!fColorProcInfoValid || color != fColorCache) { |
GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; |