[webkit-changes] [WebKit/WebKit] 5948e8: [GTK] Prefer EGL over X11 where available
Víctor Manuel Jáquez Leal
noreply at github.com
Thu Sep 22 03:00:07 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5948e8b03d0ca94615e87db2d3435717e36a510c
https://github.com/WebKit/WebKit/commit/5948e8b03d0ca94615e87db2d3435717e36a510c
Author: Victor Jaquez <vjaquez at igalia.com>
Date: 2022-09-22 (Thu, 22 Sep 2022)
Changed paths:
M Source/WebCore/platform/graphics/GLContext.cpp
M Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
M Source/WebCore/platform/graphics/egl/GLContextEGL.h
M Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp
M Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
Log Message:
-----------
[GTK] Prefer EGL over X11 where available
https://bugs.webkit.org/show_bug.cgi?id=236163
Reviewed by Žan Doberšek.
Patch Authored by Carlos Garcia Campos <cgarcia at igalia.com> and Arcady Goldmints-Orlov.
* Source/WebCore/platform/graphics/GLContext.cpp:
(WebCore::GLContext::createContextForWindow): Create context from shared context if available. Then
create EGL context first and GLX later.
(WebCore::GLContext::createSharingContext): Create EGL shared context first and GLX later, if
WEBKIT_FORCE_GLX environment variable is not set.
* Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::getEGLConfig): Select visual compatible with window one, if compatible
function is available.
(WebCore::GLContextEGL::createWindowContext): If platform is X11 get window attributes and
instantiates a function for compatible to later compare it with specified visual id.
* Source/WebCore/platform/graphics/egl/GLContextEGL.h:
* Source/WebCore/platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp: Move and guard GstGL
headers.
(createGstGLDisplay): Use GstGLPlatform to select the display type.
(PlatformDisplay::tryEnsureGstGLContext const): Get GstGLPlatform from shared context.
* Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp:
(WebKit::openGLAPI): Simplify the API string creation.
(WebKit::WebKitProtocolHandler::handleGPU): Unify detection if EGL is used, before it assumed always
GLX if X11.
(WebKit::nativeInterface): Deleted.
Canonical link: https://commits.webkit.org/254751@main
More information about the webkit-changes
mailing list