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

Unified Diff: src/gpu/GrGeometryProcessor.cpp

Issue 820523002: initial changes to add local matrix to primitive processor (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup-ccm-above-context
Patch Set: clean up of comment around get_transform_matrix 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
Index: src/gpu/GrGeometryProcessor.cpp
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp
index 5d9cdaff8f8ed6e20cb0e4c3ab49f1ad92042fda..b5d9599764b1e1a98fe093e4dd9a77eb8bc4e1cf 100644
--- a/src/gpu/GrGeometryProcessor.cpp
+++ b/src/gpu/GrGeometryProcessor.cpp
@@ -118,7 +118,9 @@ private:
typedef GrGLGeometryProcessor INHERITED;
};
-GrPathProcessor::GrPathProcessor(GrColor color) : fColor(color) {
+GrPathProcessor::GrPathProcessor(GrColor color, const SkMatrix& localMatrix)
+ : fColor(color)
+ , fLocalMatrix(localMatrix) {
this->initClassID<GrPathProcessor>();
}
@@ -151,6 +153,10 @@ bool GrPathProcessor::canMakeEqual(const GrBatchTracker& m,
return false;
}
+ if (!fLocalMatrix.cheapEqualTo(that.localMatrix())) {
+ return false;
+ }
+
const PathBatchTracker& mine = m.cast<PathBatchTracker>();
const PathBatchTracker& theirs = t.cast<PathBatchTracker>();
return CanCombineOutput(mine.fInputColorType, mine.fColor,

Powered by Google App Engine
This is Rietveld 408576698