diff options
| author | 2013-06-07 00:07:05 +0000 | |
|---|---|---|
| committer | 2013-06-07 00:07:05 +0000 | |
| commit | 241ef0cc4271bc3f6cf462bfc442d52cd2286f00 (patch) | |
| tree | 36bf50894cc8bd08a0d738a2473ad4d7d05461c1 /libs/hwui/Texture.h | |
| parent | 494cb689d09a82025b9d892241e62aa149ce3239 (diff) | |
| parent | be1b127c7bec252e0c6ab0e06ed6babed07d496f (diff) | |
Merge "Assume a texture is unbound after deleting it Bug #9316260"
Diffstat (limited to 'libs/hwui/Texture.h')
| -rw-r--r-- | libs/hwui/Texture.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/hwui/Texture.h b/libs/hwui/Texture.h index d249741f703b..d48ec5924d62 100644 --- a/libs/hwui/Texture.h +++ b/libs/hwui/Texture.h @@ -52,6 +52,11 @@ public: bool force = false, GLenum renderTarget = GL_TEXTURE_2D); /** + * Convenience method to call glDeleteTextures() on this texture's id. + */ + void deleteTexture() const; + + /** * Name of the texture. */ GLuint id; @@ -113,7 +118,7 @@ public: AutoTexture(const Texture* texture): mTexture(texture) { } ~AutoTexture() { if (mTexture && mTexture->cleanup) { - glDeleteTextures(1, &mTexture->id); + mTexture->deleteTexture(); delete mTexture; } } |