Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Unified Diff: src/gpu/GrPathProcessor.cpp

Issue 1139723004: Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: tweaks Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathProcessor.cpp
diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp
index 5c07a8b156675a5e155bd877ea0c5241f7501875..4660aa080fb393f3bbecc415344fb1b32e8f5487 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -57,12 +57,19 @@ bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
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,
« no previous file with comments | « src/gpu/GrPathProcessor.h ('k') | src/gpu/GrRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698