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

Commit 32341381 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

only abort when errors happen on the main display

Bug: 7232690
Change-Id: I2c4b35a82f131da26deea738ef294e100e536d15
parent 7b190511
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -228,12 +228,15 @@ void DisplayDevice::swapBuffers(HWComposer& hwc) const {
        }
        }
    }
    }


    // TODO: we should at least handle EGL_CONTEXT_LOST, by recreating the
    if (!success) {
    // context and resetting our state.
        EGLint error = eglGetError();
    LOG_ALWAYS_FATAL_IF(!success,
        if (error == EGL_CONTEXT_LOST ||
            "eglSwapBuffers(%p, %p) failed with 0x%8x",
                mType == DisplayDevice::DISPLAY_PRIMARY) {
            LOG_ALWAYS_FATAL("eglSwapBuffers(%p, %p) failed with 0x%08x",
                    mDisplay, mSurface, eglGetError());
                    mDisplay, mSurface, eglGetError());
        }
        }
    }
}


void DisplayDevice::onSwapBuffersCompleted(HWComposer& hwc) const {
void DisplayDevice::onSwapBuffersCompleted(HWComposer& hwc) const {
    if (hwc.initCheck() == NO_ERROR) {
    if (hwc.initCheck() == NO_ERROR) {