summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaner Altinbasak <caner.altinbasak@gmail.com>2015-05-15 22:06:02 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-05-28 07:18:07 +0000
commit5f2e4d3116593a566c03707d35c8a18b1e461855 (patch)
tree1a065ec61b1c7db3ddef353b6f385715b89e787f
parent584576aeeefd9c0b53de6fd5fc83b3316dce7fd7 (diff)
Fix for eglfs context sharing problem in qtwebengine widget
EGLFS backend does not use global sharing context. WebEngineWidgets was failing to access textures created by WebEngineChromium and textures were ending up as black rectangles. This fix initialises window surface context with shared context and fixes the bug. Change-Id: I97189c06ee593ba55f353f44c23233175ebd3cba Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index 30fdce9fd3..c0d51c94a5 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -35,6 +35,7 @@
#include <qpa/qwindowsysteminterface.h>
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
+#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/QOpenGLContext>
#include <QtPlatformSupport/private/qeglplatformcursor_p.h>
#include <QtPlatformSupport/private/qeglconvenience_p.h>
@@ -106,6 +107,7 @@ void QEglFSWindow::create()
if (isRaster()) {
QOpenGLContext *context = new QOpenGLContext(QGuiApplication::instance());
+ context->setShareContext(qt_gl_global_share_context());
context->setFormat(m_format);
context->setScreen(window()->screen());
if (!context->create())