summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/LayerDim.cpp
diff options
context:
space:
mode:
author Andreas Huber <andih@google.com> 2010-06-25 09:25:19 -0700
committer Andreas Huber <andih@google.com> 2010-06-25 11:05:37 -0700
commit330dd304a471d260a73e342a240921c03c825f99 (patch)
treedc4fb488faab0e0f3fac616cb8cb58632cf32d7b /libs/surfaceflinger/LayerDim.cpp
parent357f8209f3aec63fa2779da4eeab8825f80b0a41 (diff)
Revert "fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger"
This reverts commit 081bc5c47d8a980e6eafa70ddafcd89981586391.
Diffstat (limited to 'libs/surfaceflinger/LayerDim.cpp')
-rw-r--r--libs/surfaceflinger/LayerDim.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp
index c13b4b37da2c..906a583af835 100644
--- a/libs/surfaceflinger/LayerDim.cpp
+++ b/libs/surfaceflinger/LayerDim.cpp
@@ -112,17 +112,15 @@ void LayerDim::onDraw(const Region& clip) const
Region::const_iterator const end = clip.end();
if (s.alpha>0 && (it != end)) {
const DisplayHardware& hw(graphicPlane(0).displayHardware());
- const GLfloat alpha = s.alpha/255.0f;
+ const GGLfixed alpha = (s.alpha << 16)/255;
const uint32_t fbHeight = hw.getHeight();
glDisable(GL_DITHER);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- glColor4f(0, 0, 0, alpha);
-
+ glColor4x(0, 0, 0, alpha);
+
#if defined(GL_OES_texture_external)
- if (GLExtensions::getInstance().haveTextureExternal()) {
- glDisable(GL_TEXTURE_EXTERNAL_OES);
- }
+ glDisable(GL_TEXTURE_EXTERNAL_OES);
#endif
#if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer)
if (sUseTexture) {