Revert of Preliminary attempt to remove batch tracker (patchset #3 id:40001 of https://codereview.chromium.org/1139723004/)
Reason for revert:
breaking bots
Original issue's description:
> Preliminary attempt to remove batch tracker
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/cbfe91d82500f4ae8c3ff7bd74b3021a4b89fd84
TBR=robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1132323003
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 4660aa0..5c07a8b 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -57,19 +57,12 @@
const PathBatchTracker& mine = m.cast<PathBatchTracker>();
const PathBatchTracker& theirs = t.cast<PathBatchTracker>();
- 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;
+ return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
+ that, theirs.fUsesLocalCoords) &&
+ CanCombineOutput(mine.fInputColorType, mine.fColor,
+ theirs.fInputColorType, theirs.fColor) &&
+ CanCombineOutput(mine.fInputCoverageType, 0xff,
+ theirs.fInputCoverageType, 0xff);
}
void GrPathProcessor::getGLProcessorKey(const GrBatchTracker& bt,