diff options
Diffstat (limited to 'dev-qt/qtwebengine/files')
-rw-r--r-- | dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch | 98 | ||||
-rw-r--r-- | dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch | 24 |
2 files changed, 0 insertions, 122 deletions
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 deleted file mode 100644 index aaf3aae462ab..000000000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.11.1-nouveau-disable-gpu.patch +++ /dev/null @@ -1,98 +0,0 @@ -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()) { diff --git a/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch b/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch deleted file mode 100644 index ba6a49fd7488..000000000000 --- a/dev-qt/qtwebengine/files/qtwebengine-5.9.6-gcc8.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Fedora -Subject: Fix build for 32-bit platforms - -Apparently not upstream, can't find this anywhere. So I assume Fedora is the actual source? -https://src.fedoraproject.org/cgit/rpms/chromium.git/tree/chromium-66.0.3359.170-gcc8-alignof.patch - -diff -up chromium-66.0.3359.170/src/3rdparty/chromium/mojo/public/c/system/macros.h.gcc8-alignof chromium-66.0.3359.170/src/3rdparty/chromium/mojo/public/c/system/macros.h ---- a/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:46.448912634 -0400 -+++ b/src/3rdparty/chromium/mojo/public/c/system/macros.h 2018-05-15 14:58:52.041784613 -0400 -@@ -18,7 +18,13 @@ - #endif - - // Like the C++11 |alignof| operator. --#if __cplusplus >= 201103L -+#if defined(__GNUC__) && __GNUC__ >= 8 -+// GCC 8 has changed the alignof operator to return the minimal alignment -+// required by the target ABI, instead of the preferred alignment. -+// This means that on 32-bit x86, it will return 4 instead of 8. -+// Use __alignof__ instead to avoid this. -+#define MOJO_ALIGNOF(type) __alignof__(type) -+#elif __cplusplus >= 201103L - #define MOJO_ALIGNOF(type) alignof(type) - #elif defined(__GNUC__) - #define MOJO_ALIGNOF(type) __alignof__(type) |