diff options
author | 2010-06-24 21:22:43 -0700 | |
---|---|---|
committer | 2010-06-24 21:28:59 -0700 | |
commit | 01e4483b29d849fcbaa53dcdbad58201b13a6588 (patch) | |
tree | 05ab785ac2b7063745f82319e3623e90d0beeebd /libs/surfaceflinger/LayerDim.cpp | |
parent | 9a4a1d71042fd600f83f1130e18e80983428db21 (diff) |
fix [2793164] Spam 2x/second with TOT master in SurfaceFlinger
Make sure to not use GL_TEXTURE_EXTERNAL when it's not supported
by the GL. The error was harmless, but annoying.
Change-Id: I571a9a9b05d35da51420950a6a6e95629067efd0
Diffstat (limited to 'libs/surfaceflinger/LayerDim.cpp')
-rw-r--r-- | libs/surfaceflinger/LayerDim.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/surfaceflinger/LayerDim.cpp b/libs/surfaceflinger/LayerDim.cpp index 906a583af8..c13b4b37da 100644 --- a/libs/surfaceflinger/LayerDim.cpp +++ b/libs/surfaceflinger/LayerDim.cpp @@ -112,15 +112,17 @@ 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 GGLfixed alpha = (s.alpha << 16)/255; + const GLfloat alpha = s.alpha/255.0f; const uint32_t fbHeight = hw.getHeight(); glDisable(GL_DITHER); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - glColor4x(0, 0, 0, alpha); - + glColor4f(0, 0, 0, alpha); + #if defined(GL_OES_texture_external) - glDisable(GL_TEXTURE_EXTERNAL_OES); + if (GLExtensions::getInstance().haveTextureExternal()) { + glDisable(GL_TEXTURE_EXTERNAL_OES); + } #endif #if defined(DIM_WITH_TEXTURE) && defined(EGL_ANDROID_image_native_buffer) if (sUseTexture) { |