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

Unified Diff: include/utils/SkMatrix44.h

Issue 513343002: Add helper SkMatrix44::hasPerspective() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | no next file » | 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..513ff96471146331e150bae4f6fa41fe29232173 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 !(this->getType() & ~kPerspective_Mask);
danakj 2014/08/28 19:37:41 Don't you want (getType() & kPerspective_mask) ?
reed1 2014/08/28 20:47:17 We use SkToBool(predicate) for this sort of thing.
tomhudson 2014/08/29 15:32:56 Done.
+ }
+
void setIdentity();
inline void reset() { this->setIdentity();}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698