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

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: rebase 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
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index b7875968135b4703fb323e0d995d5acf33f33b07..d95bd3b7c42017a2526f4fd3e7fcb662bed8502e 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -117,7 +117,17 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
}
this->setOutputStateInfo(drawState, blendOpt, caps);
-};
+
+ // let the GP init the batch tracker
+ if (drawState.hasGeometryProcessor()) {
+ GrGeometryProcessor::InitBT init;
+ init.fOutputColor = fDescInfo.fInputColorIsUsed;
+ init.fOutputCoverage = fDescInfo.fInputCoverageIsUsed;
+ init.fColor = this->getColor();
+ init.fCoverage = this->getCoverage();
+ fGeometryProcessor->initBatchTracker(&fBatchTracker, init);
+ }
+}
void GrOptDrawState::setOutputStateInfo(const GrDrawState& ds,
GrDrawState::BlendOpt blendOpt,
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698