Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4b32280 authored by Daniel Lam's avatar Daniel Lam Committed by Mathias Agopian
Browse files

SurfaceTexture: detachFromContext fixed

Fixed AttachToContextSucceeds test SurfaceTexture test by
not deleting the current texture when cleaning up memory.

Bug: 6363186
Change-Id: Ib886bfe6bb86e25ea4825d18b5008afba6b33eae
parent 2488b20a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
        }