Move ViewMatrix off of drawstate
BUG=skia:
Review URL: https://codereview.chromium.org/815553003
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp
index d47f687..01ea85a 100644
--- a/src/gpu/GrGeometryProcessor.cpp
+++ b/src/gpu/GrGeometryProcessor.cpp
@@ -119,8 +119,10 @@
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 @@
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,