diff --git a/webkit2gtk3-create-destroy-egl-image.patch b/webkit2gtk3-create-destroy-egl-image.patch new file mode 100644 index 0000000..7b1c588 --- /dev/null +++ b/webkit2gtk3-create-destroy-egl-image.patch @@ -0,0 +1,80 @@ +From 855a2ca13f6a85b0aacb0576fbbc9a926e646b2e Mon Sep 17 00:00:00 2001 +From: Carlos Garcia Campos +Date: Thu, 31 Aug 2023 09:26:26 -0700 +Subject: [PATCH] [GTK][WPE] Do not use epoxy + PlatformDisplay::create|destroyEGLImage + https://bugs.webkit.org/show_bug.cgi?id=260968 + +Reviewed by Michael Catanzaro. + +libepoxy needs a current context to work, but creating EGL images +doesn't need any context, it's display API. + +* Source/WebCore/platform/graphics/PlatformDisplay.cpp: +(WebCore::PlatformDisplay::createEGLImage const): +(WebCore::PlatformDisplay::destroyEGLImage const): + +Canonical link: https://commits.webkit.org/267503@main +--- + .../platform/graphics/PlatformDisplay.cpp | 16 ---------------- + 1 file changed, 16 deletions(-) + +diff -urp webkitgtk-2.42.1.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp webkitgtk-2.42.1/Source/WebCore/platform/graphics/PlatformDisplay.cpp +--- webkitgtk-2.42.1.orig/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2023-09-19 03:27:49.807693000 -0500 ++++ webkitgtk-2.42.1/Source/WebCore/platform/graphics/PlatformDisplay.cpp 2023-10-23 13:09:55.996812760 -0500 +@@ -374,14 +374,10 @@ void PlatformDisplay::terminateEGLDispla + EGLImage PlatformDisplay::createEGLImage(EGLContext context, EGLenum target, EGLClientBuffer clientBuffer, const Vector& attributes) const + { + if (eglCheckVersion(1, 5)) { +-#if USE(LIBEPOXY) +- return eglCreateImage(m_eglDisplay, context, target, clientBuffer, attributes.isEmpty() ? nullptr : attributes.data()); +-#else + static PFNEGLCREATEIMAGEPROC s_eglCreateImage = reinterpret_cast(eglGetProcAddress("eglCreateImage")); + if (s_eglCreateImage) + return s_eglCreateImage(m_eglDisplay, context, target, clientBuffer, attributes.isEmpty() ? nullptr : attributes.data()); + return EGL_NO_IMAGE; +-#endif + } + + if (!m_eglExtensions.KHR_image_base) +@@ -390,40 +386,28 @@ EGLImage PlatformDisplay::createEGLImage + Vector intAttributes = attributes.map>([] (EGLAttrib value) { + return value; + }); +-#if USE(LIBEPOXY) +- return eglCreateImageKHR(m_eglDisplay, context, target, clientBuffer, intAttributes.isEmpty() ? nullptr : intAttributes.data()); +-#else + static PFNEGLCREATEIMAGEKHRPROC s_eglCreateImageKHR = reinterpret_cast(eglGetProcAddress("eglCreateImageKHR")); + if (s_eglCreateImageKHR) + return s_eglCreateImageKHR(m_eglDisplay, context, target, clientBuffer, intAttributes.isEmpty() ? nullptr : intAttributes.data()); + return EGL_NO_IMAGE_KHR; +-#endif + } + + bool PlatformDisplay::destroyEGLImage(EGLImage image) const + { + if (eglCheckVersion(1, 5)) { +-#if USE(LIBEPOXY) +- return eglDestroyImage(m_eglDisplay, image); +-#else + static PFNEGLDESTROYIMAGEPROC s_eglDestroyImage = reinterpret_cast(eglGetProcAddress("eglDestroyImage")); + if (s_eglDestroyImage) + return s_eglDestroyImage(m_eglDisplay, image); + return false; +-#endif + } + + if (!m_eglExtensions.KHR_image_base) + return false; + +-#if USE(LIBEPOXY) +- return eglDestroyImageKHR(m_eglDisplay, image); +-#else + static PFNEGLDESTROYIMAGEKHRPROC s_eglDestroyImageKHR = reinterpret_cast(eglGetProcAddress("eglDestroyImageKHR")); + if (s_eglDestroyImageKHR) + return s_eglDestroyImageKHR(m_eglDisplay, image); + return false; +-#endif + } + + #if USE(GBM) diff --git a/webkit2gtk3.changes b/webkit2gtk3.changes index d55db1f..ea30186 100644 --- a/webkit2gtk3.changes +++ b/webkit2gtk3.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 23 18:48:15 UTC 2023 - Mike Gorse + +- Add webkit2gtk3-create-destroy-egl-image.patch: fix "No provider + of EglDestroyImage Found" (boo#1216483). + ------------------------------------------------------------------- Fri Sep 29 18:10:40 UTC 2023 - Bjørn Lie diff --git a/webkit2gtk3.spec b/webkit2gtk3.spec index a0ca959..927f653 100644 --- a/webkit2gtk3.spec +++ b/webkit2gtk3.spec @@ -87,6 +87,8 @@ Source99: webkit2gtk3.keyring # PATCH-FEATURE-OPENSUSE reproducibility.patch -- Make build reproducible Patch0: reproducibility.patch +# PATCH-FIX-UPSTREAM webkit2gtk3-create-destroy-egl-image.patch boo#1216483 mgorse@suse.com -- fix "No provider of EglDestroyImage found". +Patch1: webkit2gtk3-create-destroy-egl-image.patch BuildRequires: Mesa-libEGL-devel BuildRequires: Mesa-libGL-devel @@ -423,12 +425,7 @@ Group: Development/Tools/Other %description minibrowser A small test browswer from webkit, useful for testing features. - - - - # Expand %%lang_package to Obsoletes its older-name counterpart - %package -n WebKitGTK-%{_apiver}-lang Summary: Translations for package %{name} Group: System/Localization