Code cleanup
Change-Id: If92e3addfc4d8546a60edcdea60a1fc89c27b680
diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp
index 516546f..a9f13f7 100644
--- a/libs/hwui/Program.cpp
+++ b/libs/hwui/Program.cpp
@@ -29,6 +29,8 @@
mInitialized = false;
mHasColorUniform = false;
+ // No need to cache compiled shaders, rely instead on Android's
+ // persistent shaders cache
GLuint vertexShader = buildShader(vertex, GL_VERTEX_SHADER);
if (vertexShader) {
@@ -135,10 +137,11 @@
const mat4& transformMatrix, bool offset) {
mat4 t(projectionMatrix);
if (offset) {
- // offset screenspace xy by an amount that compensates for typical precision issues
- // in GPU hardware that tends to paint hor/vert lines in pixels shifted up and to the left.
- // This offset value is based on an assumption that some hardware may use as little
- // as 12.4 precision, so we offset by slightly more than 1/16.
+ // offset screenspace xy by an amount that compensates for typical precision
+ // issues in GPU hardware that tends to paint hor/vert lines in pixels shifted
+ // up and to the left.
+ // This offset value is based on an assumption that some hardware may use as
+ // little as 12.4 precision, so we offset by slightly more than 1/16.
t.translate(.375, .375, 0);
}
t.multiply(transformMatrix);