[webkit-changes] [WebKit/WebKit] 5fa296: [GTK] Minibrowser does not render any content
Carlos Garcia Campos
noreply at github.com
Tue Apr 18 00:29:07 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5fa29667e2adc5d95e3db3f9a0bcd4190ce568e2
https://github.com/WebKit/WebKit/commit/5fa29667e2adc5d95e3db3f9a0bcd4190ce568e2
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2023-04-18 (Tue, 18 Apr 2023)
Changed paths:
M Source/WebCore/PlatformGTK.cmake
M Source/WebCore/SourcesGTK.txt
M Source/WebCore/platform/graphics/PlatformDisplay.cpp
M Source/WebCore/platform/graphics/PlatformDisplay.h
M Source/WebCore/platform/graphics/egl/GLContext.cpp
R Source/WebCore/platform/graphics/egl/PlatformDisplayHeadless.cpp
R Source/WebCore/platform/graphics/egl/PlatformDisplayHeadless.h
A Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp
A Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.h
A Source/WebCore/platform/graphics/gbm/PlatformDisplayGBM.cpp
A Source/WebCore/platform/graphics/gbm/PlatformDisplayGBM.h
M Source/WebKit/Shared/WebProcessCreationParameters.cpp
M Source/WebKit/Shared/WebProcessCreationParameters.h
M Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp
M Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
M Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
M Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp
M Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp
M Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
Log Message:
-----------
[GTK] Minibrowser does not render any content
https://bugs.webkit.org/show_bug.cgi?id=254807
Reviewed by Žan Doberšek.
This might happen in systems with multiple GPUs enabled. The problem is that
we might end up using a different GPU than the one used by the
application in the UI process. This is because both GBMDevice and mesa
surfaceless platform use always the first device having a render node
returned by drmGetDevices2(). To make sure we use the right GPU
everywhere we need to get the GPU used by the UI process and send it
to the web process. Mesa surfaceless platform doesn't allow to change the
device, so we need to use GBM platform that receives the device as the
native display when initializing the EGL display. Surfaceless platform
is still used for swrast, because GBM requires a GPU device.
* Source/WebCore/PlatformGTK.cmake:
* Source/WebCore/SourcesGTK.txt:
* Source/WebCore/platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::~PlatformDisplay):
(WebCore::PlatformDisplay::eglDevice):
(WebCore::PlatformDisplay::drmDeviceFile):
(WebCore::drmRenderNodeFromPrimaryDeviceFile):
(WebCore::PlatformDisplay::drmRenderNodeFile):
(WebCore::PlatformDisplay::gbmDevice):
* Source/WebCore/platform/graphics/PlatformDisplay.h:
* Source/WebCore/platform/graphics/egl/GLContext.cpp:
(WebCore::GLContext::getEGLConfig):
(WebCore::GLContext::createWindowContext):
(WebCore::GLContext::create):
(WebCore::GLContext::createSharing):
* Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp: Renamed from Source/WebCore/platform/graphics/egl/PlatformDisplayHeadless.cpp.
* Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.h: Renamed from Source/WebCore/platform/graphics/egl/PlatformDisplayHeadless.h.
* Source/WebCore/platform/graphics/gbm/PlatformDisplayGBM.cpp: Added.
(WebCore::PlatformDisplayGBM::create):
(WebCore::PlatformDisplayGBM::PlatformDisplayGBM):
(WebCore::PlatformDisplayGBM::~PlatformDisplayGBM):
* Source/WebCore/platform/graphics/gbm/PlatformDisplayGBM.h: Added.
* Source/WebKit/Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Source/WebKit/Shared/WebProcessCreationParameters.h:
* Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp:
(WebKit::WebKitProtocolHandler::handleGPU):
* Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::Surface::Surface):
* Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp:
(WebKit::AcceleratedSurface::create):
* Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp:
(WebKit::AcceleratedSurfaceDMABuf::AcceleratedSurfaceDMABuf):
(WebKit::AcceleratedSurfaceDMABuf::RenderTargetEGLImage::create):
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
Canonical link: https://commits.webkit.org/263061@main
More information about the webkit-changes
mailing list