create and thread batch tracker object
I remove the factory on the next CL
BUG=skia:
Review URL: https://codereview.chromium.org/772513002
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 6eee0c2..20057ac 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -117,7 +117,17 @@
}
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,