summaryrefslogtreecommitdiff
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
author Chris Craik <ccraik@google.com> 2013-09-18 01:49:32 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-09-18 01:49:32 +0000
commita42ceb03cf6a1cbcd9f526afb02d806b2c200ee3 (patch)
tree78925e53817b579c4a7952b74900be75fa5492c1 /libs/hwui/Matrix.cpp
parent9b6459841e52b9d44ec8ec57af5eb8007841f93d (diff)
parentd965bc5823d878a3fd056b8a95fb4eb578ed3fe4 (diff)
Merge "Disallow negative scale matrices in merged Bitmap drawing" into klp-dev
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);
}