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

Unified Diff: ui/gfx/transform.h

Issue 27223008: Provide approximate type functions for SkMatrix44. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move code to gfx::Transform class. Created 7 years, 2 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
Index: ui/gfx/transform.h
diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
index 60c3d5c3fa3acc0444d422c689c29538b487506c..362174182321053400e4b6d5441361b747d8c8f3 100644
--- a/ui/gfx/transform.h
+++ b/ui/gfx/transform.h
@@ -120,6 +120,10 @@ class GFX_EXPORT Transform {
return !(matrix_.getType() & ~SkMatrix44::kTranslate_Mask);
}
+ // Returns true if the matrix is either identity or pure translation,
+ // allowing for an amount of inaccuracy as specified by the parameter.
+ bool IsApproximatelyIdentityOrTranslation(SkMScalar tolerance) const;
+
// Returns true if the matrix is either a positive scale and/or a translation.
bool IsPositiveScaleOrTranslation() const {
if (!IsScaleOrTranslation())
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | ui/gfx/transform.cc » ('j') | ui/gfx/transform.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698