Title: [290299] trunk/Source/WebCore
Revision
290299
Author
[email protected]
Date
2022-02-22 02:29:37 -0800 (Tue, 22 Feb 2022)

Log Message

Properly uninitialize EGL display before termination
https://bugs.webkit.org/show_bug.cgi?id=236766

>From the docs [1], if contexts or surfaces associated with display
is current to any thread, they are not released until they
are no longer current as a result of eglMakeCurrent.

So call eglMakeCurrent() to such effect.

[1] https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglMakeCurrent.xhtml

Reviewed by Carlos Garcia Campos.

* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::terminateEGLDisplay):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (290298 => 290299)


--- trunk/Source/WebCore/ChangeLog	2022-02-22 10:25:37 UTC (rev 290298)
+++ trunk/Source/WebCore/ChangeLog	2022-02-22 10:29:37 UTC (rev 290299)
@@ -1,3 +1,21 @@
+2022-02-22  Pablo Saavedra  <[email protected]>
+
+        Properly uninitialize EGL display before termination
+        https://bugs.webkit.org/show_bug.cgi?id=236766
+
+        From the docs [1], if contexts or surfaces associated with display
+        is current to any thread, they are not released until they
+        are no longer current as a result of eglMakeCurrent.
+
+        So call eglMakeCurrent() to such effect.
+
+        [1] https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglMakeCurrent.xhtml
+
+        Reviewed by Carlos Garcia Campos.
+
+        * platform/graphics/PlatformDisplay.cpp:
+        (WebCore::PlatformDisplay::terminateEGLDisplay):
+
 2022-02-22  Chris Dumez  <[email protected]>
 
         Avoid having to iterate the whole frame tree(s) every time we need to dispatch storage events

Modified: trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp (290298 => 290299)


--- trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp	2022-02-22 10:25:37 UTC (rev 290298)
+++ trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp	2022-02-22 10:29:37 UTC (rev 290299)
@@ -278,6 +278,7 @@
     ASSERT(m_eglDisplayInitialized);
     if (m_eglDisplay == EGL_NO_DISPLAY)
         return;
+    eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
     eglTerminate(m_eglDisplay);
     m_eglDisplay = EGL_NO_DISPLAY;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to