summaryrefslogtreecommitdiffstats
path: root/libs/hwui/Matrix.cpp
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-07-29 14:37:42 -0700
committerRomain Guy <romainguy@google.com>2010-07-29 14:37:42 -0700
commit889f8d1403761d5668115ced6cbb3f767cfe966d (patch)
tree8620d3453e3811dce152630f1b17e0f5f42601c6 /libs/hwui/Matrix.cpp
parent85d8daa889db113b51c5d98929245e80f7277388 (diff)
downloadframeworks_base-889f8d1403761d5668115ced6cbb3f767cfe966d.zip
frameworks_base-889f8d1403761d5668115ced6cbb3f767cfe966d.tar.gz
frameworks_base-889f8d1403761d5668115ced6cbb3f767cfe966d.tar.bz2
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
Diffstat (limited to 'libs/hwui/Matrix.cpp')
-rw-r--r--libs/hwui/Matrix.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/hwui/Matrix.cpp b/libs/hwui/Matrix.cpp
index b459202..0c31ba9 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;