diff options
author | Romain Guy <romainguy@google.com> | 2010-12-14 11:52:02 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-14 11:52:02 -0800 |
commit | b36ba1d6d761d32b31f7140f25dec2538c12b1d2 (patch) | |
tree | aa71f41007f3a2ee0c7bad009411e1c560409b25 /libs | |
parent | 300ed2cda606c38cbfe4dc41d500c5ff0855af00 (diff) | |
parent | 5536841e5452172e7772d84ad5f4a2fc7059c9dd (diff) | |
download | frameworks_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.cpp | 10 | ||||
-rw-r--r-- | libs/hwui/OpenGLRenderer.h | 1 |
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(); |