From 6620c6d413f972819fada92b574f0fa9e96d36c1 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 6 Dec 2010 18:07:02 -0800 Subject: Correctly render text when coordinates are not integers. Bug #3225632 Change-Id: If09759e6e95eb2885362ab3ba088cf5aae64c7bf --- libs/hwui/Matrix.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs/hwui/Matrix.cpp') diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 7462d5bae208..fe7f8834a8b2 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -62,6 +62,11 @@ bool Matrix4::changesBounds() { ALMOST_EQUAL(data[10], 1.0f)); } +bool Matrix4::isPureTranslate() { + return mSimpleMatrix && + ALMOST_EQUAL(data[kScaleX], 1.0f) && ALMOST_EQUAL(data[kScaleY], 1.0f); +} + void Matrix4::load(const float* v) { memcpy(data, v, sizeof(data)); mSimpleMatrix = false; -- cgit v1.2.3-59-g8ed1b