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

Commit ab39221f authored by Jason Macnak's avatar Jason Macnak Committed by Automerger Merge Worker
Browse files

Merge "Avoid trying to disconnect twice with ANGLE" into sc-dev am: 46fcc6b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14986479

Change-Id: Idb4cb141bdf15920d49baa071b0ac12acc5ec337
parents e32e7098 46fcc6b3
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -82,10 +82,14 @@ egl_surface_t::~egl_surface_t() {

void egl_surface_t::disconnect() {
    if (win != nullptr && connected) {
        // NOTE: When using Vulkan backend, the Vulkan runtime makes all the
        // native_window_* calls, so don't do them here.
        if (!cnx->useAngle) {
            native_window_set_buffers_format(win, 0);
            if (native_window_api_disconnect(win, NATIVE_WINDOW_API_EGL)) {
                ALOGW("EGLNativeWindowType %p disconnect failed", win);
            }
        }
        connected = false;
    }
}