summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Perez de Castro2020-10-13 15:44:16 +0300
committerAdrian Perez de Castro2020-10-13 15:45:45 +0300
commit4090322d5f8a67af4fcb7a570eadb15f06b4e336 (patch)
treeaa67cf53c5f71c276ef0e84ee832507d70a5ce29
parent7c7d8a132ebe7feedcb62321765eb4297e4c44a6 (diff)
downloadaur-4090322d5f8a67af4fcb7a570eadb15f06b4e336.tar.gz
Add patch to allow building with ENABLE_ACCELERATED_2D_CANVAS=ON
-rw-r--r--.SRCINFO7
-rw-r--r--0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch137
-rw-r--r--PKGBUILD24
3 files changed, 161 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e0c1cf844627..59ad5b37c386 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = wpewebkit
pkgdesc = Web content engine library optimized for embedded devices
pkgver = 2.30.1
- pkgrel = 1
+ pkgrel = 2
url = https://wpewebkit.org
arch = x86_64
arch = i686
@@ -16,6 +16,7 @@ pkgbase = wpewebkit
makedepends = python
makedepends = ninja
makedepends = gtk-doc
+ makedepends = patch
depends = cairo
depends = libxslt
depends = gst-plugins-base-libs
@@ -33,13 +34,17 @@ pkgbase = wpewebkit
depends = libwpe>=1.6.0
source = https://wpewebkit.org/releases/wpewebkit-2.30.1.tar.xz
source = https://wpewebkit.org/releases/wpewebkit-2.30.1.tar.xz.asc
+ source = 0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch
validpgpkeys = 5AA3BC334FD7E3369E7C77B291C559DBE4C9123B
md5sums = 251228a6e2917eff90a3eb6e9a7e920d
md5sums = SKIP
+ md5sums = 9bf98437bdab11f0da5d292cbd21a68f
sha1sums = 7f5bdc79d4694ab5644b7fed9bd7311c2cbc988f
sha1sums = SKIP
+ sha1sums = 7bab09bc9a32e1a6fcd057fc83fef8a05e59f944
sha256sums = 78c0135d935b980fc64fbddf1fbaf441920edda4eeb4c16857ee8dc985650c25
sha256sums = SKIP
+ sha256sums = 6e333205cec87b6b306ebb2c9ee31f4168f7762081d48f8f745ea57900f5e70e
pkgname = wpewebkit
diff --git a/0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch b/0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch
new file mode 100644
index 000000000000..f61bed04087b
--- /dev/null
+++ b/0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch
@@ -0,0 +1,137 @@
+From 2876eb9b59dded9da0829b5a8d92082aea55442c Mon Sep 17 00:00:00 2001
+From: "aperez@igalia.com"
+ <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
+Date: Mon, 12 Oct 2020 17:29:41 +0000
+Subject: [PATCH 1/1] REGRESSION(r256892): [WPE][GTK] Build
+ broken with ENABLE_ACCELERATED_2D_CANVAS=ON
+ https://bugs.webkit.org/show_bug.cgi?id=217384
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Most of the patch by Žan Doberšek.
+
+Reviewed by Darin Adler.
+
+No new tests needed.
+
+* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp: Move the namespace
+declaration after the #include statements, to avoid incorrect nested WebCore::WebCore
+namespace declarations.
+(WebCore::ImageBufferCairoGLSurfaceBackend::create): Add missing semicolon to statement,
+use getter for Cairo surface.
+(WebCore::ImageBufferCairoGLSurfaceBackend::platformLayer const): Rename from
+ImageBuffer::platformLayer.
+(WebCore::ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture const): Add missing
+first argument.
+* platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h: Adapt.
+
+Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
+[Upstream status: https://bugs.webkit.org/show_bug.cgi?id=217384]
+---
+ Source/WebCore/ChangeLog | 22 +++++++++++++++++++
+ .../ImageBufferCairoGLSurfaceBackend.cpp | 14 ++++++------
+ .../cairo/ImageBufferCairoGLSurfaceBackend.h | 7 +++---
+ 3 files changed, 32 insertions(+), 11 deletions(-)
+
+diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp
+index d36372f919e..0ed0b06f990 100644
+--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp
++++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp
+@@ -32,8 +32,6 @@
+
+ #if USE(CAIRO) && ENABLE(ACCELERATED_2D_CANVAS)
+
+-namespace WebCore {
+-
+ #include "GLContext.h"
+ #include "TextureMapperGL.h"
+ #include <wtf/IsoMallocInlines.h>
+@@ -60,6 +58,8 @@ namespace WebCore {
+ #include "TextureMapperPlatformLayerProxy.h"
+ #endif
+
++namespace WebCore {
++
+ WTF_MAKE_ISO_ALLOCATED_IMPL(ImageBufferCairoGLSurfaceBackend);
+
+ static inline void clearSurface(cairo_surface_t* surface)
+@@ -80,7 +80,7 @@ std::unique_ptr<ImageBufferCairoGLSurfaceBackend> ImageBufferCairoGLSurfaceBacke
+
+ // We must generate the texture ourselves, because there is no Cairo API for extracting it
+ // from a pre-existing surface.
+- uint32_t texture
++ uint32_t texture;
+ glGenTextures(1, &texture);
+ glBindTexture(GL_TEXTURE_2D, texture);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+@@ -98,7 +98,7 @@ std::unique_ptr<ImageBufferCairoGLSurfaceBackend> ImageBufferCairoGLSurfaceBacke
+ cairo_gl_device_set_thread_aware(device, FALSE);
+
+ auto surface = adoptRef(cairo_gl_surface_create_for_texture(device, CAIRO_CONTENT_COLOR_ALPHA, texture, backendSize.width(), backendSize.height()));
+- if (cairo_surface_status(surface) != CAIRO_STATUS_SUCCESS)
++ if (cairo_surface_status(surface.get()) != CAIRO_STATUS_SUCCESS)
+ return nullptr;
+
+ clearSurface(surface.get());
+@@ -145,7 +145,7 @@ ImageBufferCairoGLSurfaceBackend::~ImageBufferCairoGLSurfaceBackend()
+ previousActiveContext->makeContextCurrent();
+ }
+
+-PlatformLayer* ImageBuffer::platformLayer() const
++PlatformLayer* ImageBufferCairoGLSurfaceBackend::platformLayer() const
+ {
+ #if USE(NICOSIA)
+ return m_nicosiaLayer.get();
+@@ -156,7 +156,7 @@ PlatformLayer* ImageBuffer::platformLayer() const
+ return nullptr;
+ }
+
+-bool ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture(GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY)
++bool ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture(GraphicsContextGLOpenGL&, GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY) const
+ {
+ ASSERT_WITH_MESSAGE(m_resolutionScale == 1.0, "Since the HiDPI Canvas feature is removed, the resolution factor here is always 1.");
+ if (premultiplyAlpha || flipY)
+@@ -165,7 +165,7 @@ bool ImageBufferCairoGLSurfaceBackend::copyToPlatformTexture(GCGLenum target, Pl
+ if (!m_texture)
+ return false;
+
+- GC3Denum bindTextureTarget;
++ GCGLenum bindTextureTarget;
+ switch (target) {
+ case GL_TEXTURE_2D:
+ bindTextureTarget = GL_TEXTURE_2D;
+diff --git a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h
+index cdf0fae7e2c..0fcb6cb3763 100644
+--- a/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h
++++ b/Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.h
+@@ -58,10 +58,10 @@ public:
+ ~ImageBufferCairoGLSurfaceBackend();
+
+ PlatformLayer* platformLayer() const override;
+- bool copyToPlatformTexture(GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY) override;
++ bool copyToPlatformTexture(GraphicsContextGLOpenGL&, GCGLenum target, PlatformGLObject destinationTexture, GCGLenum internalformat, bool premultiplyAlpha, bool flipY) const override;
+
+ private:
+- ImageBufferCairoGLSurfaceBackend(const FloatSize& logicalSize, const IntSize& backendSize, float resolutionScale, ColorSpace, RefPtr<cairo_surface_t>&&);
++ ImageBufferCairoGLSurfaceBackend(const FloatSize& logicalSize, const IntSize& backendSize, float resolutionScale, ColorSpace, RefPtr<cairo_surface_t>&&, uint32_t texture);
+
+ #if USE(COORDINATED_GRAPHICS)
+ void createCompositorBuffer();
+@@ -79,12 +79,11 @@ private:
+ #else
+ RefPtr<TextureMapperPlatformLayerProxy> m_platformLayerProxy;
+ #endif
+- uint32_t m_texture;
++ uint32_t m_texture { 0 };
+ RefPtr<cairo_surface_t> m_compositorSurface;
+ RefPtr<cairo_t> m_compositorCr;
+ uint32_t m_compositorTexture { 0 };
+ #endif
+- uint32_t m_texture { 0 };
+ };
+
+ } // namespace WebCore
+--
+2.28.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 770d3b135962..05117c29bed2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgname=wpewebkit
pkgver=2.30.1
-pkgrel=1
+pkgrel=2
pkgdesc='Web content engine library optimized for embedded devices'
arch=(x86_64 i686 aarch64 armv7l armv7h)
url='https://wpewebkit.org'
@@ -10,13 +10,25 @@ groups=(wpe)
depends=(cairo libxslt gst-plugins-base-libs libepoxy libsoup libwebp
harfbuzz-icu woff2 openjpeg2 libseccomp bubblewrap xdg-dbus-proxy
geoclue at-spi2-atk 'libwpe>=1.6.0')
-makedepends=(gperf ruby cmake python ninja gtk-doc)
+makedepends=(gperf ruby cmake python ninja gtk-doc patch)
source=("${url}/releases/${pkgname}-${pkgver}.tar.xz"
- "${url}/releases/${pkgname}-${pkgver}.tar.xz.asc")
+ "${url}/releases/${pkgname}-${pkgver}.tar.xz.asc"
+ "0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch")
validpgpkeys=('5AA3BC334FD7E3369E7C77B291C559DBE4C9123B')
-md5sums=(251228a6e2917eff90a3eb6e9a7e920d SKIP)
-sha1sums=(7f5bdc79d4694ab5644b7fed9bd7311c2cbc988f SKIP)
-sha256sums=(78c0135d935b980fc64fbddf1fbaf441920edda4eeb4c16857ee8dc985650c25 SKIP)
+md5sums=('251228a6e2917eff90a3eb6e9a7e920d'
+ 'SKIP'
+ '9bf98437bdab11f0da5d292cbd21a68f')
+sha1sums=('7f5bdc79d4694ab5644b7fed9bd7311c2cbc988f'
+ 'SKIP'
+ '7bab09bc9a32e1a6fcd057fc83fef8a05e59f944')
+sha256sums=('78c0135d935b980fc64fbddf1fbaf441920edda4eeb4c16857ee8dc985650c25'
+ 'SKIP'
+ '6e333205cec87b6b306ebb2c9ee31f4168f7762081d48f8f745ea57900f5e70e')
+
+prepare () {
+ cd "${pkgname}-${pkgver}"
+ patch -p1 < "${srcdir}/0001-Merge-r268350-REGRESSION-r256892-WPE-GTK-Build-broke.patch"
+}
build () {
cmake -H"${pkgname}-${pkgver}" -Bbuild \