generic-poky/meta-qt5/recipes-qt/qt5/qtbase/0014-eglfs-fix-egl-error-fo...

64 lines
2.0 KiB
Diff

From c8995c6eb6cf4bfa8daf1e3e96bd4885a096f405 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Wed, 5 Feb 2014 18:35:08 +0100
Subject: [PATCH 14/14] eglfs: fix egl error for platforms only supporting one
window/surface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
running qmlscene -platform eglfs <filename>.qml
caused
EGL Error : Could not create the egl surface: error = 0x3003
Rebased version of [1-2]
Upstream-Status: unknown
[1] http://repository.timesys.com/buildsources/q/qt-everywhere-opensource/qt-everywhere-opensource-5.1.1/qt-everywhere-opensource-5.1.1-qeglfswindow.cpp.patch
[2] https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/qeglfswindow.cpp.patch
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/plugins/platforms/eglfs/qeglfswindow.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index bba00da..567820c 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -87,6 +87,16 @@ void QEglFSWindow::create()
if (m_flags.testFlag(Created))
return;
+ static EGLSurface __singleWindowSurface;
+ if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows) && (__singleWindowSurface))
+ {
+ m_surface = __singleWindowSurface;
+#ifdef QEGL_EXTRA_DEBUG
+ qWarning("Surface recreate request, re-using %x\n", m_surface);
+#endif
+ return;
+ }
+
m_flags = Created;
m_wid = newWId();
@@ -130,6 +140,11 @@ void QEglFSWindow::create()
resetSurface();
+ if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows))
+ {
+ __singleWindowSurface = m_surface;
+ }
+
screen->setPrimarySurface(m_surface);
if (m_flags.testFlag(IsRaster)) {
--
1.8.5.3