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

Unified Diff: src/gpu/GrGeometryProcessor.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning Created 6 years 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/GrGeometryProcessor.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGeometryProcessor.cpp
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp
index d47f687d8970164f68ebf7629a011b9797a07c4d..01ea85a78b30d7db42124af5029727a9b474eb3a 100644
--- a/src/gpu/GrGeometryProcessor.cpp
+++ b/src/gpu/GrGeometryProcessor.cpp
@@ -119,8 +119,10 @@ private:
typedef GrGLGeometryProcessor INHERITED;
};
-GrPathProcessor::GrPathProcessor(GrColor color, const SkMatrix& localMatrix)
- : INHERITED(localMatrix)
+GrPathProcessor::GrPathProcessor(GrColor color,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix)
+ : INHERITED(viewMatrix, localMatrix)
, fColor(color) {
this->initClassID<GrPathProcessor>();
}
@@ -155,6 +157,10 @@ bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
return false;
}
+ if (!this->viewMatrix().cheapEqualTo(that.viewMatrix())) {
+ return false;
+ }
+
const PathBatchTracker& mine = m.cast<PathBatchTracker>();
const PathBatchTracker& theirs = t.cast<PathBatchTracker>();
return CanCombineLocalMatrices(*this, mine.fUsesLocalCoords,
« no previous file with comments | « src/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698