New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REGRESSION(2.41.6): [GTK] Yelp help viewer and Epiphany browser do not show content on a virtual machine (llvmpipe?) with WebKitGTK 2.41.6 #15929
Conversation
EWS run on current version of this PR (hash d645998) |
I tested this, it works. Sorry for the delay, the scratch build took so long I couldn't check it yesterday. |
β¦t show content on a virtual machine (llvmpipe?) with WebKitGTK 2.41.6 https://bugs.webkit.org/show_bug.cgi?id=259320 Reviewed by Michael Catanzaro. The problem is that for some reason the surfaceless platform is claiming to support EGL_MESA_image_dma_buf_export with llvmpipe driver, while the display in the UI process doesn't support EGL_EXT_image_dma_buf_import with llvmpipe as expected. So, we end up exporting DMABuf buffers (or trying) that the UI process can't handle. We should always pass to the web process the buffers supported by the UI process (hardware or shared memory) and ensure we only export buffers supported by the UI process. * Source/WebKit/Shared/WebProcessCreationParameters.h: * Source/WebKit/Shared/WebProcessCreationParameters.serialization.in: * Source/WebKit/Shared/glib/DMABufRendererBufferMode.h: Added. * Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp: (WebKit::dmabufRendererWithSupportedBuffers): (WebKit::WebKitProtocolHandler::handleGPU): * Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp: (WebKit::WebProcessPool::platformInitializeWebProcess): * Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp: (WebKit::AcceleratedBackingStoreDMABuf::rendererBufferMode): (WebKit::AcceleratedBackingStoreDMABuf::checkRequirements): * Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h: * Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceDMABuf.cpp: (WebKit::AcceleratedSurfaceDMABuf::clientResize): * Source/WebKit/WebProcess/WebProcess.h: (WebKit::WebProcess::dmaBufRendererBufferMode const): * Source/WebKit/WebProcess/glib/WebProcessGLib.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Canonical link: https://commits.webkit.org/266201@main
d645998
to
ad44d7b
Compare
Committed 266201@main (ad44d7b): https://commits.webkit.org/266201@main Reviewed commits have been landed. Closing PR #15929 and removing active labels. |
Hi, this broke the build when GBM was not enabled. I'm searching for how to fix it, but it isn't that clear. This makes AcceleratedBackingStoreDMABuf compiling, but still stuck with AcceleratedSurfaceDMABuf. diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
index 63b699e8944e..8fbff0272c90 100644
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
@@ -33,14 +33,14 @@
#include "ShareableBitmap.h"
#include "WebPageProxy.h"
#include "WebProcessProxy.h"
-#include <WebCore/DMABufFormat.h>
#include <WebCore/GLContext.h>
#include <WebCore/IntRect.h>
#include <WebCore/PlatformDisplay.h>
-#include <epoxy/egl.h>
#include <wtf/glib/GUniquePtr.h>
#if USE(GBM)
+#include <WebCore/DMABufFormat.h>
+#include <epoxy/egl.h>
#include <gbm.h>
#endif
@@ -53,6 +53,7 @@ namespace WebKit {
OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
{
static OptionSet<DMABufRendererBufferMode> mode;
+#if USE(GBM)
static std::once_flag onceFlag;
std::call_once(onceFlag, [] {
const char* disableDMABuf = getenv("WEBKIT_DISABLE_DMABUF_RENDERER");
@@ -71,6 +72,7 @@ OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBuffe
if (eglExtensions.KHR_image_base && eglExtensions.EXT_image_dma_buf_import)
mode.add(DMABufRendererBufferMode::Hardware);
});
+#endif
return mode;
}
bool AcceleratedBackingStoreDMABuf::checkRequirements()
@@ -104,6 +106,7 @@ AcceleratedBackingStoreDMABuf::RenderSource::RenderSource(const WebCore::IntSize
{
}
+#if USE(GBM)
AcceleratedBackingStoreDMABuf::Texture::Texture(GdkGLContext* glContext, const UnixFileDescriptor& backFD, const UnixFileDescriptor& frontFD, const UnixFileDescriptor& displayFD, const WebCore::IntSize& size, uint32_t format, uint32_t offset, uint32_t stride, uint64_t modifier, float deviceScaleFactor)
: RenderSource(size, deviceScaleFactor)
, m_context(glContext)
@@ -226,7 +229,6 @@ void AcceleratedBackingStoreDMABuf::Texture::paint(GtkWidget* widget, cairo_t* c
}
#endif
-#if USE(GBM)
AcceleratedBackingStoreDMABuf::Surface::Surface(const UnixFileDescriptor& backFD, const UnixFileDescriptor& frontFD, const UnixFileDescriptor& displayFD, const WebCore::IntSize& size, uint32_t format, uint32_t offset, uint32_t stride, float deviceScaleFactor)
: RenderSource(size, deviceScaleFactor)
{
@@ -419,10 +421,12 @@ std::unique_ptr<AcceleratedBackingStoreDMABuf::RenderSource> AcceleratedBackingS
#if USE(GBM)
if (!WebCore::PlatformDisplay::sharedDisplay().gtkEGLDisplay())
return makeUnique<Surface>(m_surface.backFD, m_surface.frontFD, m_surface.displayFD, m_surface.size, m_surface.format, m_surface.offset, m_surface.stride, m_webPage.deviceScaleFactor());
-#endif
ensureGLContext();
return makeUnique<Texture>(m_gdkGLContext.get(), m_surface.backFD, m_surface.frontFD, m_surface.displayFD, m_surface.size, m_surface.format, m_surface.offset, m_surface.stride, m_surface.modifier, m_webPage.deviceScaleFactor());
+#else
+ return nullptr;
+#endif
}
void AcceleratedBackingStoreDMABuf::frame()
@@ -510,8 +514,10 @@ void AcceleratedBackingStoreDMABuf::ensureGLContext()
bool AcceleratedBackingStoreDMABuf::makeContextCurrent()
{
+#if USE(GBM)
if (!WebCore::PlatformDisplay::sharedDisplay().gtkEGLDisplay())
return false;
+#endif
if (!gtk_widget_get_realized(m_webPage.viewWidget()))
return false;
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
index 1bc769ada313..0f9dc5496947 100644
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h
@@ -109,6 +109,7 @@ private:
float m_deviceScaleFactor { 1 };
};
+#if USE(GBM)
class Texture final : public RenderSource {
public:
Texture(GdkGLContext*, const WTF::UnixFileDescriptor&, const WTF::UnixFileDescriptor&, const WTF::UnixFileDescriptor&, const WebCore::IntSize&, uint32_t format, uint32_t offset, uint32_t stride, uint64_t modifier, float deviceScaleFactor);
@@ -136,6 +137,7 @@ private:
uint16_t m_textureIndex : 1;
#endif
};
+#endif
class Surface final : public RenderSource {
public: |
It was fixed by https://commits.webkit.org/268112@main |
Thx, I saw it, and cherry-picked it.
Simply moving the egl import under USE_GBM is not enough, there is more that has to be moved. |
ad44d7b
d645998