summaryrefslogtreecommitdiff
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2016-02-29 12:52:33 -0800
committerChris Craik <ccraik@google.com>2016-02-29 13:10:25 -0800
commit261725fdb2962271c222a049fcdf57bbdc8363c7 (patch)
tree09f05cac5f998703e0766dc62d7f033b21b947d9 /libs/hwui/Matrix.cpp
parenteefb17ac61698e1b1fe9ed9e6e4d3695d3100053 (diff)
Fix matrix mapping of negative rects
bug:27381362 Also rejects ops with empty clip at record time, and short circuits clip intersection, when one is empty. Change-Id: I842612da14ad8fd9f1ba5e9e4fd027ba4e08d365
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r--libs/hwui/Matrix.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index 73ebd1304750..deab95690d0e 100644
--- a/libs/hwui/Matrix.cpp
+++ b/libs/hwui/Matrix.cpp
@@ -438,7 +438,7 @@ void Matrix4::mapPoint(float& x, float& y) const {
}
void Matrix4::mapRect(Rect& r) const {
- if (isIdentity()) return;
+ if (isIdentity() || r.isEmpty()) return;
if (isSimple()) {
MUL_ADD_STORE(r.left, data[kScaleX], data[kTranslateX]);