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

Commit 77a9b4a6 authored by Jonathan Hamilton's avatar Jonathan Hamilton
Browse files

EGL: Fix error for eglCreateWindowSurface

The EGL 1.4 spec section 3.5.1 states that EGL_BAD_ALLOC should be set
if the supplied window already has an associated EGLSurface, not
EGL_BAD_NATIVE_WINDOW as is currently set.

Change-Id: If1598617f4e31904f2045560ae1cdf49d8a697dc
parent 67481607
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -295,7 +295,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
        if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
        if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) {
            ALOGE("EGLNativeWindowType %p already connected to another API",
            ALOGE("EGLNativeWindowType %p already connected to another API",
                    window);
                    window);
            return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE);
            return setError(EGL_BAD_ALLOC, EGL_NO_SURFACE);
        }
        }


        // set the native window's buffers format to match this config
        // set the native window's buffers format to match this config