diff options
author | Daniel Lam <dalam@google.com> | 2012-04-18 21:29:19 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-04-24 17:25:00 -0700 |
commit | f4b322801d872b64f6c7dd2d2ffc1e4f8e993eef (patch) | |
tree | 075064dca4cbee6bf868c1a3cd0e466810771959 /libs/gui/SurfaceTexture.cpp | |
parent | 2488b20aec097accb20a853d9876bb0a5dc04636 (diff) | |
download | frameworks_native-f4b322801d872b64f6c7dd2d2ffc1e4f8e993eef.zip frameworks_native-f4b322801d872b64f6c7dd2d2ffc1e4f8e993eef.tar.gz frameworks_native-f4b322801d872b64f6c7dd2d2ffc1e4f8e993eef.tar.bz2 |
SurfaceTexture: detachFromContext fixed
Fixed AttachToContextSucceeds test SurfaceTexture test by
not deleting the current texture when cleaning up memory.
Bug: 6363186
Change-Id: Ib886bfe6bb86e25ea4825d18b5008afba6b33eae
Diffstat (limited to 'libs/gui/SurfaceTexture.cpp')
-rw-r--r-- | libs/gui/SurfaceTexture.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index 6562a94..8141227 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -351,7 +351,7 @@ status_t SurfaceTexture::detachFromContext() { // new EGLDisplay). for (int i =0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) { EGLImageKHR img = mEGLSlots[i].mEglImage; - if (img != EGL_NO_IMAGE_KHR) { + if (img != EGL_NO_IMAGE_KHR && i != mCurrentTexture) { eglDestroyImageKHR(mEglDisplay, img); mEGLSlots[i].mEglImage = EGL_NO_IMAGE_KHR; } |