mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 21:57:02 +02:00
webkit2gtk: update to 2.44.2
This commit is contained in:
parent
35ae48268c
commit
aca18022c9
4 changed files with 62 additions and 88 deletions
|
@ -1,63 +0,0 @@
|
|||
From: Carlos Garcia Campos <cgarcia@igalia.com>
|
||||
Subject: Disable DMABuf renderer for NVIDIA proprietary drivers
|
||||
Bug: https://bugs.webkit.org/show_bug.cgi?id=262607
|
||||
Bug-Debian: https://bugs.debian.org/1039720
|
||||
Origin: https://github.com/WebKit/WebKit/pull/18614
|
||||
Index: webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
===================================================================
|
||||
--- webkitgtk.orig/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
+++ webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
@@ -38,11 +38,13 @@
|
||||
#include <WebCore/GLContext.h>
|
||||
#include <WebCore/IntRect.h>
|
||||
#include <WebCore/PlatformDisplay.h>
|
||||
+#include <WebCore/PlatformDisplaySurfaceless.h>
|
||||
#include <epoxy/egl.h>
|
||||
#include <wtf/glib/GUniquePtr.h>
|
||||
|
||||
#if USE(GBM)
|
||||
#include <WebCore/DMABufFormat.h>
|
||||
+#include <WebCore/PlatformDisplayGBM.h>
|
||||
#include <gbm.h>
|
||||
static constexpr uint64_t s_dmabufInvalidModifier = uint64_t(WebCore::DMABufFormat::Modifier::Invalid);
|
||||
#else
|
||||
@@ -55,6 +57,29 @@ static constexpr uint64_t s_dmabufInvali
|
||||
|
||||
namespace WebKit {
|
||||
|
||||
+static bool isNVIDIA()
|
||||
+{
|
||||
+ const char* forceDMABuf = getenv("WEBKIT_FORCE_DMABUF_RENDERER");
|
||||
+ if (forceDMABuf && strcmp(forceDMABuf, "0"))
|
||||
+ return false;
|
||||
+
|
||||
+ std::unique_ptr<WebCore::PlatformDisplay> platformDisplay;
|
||||
+#if USE(GBM)
|
||||
+ const char* disableGBM = getenv("WEBKIT_DMABUF_RENDERER_DISABLE_GBM");
|
||||
+ if (!disableGBM || !strcmp(disableGBM, "0")) {
|
||||
+ if (auto* device = WebCore::PlatformDisplay::sharedDisplay().gbmDevice())
|
||||
+ platformDisplay = WebCore::PlatformDisplayGBM::create(device);
|
||||
+ }
|
||||
+#endif
|
||||
+ if (!platformDisplay)
|
||||
+ platformDisplay = WebCore::PlatformDisplaySurfaceless::create();
|
||||
+
|
||||
+ WebCore::GLContext::ScopedGLContext glContext(WebCore::GLContext::createOffscreen(platformDisplay ? *platformDisplay : WebCore::PlatformDisplay::sharedDisplay()));
|
||||
+ if (strstr(reinterpret_cast<const char*>(glGetString(GL_VENDOR)), "NVIDIA"))
|
||||
+ return true;
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
OptionSet<DMABufRendererBufferMode> AcceleratedBackingStoreDMABuf::rendererBufferMode()
|
||||
{
|
||||
static OptionSet<DMABufRendererBufferMode> mode;
|
||||
@@ -70,6 +95,9 @@ OptionSet<DMABufRendererBufferMode> Acce
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (isNVIDIA())
|
||||
+ return;
|
||||
+
|
||||
mode.add(DMABufRendererBufferMode::SharedMemory);
|
||||
|
||||
const auto& eglExtensions = WebCore::PlatformDisplay::sharedDisplay().eglExtensions();
|
|
@ -1,16 +0,0 @@
|
|||
From: Alberto Garcia <berto@igalia.com>
|
||||
Subject: Fix FTBFS in i386
|
||||
Bug: https://bugs.webkit.org/show_bug.cgi?id=268739
|
||||
Index: webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
|
||||
===================================================================
|
||||
--- webkitgtk.orig/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
|
||||
+++ webkitgtk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp
|
||||
@@ -336,8 +336,6 @@ JSValue CLoop::execute(OpcodeID entryOpc
|
||||
UNUSED_VARIABLE(t2);
|
||||
UNUSED_VARIABLE(t3);
|
||||
UNUSED_VARIABLE(t5);
|
||||
- UNUSED_VARIABLE(t6);
|
||||
- UNUSED_VARIABLE(t7);
|
||||
|
||||
struct StackPointerScope {
|
||||
StackPointerScope(CLoopStack& stack)
|
54
srcpkgs/webkit2gtk/patches/fix_create_gl_context.patch
Normal file
54
srcpkgs/webkit2gtk/patches/fix_create_gl_context.patch
Normal file
|
@ -0,0 +1,54 @@
|
|||
From 3ec05c63ec38d19773c074f60eb2f9406e298b47 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garcia Campos <cgarcia@igalia.com>
|
||||
Date: Fri, 14 Jun 2024 09:56:54 +0200
|
||||
Subject: [PATCH] REGRESSION(273818@main): [GTK] Eclipse crashes when rendering
|
||||
tooltips: gdk_window_create_gl_context: assertion 'GDK_IS_WINDOW (window)'
|
||||
failed in WebKit::AcceleratedBackingStoreDMABuf::ensureGLContext
|
||||
https://bugs.webkit.org/show_bug.cgi?id=271477
|
||||
|
||||
Reviewed by NOBODY (OOPS!).
|
||||
|
||||
Update the buffer contents on prepareForRendering to make sure the view
|
||||
is already realized, which is required to create the gl context.
|
||||
|
||||
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
|
||||
(WebKit::AcceleratedBackingStoreDMABuf::frame):
|
||||
(WebKit::AcceleratedBackingStoreDMABuf::prepareForRendering):
|
||||
---
|
||||
.../gtk/AcceleratedBackingStoreDMABuf.cpp | 15 ++++++---------
|
||||
1 file changed, 6 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
index b71fb0a8ac06..66d8a4801aba 100644
|
||||
--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp
|
||||
@@ -544,12 +544,6 @@ void AcceleratedBackingStoreDMABuf::frame(uint64_t bufferID)
|
||||
return;
|
||||
}
|
||||
|
||||
- if (buffer->type() == Buffer::Type::EglImage) {
|
||||
- ensureGLContext();
|
||||
- gdk_gl_context_make_current(m_gdkGLContext.get());
|
||||
- }
|
||||
- buffer->didUpdateContents();
|
||||
-
|
||||
m_pendingBuffer = buffer;
|
||||
gtk_widget_queue_draw(m_webPage.viewWidget());
|
||||
}
|
||||
@@ -613,10 +607,13 @@ void AcceleratedBackingStoreDMABuf::update(const LayerTreeContext& context)
|
||||
|
||||
bool AcceleratedBackingStoreDMABuf::prepareForRendering()
|
||||
{
|
||||
- if (m_gdkGLContext)
|
||||
- gdk_gl_context_make_current(m_gdkGLContext.get());
|
||||
-
|
||||
if (m_pendingBuffer) {
|
||||
+ if (m_pendingBuffer->type() == Buffer::Type::EglImage) {
|
||||
+ ensureGLContext();
|
||||
+ gdk_gl_context_make_current(m_gdkGLContext.get());
|
||||
+ }
|
||||
+ m_pendingBuffer->didUpdateContents();
|
||||
+
|
||||
if (m_committedBuffer)
|
||||
m_webPage.legacyMainFrameProcess().send(Messages::AcceleratedSurfaceDMABuf::ReleaseBuffer(m_committedBuffer->id()), m_surfaceID);
|
||||
m_committedBuffer = WTFMove(m_pendingBuffer);
|
|
@ -1,12 +1,12 @@
|
|||
# Template file for 'webkit2gtk'
|
||||
pkgname=webkit2gtk
|
||||
version=2.42.5
|
||||
version=2.44.2
|
||||
revision=1
|
||||
build_style=cmake
|
||||
build_helper="gir"
|
||||
configure_args="-DPORT=GTK
|
||||
-DCMAKE_LINKER=${XBPS_CROSS_TRIPLET}-gcc -DCMAKE_SKIP_RPATH=ON
|
||||
-DENABLE_JOURNALD_LOG=OFF -DUSE_WOFF2=ON -DUSE_WPE_RENDERER=ON
|
||||
-DENABLE_JOURNALD_LOG=OFF -DUSE_WOFF2=ON
|
||||
-DENABLE_MINIBROWSER=$(vopt_if minibrowser ON OFF)
|
||||
-DENABLE_JIT=$(vopt_if jit ON OFF)
|
||||
-DENABLE_C_LOOP=$(vopt_if jit OFF ON)
|
||||
|
@ -16,7 +16,7 @@ configure_args="-DPORT=GTK
|
|||
-DENABLE_X11_TARGET=$(vopt_if x11 ON OFF)
|
||||
-DENABLE_SAMPLING_PROFILER=$(vopt_if sampling_profiler ON OFF)
|
||||
-DENABLE_BUBBLEWRAP_SANDBOX=$(vopt_if bubblewrap ON OFF)
|
||||
-DUSE_JPEGXL=OFF"
|
||||
-DUSE_JPEGXL=OFF -DUSE_LIBBACKTRACE=OFF -DUSE_GTK4=OFF"
|
||||
# Don't remove which from hostmakedepends
|
||||
# Otherwise, they invoke /usr/bin/ccache /usr/lib/ccache/bin/$CC
|
||||
hostmakedepends="perl python3 pkg-config gperf flex ruby gettext glib-devel
|
||||
|
@ -27,8 +27,7 @@ makedepends="at-spi2-core-devel libjpeg-turbo-devel libpng-devel
|
|||
libsoup-devel libsoup3-devel libxslt-devel gnutls-devel icu-devel enchant2-devel
|
||||
dbus-glib-devel libwebp-devel gtk+3-devel gtk4-devel libgudev-devel
|
||||
libsecret-devel ruby-devel geoclue2-devel libnotify-devel hyphen-devel
|
||||
woff2-devel freetype-devel libopenjpeg2-devel libavif-devel
|
||||
qt5-devel libmanette-devel libwpe-devel wpebackend-fdo-devel
|
||||
woff2-devel freetype-devel libavif-devel qt5-devel libmanette-devel
|
||||
libgcrypt-devel libnuspell-devel libpsl-devel $(vopt_if x11 libXt-devel)
|
||||
$(vopt_if wayland 'MesaLib-devel libxkbcommon-devel wayland-devel wayland-protocols')"
|
||||
depends="gst-plugins-good1"
|
||||
|
@ -37,7 +36,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
|
|||
license="LGPL-2.1-or-later, BSD-2-Clause"
|
||||
homepage="https://webkitgtk.org/"
|
||||
distfiles="https://webkitgtk.org/releases/webkitgtk-${version}.tar.xz"
|
||||
checksum=b64278c1f20b8cfdbfb5ff573c37d871aba74a1db26d9b39f74e8953fe61e749
|
||||
checksum=523f42c8ff24832add17631f6eaafe8f9303afe316ef1a7e1844b952a7f7521b
|
||||
make_check=no # TODO
|
||||
|
||||
replaces="webkit2gtk-common>0"
|
||||
|
@ -190,7 +189,7 @@ webkit2gtk-devel_package() {
|
|||
vmove "usr/share/gir-1.0/*-4.0.gir"
|
||||
fi
|
||||
if [ "$build_option_gtk_doc" ]; then
|
||||
vmove "usr/share/gtk-doc/html/*-4.0"
|
||||
vmove "usr/share/doc/*-4.0"
|
||||
fi
|
||||
vmove "usr/lib/*-4.0.so"
|
||||
}
|
||||
|
@ -226,7 +225,7 @@ libwebkit2gtk41-devel_package() {
|
|||
vmove "usr/share/gir-1.0/*-4.1.gir"
|
||||
fi
|
||||
if [ "$build_option_gtk_doc" ]; then
|
||||
vmove "usr/share/gtk-doc/html/*-4.1"
|
||||
vmove "usr/share/doc/*-4.1"
|
||||
fi
|
||||
vmove "usr/lib/*-4.1.so"
|
||||
}
|
||||
|
@ -261,7 +260,7 @@ libwebkitgtk60-devel_package() {
|
|||
vmove "usr/share/gir-1.0/*-6.0.gir"
|
||||
fi
|
||||
if [ "$build_option_gtk_doc" ]; then
|
||||
vmove "usr/share/gtk-doc/html/*-6.0"
|
||||
vmove "usr/share/doc/*-6.0"
|
||||
fi
|
||||
vmove "usr/lib/*-6.0.so"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue