| Index: ui/gfx/transform.h
|
| diff --git a/ui/gfx/transform.h b/ui/gfx/transform.h
|
| index 95de30fa3f4c0d3275c19cd61c3e4663f232c38f..a9e5997114f21414291c7ee2afe8394986bc3ece 100644
|
| --- a/ui/gfx/transform.h
|
| +++ b/ui/gfx/transform.h
|
| @@ -91,6 +91,15 @@ class UI_EXPORT Transform {
|
| return !(matrix_.getType() & ~SkMatrix44::kTranslate_Mask);
|
| }
|
|
|
| + // Returns true if the matrix is either a positive scale and/or a translation.
|
| + bool IsPositiveScaleOrTranslation() const {
|
| + if (!IsScaleOrTranslation())
|
| + return false;
|
| + return matrix_.getDouble(0, 0) > 0.0 &&
|
| + matrix_.getDouble(1, 1) > 0.0 &&
|
| + matrix_.getDouble(2, 2) > 0.0;
|
| + }
|
| +
|
| // Returns true if the matrix is either identity or pure, non-fractional
|
| // translation.
|
| bool IsIdentityOrIntegerTranslation() const;
|
|
|