summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2010-12-14 11:52:02 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-14 11:52:02 -0800
commitb36ba1d6d761d32b31f7140f25dec2538c12b1d2 (patch)
treeaa71f41007f3a2ee0c7bad009411e1c560409b25 /libs
parent300ed2cda606c38cbfe4dc41d500c5ff0855af00 (diff)
parent5536841e5452172e7772d84ad5f4a2fc7059c9dd (diff)
downloadframeworks_base-b36ba1d6d761d32b31f7140f25dec2538c12b1d2.zip
frameworks_base-b36ba1d6d761d32b31f7140f25dec2538c12b1d2.tar.gz
frameworks_base-b36ba1d6d761d32b31f7140f25dec2538c12b1d2.tar.bz2
Merge "OpenGLRenderer would not render colors < ALPHA_THRESHOLD Bug #3282805"
Diffstat (limited to 'libs')
-rw-r--r--libs/hwui/OpenGLRenderer.cpp10
-rw-r--r--libs/hwui/OpenGLRenderer.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index a8fe646..46fdc31 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -925,11 +925,17 @@ void OpenGLRenderer::setupDrawModelView(float left, float top, float right, floa
}
void OpenGLRenderer::setupDrawColorUniforms() {
- if (mColorSet && mSetShaderColor) {
+ if (mColorSet || (mShader && mSetShaderColor)) {
mCaches.currentProgram->setColor(mColorR, mColorG, mColorB, mColorA);
}
}
+void OpenGLRenderer::setupDrawColorAlphaUniforms() {
+ if (mSetShaderColor) {
+ mCaches.currentProgram->setColor(mColorA, mColorA, mColorA, mColorA);
+ }
+}
+
void OpenGLRenderer::setupDrawShaderUniforms(bool ignoreTransform) {
if (mShader) {
if (ignoreTransform) {
@@ -1721,7 +1727,7 @@ void OpenGLRenderer::drawTextureMesh(float left, float top, float right, float b
} else {
setupDrawModelViewTranslate(left, top, right, bottom, ignoreTransform);
}
- setupDrawColorUniforms();
+ setupDrawColorAlphaUniforms();
setupDrawColorFilterUniforms();
setupDrawTexture(texture);
setupDrawMesh(vertices, texCoords, vbo);
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 82b27b0..5d8653d 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -443,6 +443,7 @@ private:
void setupDrawModelViewTranslate(float left, float top, float right, float bottom,
bool ignoreTransform = false);
void setupDrawColorUniforms();
+ void setupDrawColorAlphaUniforms();
void setupDrawShaderUniforms(bool ignoreTransform = false);
void setupDrawColorFilterUniforms();
void setupDrawSimpleMesh();