From b922a7b478e48287b0c3246ad180efad77ca5cf1 Mon Sep 17 00:00:00 2001 From: Weiwan Liu Date: Thu, 27 Sep 2018 15:56:25 -0700 Subject: 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 --- opengl/libs/EGL/eglApi.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 087c1c1f39..0e095ddcf5 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -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(); -- cgit v1.2.3-59-g8ed1b