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, |