From 889f8d1403761d5668115ced6cbb3f767cfe966d Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 29 Jul 2010 14:37:42 -0700 Subject: Moved all the rendering code to the new shader generator. The generator supports features that are not yet implement in the renderer: color matrix, lighting, porterduff color blending and composite shaders. This change also adds support for repeated/mirrored non-power of 2 bitmap shaders. Change-Id: I903a11a070c0eb9cc8850a60ef305751e5b47234 --- 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 b45920242b1f..0c31ba909ef5 100644 --- a/libs/hwui/Matrix.cpp +++ b/libs/hwui/Matrix.cpp @@ -152,6 +152,11 @@ void Matrix4::loadRotate(float angle, float x, float y, float z) { float s = sinf(angle); const float length = sqrtf(x * x + y * y + z * z); + float recipLen = 1.0f / length; + x *= recipLen; + y *= recipLen; + z *= recipLen; + const float nc = 1.0f - c; const float xy = x * y; const float yz = y * z; -- cgit v1.2.3-59-g8ed1b