diff options
author | Chris Craik <ccraik@google.com> | 2013-09-20 17:13:18 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2013-09-20 17:25:31 -0700 |
commit | 996fe656340ede058a6f0e6b18f9ec525ddb4e27 (patch) | |
tree | 7efca330f6633eb665b611469f1149dabb1383a5 /libs/hwui/Matrix.cpp | |
parent | 564c45b976b56bc33f18271e1c813a0bd91b2eb4 (diff) | |
download | frameworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.zip frameworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.tar.gz frameworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.tar.bz2 |
Correct bitmap merging logic
bug:10863163
This fixes two issues
The check for pure translation was incorrect. It was fixed and renamed
for clarity.
Certain matrix paths weren't setting kTypePositiveScale. For
simplicity (and because positive scale is simple to check) removed
flag in favor of dynamic checking.
Change-Id: Ic5ce235653ef49a68b8b242bd89fc2e95874ecc9
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r-- | libs/hwui/Matrix.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 1948778..ba22071 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -110,10 +110,6 @@ uint8_t Matrix4::getType() const { mType |= kTypeRectToRect; } } - - if (m00 > 0.0f && m11 > 0.0f) { - mType |= kTypePositiveScale; - } } return mType; } @@ -127,7 +123,7 @@ bool Matrix4::rectToRect() const { } bool Matrix4::positiveScale() const { - return getType() & kTypePositiveScale; + return (data[kScaleX] > 0.0f && data[kScaleY] > 0.0f); } bool Matrix4::changesBounds() const { |