Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
73d191b
commit 5fa2966
Showing
17 changed files
with
341 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.