summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2013-08-23 16:12:34 -0700
committerMathias Agopian <mathias@google.com>2013-08-23 16:12:34 -0700
commitbcab7b17b1c5476935a6f2f916922b4eb57991a4 (patch)
tree1df7c9635cad466901fdbc88745671a9a86fbeeb /services
parent464febc44908fb4a8fca9e513ba8469750dde838 (diff)
downloadframeworks_native-bcab7b17b1c5476935a6f2f916922b4eb57991a4.zip
frameworks_native-bcab7b17b1c5476935a6f2f916922b4eb57991a4.tar.gz
frameworks_native-bcab7b17b1c5476935a6f2f916922b4eb57991a4.tar.bz2
fix DimLayer in GLES2.0 SF
DimLayer state wasn't initialized properly. Bug: 10442967 Change-Id: I384c1d85c58c96ae29d5daa1fabee9f4ce003501
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
index dcad390..cde1e3a 100644
--- a/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
+++ b/services/surfaceflinger/RenderEngine/GLES20RenderEngine.cpp
@@ -116,7 +116,11 @@ void GLES20RenderEngine::setupLayerBlending(
}
void GLES20RenderEngine::setupDimLayerBlending(int alpha) {
- mState.setPlaneAlpha(alpha / 255.0f);
+ mState.setPlaneAlpha(1.0f);
+ mState.setPremultipliedAlpha(true);
+ mState.setOpaque(false);
+ mState.setColor(0, 0, 0, alpha/255.0f);
+ mState.disableTexture();
if (alpha == 0xFF) {
glDisable(GL_BLEND);
@@ -124,7 +128,6 @@ void GLES20RenderEngine::setupDimLayerBlending(int alpha) {
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}
- disableTexturing();
}
void GLES20RenderEngine::setupLayerTexturing(const Texture& texture) {