summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-06-28 19:54:17 -0700
committerMathias Agopian <mathias@google.com>2010-06-28 19:54:17 -0700
commit8fa4c811e6d0da82282f9db1a32706399ee538bc (patch)
tree7605cedca3a805f2845df27b8a5094f6901abf7c /libs
parent781953d62dc17d761e39540f0480e5ca7451cdbe (diff)
downloadframeworks_base-8fa4c811e6d0da82282f9db1a32706399ee538bc.zip
frameworks_base-8fa4c811e6d0da82282f9db1a32706399ee538bc.tar.gz
frameworks_base-8fa4c811e6d0da82282f9db1a32706399ee538bc.tar.bz2
fix[2798925] Gingerbread TOT not booting
Fixed a typo where checking against the wrong constant caused GL_TEXTURE_EXTERNAL_OES to be used with a regular texture, which some GL driver will choke on. Change-Id: I93dfc4c8fa674433bbb678eee31954e9a8d0cb4b
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaceflinger/TextureManager.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/libs/surfaceflinger/TextureManager.cpp b/libs/surfaceflinger/TextureManager.cpp
index e4dd42f..fa19256 100644
--- a/libs/surfaceflinger/TextureManager.cpp
+++ b/libs/surfaceflinger/TextureManager.cpp
@@ -297,22 +297,19 @@ status_t TextureManager::loadTexture(Texture* texture,
void TextureManager::activateTexture(const Texture& texture, bool filter)
{
const GLenum target = getTextureTarget(&texture);
- if (target == Texture::TEXTURE_2D) {
+ if (target == GL_TEXTURE_2D) {
glBindTexture(GL_TEXTURE_2D, texture.name);
glEnable(GL_TEXTURE_2D);
#if defined(GL_OES_texture_external)
if (GLExtensions::getInstance().haveTextureExternal()) {
glDisable(GL_TEXTURE_EXTERNAL_OES);
}
-#endif
- }
-#if defined(GL_OES_texture_external)
- else {
+ } else {
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture.name);
glEnable(GL_TEXTURE_EXTERNAL_OES);
glDisable(GL_TEXTURE_2D);
- }
#endif
+ }
if (filter) {
glTexParameterx(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);