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

Unified Diff: include/core/SkMatrix.h

Issue 706013005: Cherry pick two CLs back to M39 to fix a bug (Closed) Base URL: https://skia.googlesource.com/skia.git@m39
Patch Set: Created 6 years, 1 month 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 | « gm/dashing.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkMatrix.h
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 9f44bed9c4da20251ccb2053d3b9e2ce7dcec2ee..a65cd19f217985b022cddd1bb86aa42f5f2ffd41 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -60,6 +60,10 @@ public:
return this->getType() == 0;
}
+ bool isScaleTranslate() const {
+ return !(this->getType() & ~(kScale_Mask | kTranslate_Mask));
+ }
+
/** Returns true if will map a rectangle to another rectangle. This can be
true if the matrix is identity, scale-only, or rotates a multiple of
90 degrees.
« no previous file with comments | « gm/dashing.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698