diff options
author | 2013-09-17 18:56:18 -0700 | |
---|---|---|
committer | 2013-09-17 18:56:18 -0700 | |
commit | e08e6632294143f889ab68f0c3453ee6802dc60e (patch) | |
tree | 95d6cf6296ab180504dd65c1457ec6e445abde10 /libs/hwui/Matrix.cpp | |
parent | cd93486d20a22832b5c831f9235cb991ec6dd31d (diff) | |
parent | 7cb404dda770da24aaf1b484d6575d5480cf080f (diff) |
am 7cb404dd: am a42ceb03: Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev
* commit '7cb404dda770da24aaf1b484d6575d5480cf080f':
Disallow negative scale matrices in merged Bitmap drawing
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r-- | libs/hwui/Matrix.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 65e7eae49c2d..1948778ceb7c 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -110,6 +110,10 @@ uint8_t Matrix4::getType() const { mType |= kTypeRectToRect; } } + + if (m00 > 0.0f && m11 > 0.0f) { + mType |= kTypePositiveScale; + } } return mType; } @@ -122,6 +126,10 @@ bool Matrix4::rectToRect() const { return getType() & kTypeRectToRect; } +bool Matrix4::positiveScale() const { + return getType() & kTypePositiveScale; +} + bool Matrix4::changesBounds() const { return getType() & (kTypeScale | kTypeAffine | kTypePerspective); } |