From be1b127c7bec252e0c6ab0e06ed6babed07d496f Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 6 Jun 2013 14:02:54 -0700 Subject: 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 --- libs/hwui/Image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui/Image.cpp') diff --git a/libs/hwui/Image.cpp b/libs/hwui/Image.cpp index 77c2300..edf3930 100644 --- a/libs/hwui/Image.cpp +++ b/libs/hwui/Image.cpp @@ -54,7 +54,7 @@ Image::~Image() { eglDestroyImageKHR(eglGetDisplay(EGL_DEFAULT_DISPLAY), mImage); mImage = EGL_NO_IMAGE_KHR; - glDeleteTextures(1, &mTexture); + Caches::getInstance().deleteTexture(mTexture); mTexture = 0; } } -- cgit v1.1