SurfaceTexture: detachFromContext fixed
Fixed AttachToContextSucceeds test SurfaceTexture test by not deleting the current texture when cleaning up memory. Bug: 6363186 Change-Id: Ib886bfe6bb86e25ea4825d18b5008afba6b33eae
This commit is contained in:
parent
2488b20aec
commit
f4b322801d
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user