Index: src/gpu/GrOptDrawState.cpp |
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp |
index d95bd3b7c42017a2526f4fd3e7fcb662bed8502e..ef73b244e3a777ec180a95adad1ef0a8549d2fcf 100644 |
--- a/src/gpu/GrOptDrawState.cpp |
+++ b/src/gpu/GrOptDrawState.cpp |
@@ -123,8 +123,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); |
} |
} |
@@ -265,6 +267,11 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const { |
return false; |
} else if (!this->getGeometryProcessor()->isEqual(*that.getGeometryProcessor())) { |
bsalomon
2014/12/05 14:43:03
Should we get rid of isEqual() in favor of canBatc
|
return false; |
+ } else if (this->getGeometryProcessor()->fNewStyle) { |
+ if (!this->getGeometryProcessor()->canBatch(this->getBatchTracker(), |
+ that.getBatchTracker())) { |
+ return false; |
+ } |
} |
} else if (that.hasGeometryProcessor()) { |
return false; |
@@ -278,6 +285,7 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const { |
return false; |
} |
} |
+ |
return true; |
} |