| Index: ui/gfx/transform.h
|
| diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
|
| index 10885bd3aaff9d3c345fe948a6744bb6ee93ebb4..48261f4eeaa0441864b6935ac50d6075f10b1ec8 100644
|
| --- a/ui/gfx/transform.h
|
| +++ b/ui/gfx/transform.h
|
| @@ -116,6 +116,14 @@ class UI_EXPORT Transform {
|
| // translation.
|
| bool IsIdentityOrIntegerTranslation() const;
|
|
|
| + // These "Almost" methods check if the transform is very near to meet the
|
| + // conditions. Useful when the transform has been computed many steps and
|
| + // contains tiny errors but can still be treated as meeting the conditions
|
| + // approximately.
|
| + bool IsAlmostIdentity() const;
|
| + bool IsAlmostIdentityOrTranslation() const;
|
| + bool IsAlmostIdentityOrIntegerTranslation() const;
|
| +
|
| // Returns true if the matrix is has only scaling and translation components.
|
| bool IsScaleOrTranslation() const {
|
| int mask = SkMatrix44::kScale_Mask | SkMatrix44::kTranslate_Mask;
|
|
|