Preliminary attempt to remove batch tracker
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/cbfe91d82500f4ae8c3ff7bd74b3021a4b89fd84
Review URL: https://codereview.chromium.org/1139723004
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 5c07a8b..4660aa0 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -57,12 +57,19 @@
const PathBatchTracker& mine = m.cast<PathBatchTracker>();
const PathBatchTracker& theirs = t.cast<PathBatchTracker>();
- return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
- that, theirs.fUsesLocalCoords) &&
- CanCombineOutput(mine.fInputColorType, mine.fColor,
- theirs.fInputColorType, theirs.fColor) &&
- CanCombineOutput(mine.fInputCoverageType, 0xff,
- theirs.fInputCoverageType, 0xff);
+ if (mine.fColor != theirs.fColor) {
+ return false;
+ }
+
+ if (mine.fUsesLocalCoords != theirs.fUsesLocalCoords) {
+ return false;
+ }
+
+ if (mine.fUsesLocalCoords && !this->localMatrix().cheapEqualTo(other.localMatrix())) {
+ return false;
+ }
+
+ return true;
}
void GrPathProcessor::getGLProcessorKey(const GrBatchTracker& bt,