Title: [250205] releases/WebKitGTK/webkit-2.26/Source/WebCore
Revision
250205
Author
carlo...@webkit.org
Date
2019-09-23 01:21:04 -0700 (Mon, 23 Sep 2019)

Log Message

Merge r249951 - [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
https://bugs.webkit.org/show_bug.cgi?id=201505

Reviewed by Žan Doberšek.

This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.

* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
eglCreateWindowSurface().

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog (250204 => 250205)


--- releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog	2019-09-23 08:21:01 UTC (rev 250204)
+++ releases/WebKitGTK/webkit-2.26/Source/WebCore/ChangeLog	2019-09-23 08:21:04 UTC (rev 250205)
@@ -1,3 +1,17 @@
+2019-09-17  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK] Cannot create EGL window surface: EGL_BAD_ALLOC
+        https://bugs.webkit.org/show_bug.cgi?id=201505
+
+        Reviewed by Žan Doberšek.
+
+        This happens because eglCreateWindowSurface() is called twice for the same window when not using the WPE
+        renderer. New versions of Mesa fail the second time with a EGL_BAD_ALLOC.
+
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::createWindowContext): Check surface is nullptr before falling back to use
+        eglCreateWindowSurface().
+
 2019-09-12  Adrian Perez de Castro  <ape...@igalia.com>
 
         [GTK][WPE] webkit_settings_set_user_agent() allows content forbidden in HTTP headers

Modified: releases/WebKitGTK/webkit-2.26/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp (250204 => 250205)


--- releases/WebKitGTK/webkit-2.26/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp	2019-09-23 08:21:01 UTC (rev 250204)
+++ releases/WebKitGTK/webkit-2.26/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp	2019-09-23 08:21:04 UTC (rev 250205)
@@ -188,7 +188,8 @@
     if (platformDisplay.type() == PlatformDisplay::Type::WPE)
         surface = createWindowSurfaceWPE(display, config, window);
 #else
-    surface = eglCreateWindowSurface(display, config, static_cast<EGLNativeWindowType>(window), nullptr);
+    if (surface == EGL_NO_SURFACE)
+        surface = eglCreateWindowSurface(display, config, static_cast<EGLNativeWindowType>(window), nullptr);
 #endif
     if (surface == EGL_NO_SURFACE) {
         WTFLogAlways("Cannot create EGL window surface: %s\n", lastErrorString());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to