diff options
author | Chet Haase <chet@google.com> | 2012-05-07 13:21:52 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-05-07 13:21:52 -0700 |
commit | 48fa47174268a7e94e3e39fdd02785d97be3d446 (patch) | |
tree | 67ee3bc66727afbf2f0c7cdda1a2f3a58a35ee27 /libs | |
parent | 22135e46b167ed45337ba41bd306d93e5fa67841 (diff) | |
parent | 4bbcae7eb80704d919d8115d523196798e208439 (diff) | |
download | frameworks_base-48fa47174268a7e94e3e39fdd02785d97be3d446.zip frameworks_base-48fa47174268a7e94e3e39fdd02785d97be3d446.tar.gz frameworks_base-48fa47174268a7e94e3e39fdd02785d97be3d446.tar.bz2 |
am 4bbcae7e: Merge "Fix issue where scale-animating text would jump temporarily a few pixels" into jb-dev
* commit '4bbcae7eb80704d919d8115d523196798e208439':
Fix issue where scale-animating text would jump temporarily a few pixels
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/DisplayListRenderer.h | 2 | ||||
-rw-r--r-- | libs/hwui/Matrix.cpp | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 4edefd5..5ce770d 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -255,7 +255,7 @@ public: if (scaleY != mScaleY) { mScaleY = scaleY; mMatrixDirty = true; - if (ALMOST_EQUAL(mScaleX, 1) && ALMOST_EQUAL(mScaleY, 1)) { + if (mScaleX == 1.0f && mScaleY == 1.0f) { mMatrixFlags &= ~SCALE; } else { mMatrixFlags |= SCALE; diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index a8f937d..7348f4d 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -56,16 +56,13 @@ void Matrix4::loadIdentity() { } bool Matrix4::changesBounds() { - return !(ALMOST_EQUAL(data[0], 1.0f) && ALMOST_EQUAL(data[1], 0.0f) && - ALMOST_EQUAL(data[2], 0.0f) && ALMOST_EQUAL(data[4], 0.0f) && - ALMOST_EQUAL(data[5], 1.0f) && ALMOST_EQUAL(data[6], 0.0f) && - ALMOST_EQUAL(data[8], 0.0f) && ALMOST_EQUAL(data[9], 0.0f) && - ALMOST_EQUAL(data[10], 1.0f)); + return !(data[0] == 1.0f && data[1] == 0.0f && data[2] == 0.0f && data[4] == 0.0f && + data[5] == 1.0f && data[6] == 0.0f && data[8] == 0.0f && data[9] == 0.0f && + data[10] == 1.0f); } bool Matrix4::isPureTranslate() { - return mSimpleMatrix && - ALMOST_EQUAL(data[kScaleX], 1.0f) && ALMOST_EQUAL(data[kScaleY], 1.0f); + return mSimpleMatrix && data[kScaleX] == 1.0f && data[kScaleY] == 1.0f; } bool Matrix4::isSimple() { |