summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-05-07 13:20:00 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-07 13:20:00 -0700
commit4bbcae7eb80704d919d8115d523196798e208439 (patch)
treec6a50af0b94836f8adec0acbe058003e8922c51c /libs
parentd8efe42496806b483bbacea28d2456e8b2eac4fb (diff)
parentd3efd6920e64d0207a0655640297d87d4937ee27 (diff)
downloadframeworks_base-4bbcae7eb80704d919d8115d523196798e208439.zip
frameworks_base-4bbcae7eb80704d919d8115d523196798e208439.tar.gz
frameworks_base-4bbcae7eb80704d919d8115d523196798e208439.tar.bz2
Merge "Fix issue where scale-animating text would jump temporarily a few pixels" into jb-dev
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/DisplayListRenderer.h2
-rw-r--r--libs/hwui/Matrix.cpp11
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() {