summaryrefslogtreecommitdiff
path: root/libs/hwui/LayerRenderer.cpp
diff options
context:
space:
mode:
author Romain Guy <romainguy@google.com> 2013-06-06 14:02:54 -0700
committer Romain Guy <romainguy@google.com> 2013-06-06 16:26:51 -0700
commitbe1b127c7bec252e0c6ab0e06ed6babed07d496f (patch)
treeeaab57886d7cd44e10da155d3dc6188a30b2b17b /libs/hwui/LayerRenderer.cpp
parentf69913056b8c6000ff0306573a97971702e8d35a (diff)
Assume a texture is unbound after deleting it
Bug #9316260 The GL specification indicates that deleting a bound texture has the side effect of binding the default texture (name=0). This change replaces all calls to glDeleteTextures() by Caches::deleteTexture() to properly keep track of texture bindings. Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
Diffstat (limited to 'libs/hwui/LayerRenderer.cpp')
-rw-r--r--libs/hwui/LayerRenderer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 987daae46c34..79e0b0cee8cb 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -498,7 +498,7 @@ error:
glBindFramebuffer(GL_FRAMEBUFFER, previousFbo);
layer->setAlpha(alpha, mode);
layer->setFbo(previousLayerFbo);
- glDeleteTextures(1, &texture);
+ caches.deleteTexture(texture);
caches.fboCache.put(fbo);
glViewport(previousViewport[0], previousViewport[1],
previousViewport[2], previousViewport[3]);