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

Unified Diff: src/gpu/GrPipelineBuilder.cpp

Issue 845103005: GrBatchPrototype (Closed) Base URL: https://skia.googlesource.com/skia.git@lc2
Patch Set: removing dstread Created 5 years, 11 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/GrProcOptInfo.h » ('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 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;
« 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