Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index 010fe4b7392fb2444a8e4ad2c4f4d91f004dee6f..9c055fb7f6ceed173d43c61aad38757b3a3af894 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,11 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const { |
return false; |
} else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) { |
return false; |
+ } else if (this->getGeometryProcessor()->fNewStyle) { |
+ if (!this->getGeometryProcessor()->canBatch(this->getBatchTracker(), |
+ that.getBatchTracker())) { |
+ return false; |
+ } |
} |
} else if (that.hasGeometryProcessor()) { |
return false; |
@@ -244,6 +251,7 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const { |
return false; |
} |
} |
+ |
return true; |
} |