summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-06-26 15:10:58 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-06-27 21:00:20 +0200
commit3af4117d918c855770200a2940b144809b14aa4c (patch)
tree55ee38d5677f7f9d9a5e563ab78361fb008659bc /dev-qt/qtwebengine/files
parentprofiles: Mask Qt 5.11.1 for testing (diff)
downloadgentoo-3af4117d918c855770200a2940b144809b14aa4c.tar.gz
gentoo-3af4117d918c855770200a2940b144809b14aa4c.tar.bz2
gentoo-3af4117d918c855770200a2940b144809b14aa4c.zip
dev-qt: Add Qt 5.11.1 (masked)
Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'dev-qt/qtwebengine/files')
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.11.1-eglGetProcAddress-fallback-lookup.patch68
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.11.1-ffmpeg4.patch32
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.11.1-libxml2-disable-catalogs.patch46
-rw-r--r--dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch98
4 files changed, 244 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-eglGetProcAddress-fallback-lookup.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-eglGetProcAddress-fallback-lookup.patch
new file mode 100644
index 000000000000..4b2676faa6a0
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-eglGetProcAddress-fallback-lookup.patch
@@ -0,0 +1,68 @@
+From a66d4cd82972996d76edff52d17464c150dec6a6 Mon Sep 17 00:00:00 2001
+From: Samuli Piippo <samuli.piippo@qt.io>
+Date: Mon, 11 Jun 2018 16:16:55 +0300
+Subject: Add fallback lookup for eglGetProcAddress
+
+Use the GLContext to find address for eglGetProcAddress symbol, if it's
+not found with dlopen.
+
+Change-Id: I3f5330c21ecc9b66e5e376d50d3fc6965b227f85
+Reviewed-by: Michal Klocek <michal.klocek@qt.io>
+---
+ src/core/gl_context_qt.cpp | 11 +++++++++++
+ src/core/gl_context_qt.h | 1 +
+ src/core/gl_surface_qt.cpp | 4 ++++
+ 3 files changed, 16 insertions(+)
+
+diff --git a/src/core/gl_context_qt.cpp b/src/core/gl_context_qt.cpp
+index 9ed1db8b..95491709 100644
+--- a/src/core/gl_context_qt.cpp
++++ b/src/core/gl_context_qt.cpp
+@@ -155,6 +155,17 @@ QFunctionPointer GLContextHelper::getGlXGetProcAddress()
+ return get_proc_address;
+ }
+
++QFunctionPointer GLContextHelper::getEglGetProcAddress()
++{
++ QFunctionPointer get_proc_address = nullptr;
++#ifndef QT_NO_OPENGL
++ if (QOpenGLContext *context = qt_gl_global_share_context()) {
++ get_proc_address = context->getProcAddress("eglGetProcAddress");
++ }
++#endif
++ return get_proc_address;
++}
++
+ QT_END_NAMESPACE
+
+ #if defined(USE_OZONE) || defined(OS_WIN)
+diff --git a/src/core/gl_context_qt.h b/src/core/gl_context_qt.h
+index 8ffdad58..cecceabc 100644
+--- a/src/core/gl_context_qt.h
++++ b/src/core/gl_context_qt.h
+@@ -63,6 +63,7 @@ public:
+ static void* getXDisplay();
+ static void* getNativeDisplay();
+ static QFunctionPointer getGlXGetProcAddress();
++ static QFunctionPointer getEglGetProcAddress();
+ private:
+ Q_INVOKABLE bool initializeContextOnBrowserThread(gl::GLContext* context, gl::GLSurface* surface, gl::GLContextAttribs attribs);
+
+diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp
+index 7e579246..4d38d7c2 100644
+--- a/src/core/gl_surface_qt.cpp
++++ b/src/core/gl_surface_qt.cpp
+@@ -227,6 +227,10 @@ bool InitializeStaticGLBindings(GLImplementation implementation) {
+ base::GetFunctionPointerFromNativeLibrary(library,
+ "eglGetProcAddress"));
+ if (!get_proc_address) {
++ QFunctionPointer address = GLContextHelper::getEglGetProcAddress();
++ get_proc_address = reinterpret_cast<gl::GLGetProcAddressProc>(address);
++ }
++ if (!get_proc_address) {
+ LOG(ERROR) << "eglGetProcAddress not found.";
+ base::UnloadNativeLibrary(library);
+ return false;
+--
+cgit v1.1-6-g87c4
+
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-ffmpeg4.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-ffmpeg4.patch
new file mode 100644
index 000000000000..e9ef452a8d95
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-ffmpeg4.patch
@@ -0,0 +1,32 @@
+From a568ded46a678eac8139cb06595819c5ae874177 Mon Sep 17 00:00:00 2001
+From: Xiaohan Wang <xhwang@chromium.org>
+Date: Mon, 29 Jan 2018 21:28:28 +0000
+Subject: [PATCH] media: Increase DecoderBuffer::kPaddingSize to 64
+
+AV_INPUT_BUFFER_PADDING_SIZE has been increased to 64 in FFmpeg:
+https://github.com/FFmpeg/FFmpeg/commit/6e80079a2840ee407c5d126030eb1066bcbfdfc5
+
+BUG=777484
+
+Change-Id: I1bd68d1c1b0c3131f28d6e07e1444b89800c09db
+Reviewed-on: https://chromium-review.googlesource.com/889686
+Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
+Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#532593}
+---
+ src/3rdparty/chromium/media/base/decoder_buffer.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/3rdparty/chromium/media/base/decoder_buffer.h b/src/3rdparty/chromium/media/base/decoder_buffer.h
+index 0341e5784f725..60ffba708b0e5 100644
+--- a/src/3rdparty/chromium/media/base/decoder_buffer.h
++++ b/src/3rdparty/chromium/media/base/decoder_buffer.h
+@@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer
+ : public base::RefCountedThreadSafe<DecoderBuffer> {
+ public:
+ enum {
+- kPaddingSize = 32,
++ kPaddingSize = 64,
+ #if defined(ARCH_CPU_ARM_FAMILY)
+ kAlignmentSize = 16
+ #else
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-libxml2-disable-catalogs.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-libxml2-disable-catalogs.patch
new file mode 100644
index 000000000000..8ac5b90b72c8
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-libxml2-disable-catalogs.patch
@@ -0,0 +1,46 @@
+--- a/config.tests/xml2/xml2.cpp
++++ b/config.tests/xml2/xml2.cpp
+@@ -27,9 +27,6 @@
+ ****************************************************************************/
+
+ #include <libxml/xmlversion.h>
+-#if defined(LIBXML_CATALOG_ENABLED)
+-#error "libxml catalog enabled"
+-#endif
+ #if !defined(LIBXML_ICU_ENABLED)
+ #error "libxml icu not enabled"
+ #endif
+--- a/src/3rdparty/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
++++ b/src/3rdparty/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
+@@ -28,6 +28,10 @@
+
+ #include <libxml/parser.h>
+ #include <libxml/parserInternals.h>
++#include <libxml/xmlversion.h>
++#if defined(LIBXML_CATALOG_ENABLED)
++#include <libxml/catalog.h>
++#endif
+ #include <libxslt/xslt.h>
+ #include <memory>
+ #include "core/css/StyleEngine.h"
+@@ -538,10 +542,6 @@
+ static bool ShouldAllowExternalLoad(const KURL& url) {
+ String url_string = url.GetString();
+
+- // libxml should not be configured with catalogs enabled, so it
+- // should not be asking to load default catalogs.
+- CHECK(!IsLibxmlDefaultCatalogFile(url));
+-
+ // The most common DTD. There isn't much point in hammering www.w3c.org by
+ // requesting this URL for every XHTML document.
+ if (url_string.StartsWithIgnoringASCIICase("http://www.w3.org/TR/xhtml"))
+@@ -646,6 +646,9 @@
+ if (did_init)
+ return;
+
++#if defined(LIBXML_CATALOG_ENABLED)
++ xmlCatalogSetDefaults(XML_CATA_ALLOW_NONE);
++#endif
+ xmlInitParser();
+ xmlRegisterInputCallbacks(MatchFunc, OpenFunc, ReadFunc, CloseFunc);
+ xmlRegisterOutputCallbacks(MatchFunc, OpenFunc, WriteFunc, CloseFunc);
diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch
new file mode 100644
index 000000000000..aaf3aae462ab
--- /dev/null
+++ b/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch
@@ -0,0 +1,98 @@
+From: Antonio Larrosa <alarrosa@suse.com>
+Subject: Disable GPU when using nouveau or running on wayland
+References: boo#1005323, boo#1060990
+
+Qt WebEngine uses multi-threaded OpenGL, which nouveau does not support.
+It also crashes when running on wayland, the cause is not yet known.
+Work around these issues by not doing GPU-accelerated rendering in such
+cases.
+
+Index: qtwebengine-everywhere-src-5.11.0/src/core/web_engine_context.cpp
+===================================================================
+--- qtwebengine-everywhere-src-5.11.0.orig/src/core/web_engine_context.cpp
++++ qtwebengine-everywhere-src-5.11.0/src/core/web_engine_context.cpp
+@@ -100,6 +100,7 @@
+ #include <QOffscreenSurface>
+ #ifndef QT_NO_OPENGL
+ # include <QOpenGLContext>
++# include <QOpenGLFunctions>
+ #endif
+ #include <QQuickWindow>
+ #include <QStringList>
+@@ -178,6 +179,39 @@ void dummyGetPluginCallback(const std::v
+ }
+ #endif
+
++#ifndef QT_NO_OPENGL
++QString openGLVendor()
++{
++ QString vendor;
++
++ QOpenGLContext *oldContext = QOpenGLContext::currentContext();
++ QSurface *oldSurface = 0;
++ if (oldContext)
++ oldSurface = oldContext->surface();
++
++ QScopedPointer<QOffscreenSurface> surface( new QOffscreenSurface );
++ surface->create();
++ QOpenGLContext context;
++ if (!context.create()) {
++ qDebug() << "Error creating openGL context";
++ }
++ else if (!context.makeCurrent(surface.data())) {
++ qDebug() << "Error making openGL context current context";
++ } else {
++ const GLubyte *p;
++ QOpenGLFunctions *f = context.functions();
++ if ((p = f->glGetString(GL_VENDOR)))
++ vendor = QString::fromLatin1(reinterpret_cast<const char *>(p));
++ }
++
++ context.doneCurrent();
++ if (oldContext && oldSurface)
++ oldContext->makeCurrent(oldSurface);
++
++ return vendor;
++}
++#endif
++
+ } // namespace
+
+ namespace QtWebEngineCore {
+@@ -414,6 +448,27 @@ WebEngineContext::WebEngineContext()
+ const char *glType = 0;
+ #ifndef QT_NO_OPENGL
+
++ bool disableGpu = qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_GPU");
++
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND") && platform.startsWith("wayland", Qt::CaseInsensitive))
++ {
++ qWarning() << "Running on wayland. Qt WebEngine will disable usage of the GPU.\n"
++ "Note: you can set the QT_WEBENGINE_DISABLE_WAYLAND_WORKAROUND\n"
++ "environment variable before running this application, but this is \n"
++ "not recommended since this usually causes applications to crash.";
++ disableGpu = true;
++ }
++
++ if (!qEnvironmentVariableIsSet("QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND") && openGLVendor() == QStringLiteral("nouveau"))
++ {
++ qWarning() << "Nouveau openGL driver detected. Qt WebEngine will disable usage of the GPU.\n"
++ "Note: you can set the QT_WEBENGINE_DISABLE_NOUVEAU_WORKAROUND\n"
++ "environment variable before running this application, but this is \n"
++ "not recommended since this usually causes applications to crash as\n"
++ "Nouveau openGL drivers don't support multithreaded rendering";
++ disableGpu = true;
++ }
++
+ bool tryGL =
+ !usingANGLE()
+ && (!usingSoftwareDynamicGL()
+@@ -424,7 +479,7 @@ WebEngineContext::WebEngineContext()
+ || enableWebGLSoftwareRendering
+ #endif
+ )
+- && !usingQtQuick2DRenderer();
++ && !usingQtQuick2DRenderer() && !disableGpu;
+
+ if (tryGL) {
+ if (qt_gl_global_share_context() && qt_gl_global_share_context()->isValid()) {