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

Unified Diff: include/utils/SkMatrix44.h

Issue 513343002: Add helper SkMatrix44::hasPerspective() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bug, call SkToBool, import tests Created 6 years, 4 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 | « no previous file | tests/Matrix44Test.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkMatrix44.h
diff --git a/include/utils/SkMatrix44.h b/include/utils/SkMatrix44.h
index 26247a01e99c0aa19dad0152d61309d1c75b577e..83b5443d681cc548e3f001bcdeebe20c15ffbd41 100644
--- a/include/utils/SkMatrix44.h
+++ b/include/utils/SkMatrix44.h
@@ -198,6 +198,10 @@ public:
return !(this->getType() & ~(kScale_Mask | kTranslate_Mask));
}
+ inline bool hasPerspective() const {
+ return SkToBool(this->getType() & kPerspective_Mask);
+ }
+
void setIdentity();
inline void reset() { this->setIdentity();}
« no previous file with comments | « no previous file | tests/Matrix44Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698