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

Commit ae444b31 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: I576562ca8e6f002166cf0412bf33769bba3b8418
parents 5d91df21 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;
    }
}