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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 772513002: create and thread batch tracker object (Closed) Base URL: https://skia.googlesource.com/skia.git@2_vertex_attr
Patch Set: a bit of 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 41a34c4ed2d885bedb7653d1152704e4cf3dd8bf..6fc3bc72aadcafd23e37a4df945a4ffb6095d74f 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -117,6 +117,16 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
// now create a key
gpu->buildProgramDesc(*this, descInfo, drawType, &fDesc);
+
+ // let the GP init the batch tracker
+ if (drawState.hasGeometryProcessor()) {
+ GrGeometryProcessor::InitBT init;
+ init.fOutputColor = descInfo.fInputColorIsUsed;
+ init.fOutputCoverage = descInfo.fInputCoverageIsUsed;
+ init.fColor = this->getColor();
+ init.fCoverage = this->getCoverage();
+ fGeometryProcessor->initBatchTracker(&fBatchTracker, init);
+ }
};
void GrOptDrawState::setOutputStateInfo(const GrDrawState& ds,

Powered by Google App Engine
This is Rietveld 408576698