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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 746423007: Draft change to start pulling uniform color into GP (Closed) Base URL: https://skia.googlesource.com/skia.git@no_factories
Patch Set: cleanup Created 6 years 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
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 010fe4b7392fb2444a8e4ad2c4f4d91f004dee6f..bda7481cfeec547dfff367fa8a8b34eefa2ebd04 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -148,8 +148,10 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
GrGeometryProcessor::InitBT init;
init.fOutputColor = fDescInfo.fInputColorIsUsed;
init.fOutputCoverage = fDescInfo.fInputCoverageIsUsed;
+ init.fRemoveColorAttr = !fDescInfo.fHasVertexColor;
+ init.fRemoveCoverageAttr = !fDescInfo.fHasVertexCoverage;
init.fColor = this->getColor();
- init.fCoverage = this->getCoverage();
+ init.fCoverage = this->getCoverageColor();
fGeometryProcessor->initBatchTracker(&fBatchTracker, init);
}
}
@@ -227,6 +229,10 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const {
return false;
} else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) {
return false;
+ // TODO remove canBatch when we have deferred geometry
+ } else if (!this->getGeometryProcessor()->canBatch(this->getBatchTracker(),
+ that.getBatchTracker())) {
+ return false;
}
} else if (that.hasGeometryProcessor()) {
return false;

Powered by Google App Engine
This is Rietveld 408576698