From 624234f69b2a4781d24f3e4c6ae6450729e38397 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 5 Mar 2013 16:43:31 -0800 Subject: Take only the scale params into account to rasterize text This change extracts the scale parameters of the current transform to pass then to the font renderer. Rotation and perspective are applied to the generated mesh inside the vertex shader. This limits the number of glyphs we have to create in the font cache and thus reduces memory churn. Change-Id: Ic5b3bae2b2b0e0250a8ee723b071a1709725c749 --- libs/hwui/Matrix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/hwui/Matrix.cpp') diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp index 204e8f564f11..6a5ea510482b 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -232,11 +232,11 @@ void Matrix4::copyTo(float* v) const { memcpy(v, data, sizeof(data)); } -float Matrix4::getTranslateX() { +float Matrix4::getTranslateX() const { return data[kTranslateX]; } -float Matrix4::getTranslateY() { +float Matrix4::getTranslateY() const { return data[kTranslateY]; } -- cgit v1.2.3-59-g8ed1b