summaryrefslogtreecommitdiff
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2013-09-17 18:53:11 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2013-09-17 18:53:11 -0700
commit7cb404dda770da24aaf1b484d6575d5480cf080f (patch)
tree3dcacbd111f82a63aa32e01071bddc0c16450946 /libs/hwui/Matrix.cpp
parent30a1707a5f7798ed5f885e1aa8c809ce2aa2aa68 (diff)
parenta42ceb03cf6a1cbcd9f526afb02d806b2c200ee3 (diff)
am a42ceb03: Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev
* commit 'a42ceb03cf6a1cbcd9f526afb02d806b2c200ee3': Disallow negative scale matrices in merged Bitmap drawing
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r--libs/hwui/Matrix.cpp8
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);
}