OSDN Git Service

Fix GL texture binding for TextureViews
authorChris Craik <ccraik@google.com>
Wed, 27 May 2015 18:06:21 +0000 (11:06 -0700)
committerChris Craik <ccraik@google.com>
Wed, 27 May 2015 18:06:22 +0000 (11:06 -0700)
bug:21431334

Should be explicitly passing target through, to ensure
GL_EXTERNAL_OES textures are bound correctly.

Change-Id: I997672ae292ea7fc016c02a59a3c7c8358ecfe0b

libs/hwui/renderstate/RenderState.cpp

index e54fa5a..bde91cc 100644 (file)
@@ -265,10 +265,10 @@ void RenderState::render(const Glop& glop) {
         mCaches->textureState().activateTexture(0);
 
         if (texture.clamp != GL_INVALID_ENUM) {
-            texture.texture->setWrap(texture.clamp, true);
+            texture.texture->setWrap(texture.clamp, true, false, texture.target);
         }
         if (texture.filter != GL_INVALID_ENUM) {
-            texture.texture->setFilter(texture.filter, true);
+            texture.texture->setFilter(texture.filter, true, false, texture.target);
         }
 
         mCaches->textureState().bindTexture(texture.target, texture.texture->id);