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

Commit b922a7b4 authored by Weiwan Liu's avatar Weiwan Liu Committed by Yiwei Zhang
Browse files

EGL: add a missing native_window_api_disconnect

Add a native_window_api_disconnect for the case where
processAttributes() fails. Otherwise the next time this
function is called, it'll fail because native window is
still connected to the first API.

Test: NV internal regression tests including dEQP
Test: EGL_test --gtest_filter=EGLTest.EGLCreateWindowFailAndSucceed

Change-Id: I89712acf5ac40927e975357797a271c1bb680dbc
Merged-In: I89712acf5ac40927e975357797a271c1bb680dbc
parent ab4f07e3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -720,6 +720,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
        if (!processAttributes(dp, window, attrib_list, &colorSpace,
                               &strippedAttribList)) {
            ALOGE("error invalid colorspace: %d", colorSpace);
            native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL);
            return EGL_NO_SURFACE;
        }
        attrib_list = strippedAttribList.data();