summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2012-10-15 12:38:33 -0700
committerJesse Hall <jessehall@google.com>2012-10-15 12:38:33 -0700
commit837d2f9e83e7d8625ef482d9c9d9afa852c8dbaa (patch)
tree80ff62df72771213acb9f096b7bc5acc71895cc1 /services
parent9bdaa60b809b223d14619d1f13afdd38acb1738d (diff)
downloadframeworks_native-837d2f9e83e7d8625ef482d9c9d9afa852c8dbaa.zip
frameworks_native-837d2f9e83e7d8625ef482d9c9d9afa852c8dbaa.tar.gz
frameworks_native-837d2f9e83e7d8625ef482d9c9d9afa852c8dbaa.tar.bz2
Always set vertex alpha when drawing screenshot layers
The screenshot is a GL_RGB texture, and the GL_REPLACE texture env mode uses vertex alpha for GL_RGB textures instead of alpha=1.0. Bug: 7340077 Change-Id: I6fbb907023e48f9c422b15a33da79757d6726840
Diffstat (limited to 'services')
-rw-r--r--services/surfaceflinger/LayerScreenshot.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/surfaceflinger/LayerScreenshot.cpp b/services/surfaceflinger/LayerScreenshot.cpp
index 1aa8c09..0fd744f 100644
--- a/services/surfaceflinger/LayerScreenshot.cpp
+++ b/services/surfaceflinger/LayerScreenshot.cpp
@@ -122,13 +122,14 @@ void LayerScreenshot::onDraw(const sp<const DisplayDevice>& hw, const Region& cl
} else {
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- glColor4f(alpha, alpha, alpha, alpha);
glTexEnvx(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
}
LayerMesh mesh;
computeGeometry(hw, &mesh);
+ glColor4f(alpha, alpha, alpha, alpha);
+
glDisable(GL_TEXTURE_EXTERNAL_OES);
glEnable(GL_TEXTURE_2D);