diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2014-02-05 20:35:11 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-02-19 11:56:32 +0100 |
commit | 52e39c35ee227a9eb1b1a182f9a873c4e7e55825 (patch) | |
tree | 9c21100468505000fc374b778c4e309f59ddd54b | |
parent | 47ec6dbcba57b0b0f7dbeb00bef24f8d85112947 (diff) | |
download | meta-qt5-52e39c35ee227a9eb1b1a182f9a873c4e7e55825.tar.gz |
qtbase: eglfs: fix egl error for platforms only supporting one window/surface
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | recipes-qt/qt5/qtbase.inc | 1 | ||||
-rw-r--r-- | recipes-qt/qt5/qtbase/0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch | 63 |
2 files changed, 64 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc index f0563938..d61d2dbf 100644 --- a/recipes-qt/qt5/qtbase.inc +++ b/recipes-qt/qt5/qtbase.inc | |||
@@ -18,6 +18,7 @@ SRC_URI += "\ | |||
18 | file://0011-Allow-building-a-separate-qmake-for-the-target.patch \ | 18 | file://0011-Allow-building-a-separate-qmake-for-the-target.patch \ |
19 | file://0012-qtbase-allow-build-of-examples.patch \ | 19 | file://0012-qtbase-allow-build-of-examples.patch \ |
20 | file://0013-QOpenGLPaintDevice-sub-area-support.patch \ | 20 | file://0013-QOpenGLPaintDevice-sub-area-support.patch \ |
21 | file://0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch \ | ||
21 | " | 22 | " |
22 | 23 | ||
23 | DEPENDS += "qtbase-native" | 24 | DEPENDS += "qtbase-native" |
diff --git a/recipes-qt/qt5/qtbase/0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch b/recipes-qt/qt5/qtbase/0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch new file mode 100644 index 00000000..6fd29381 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0014-eglfs-fix-egl-error-for-platforms-only-supporting-on.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | From c8995c6eb6cf4bfa8daf1e3e96bd4885a096f405 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | ||
3 | Date: Wed, 5 Feb 2014 18:35:08 +0100 | ||
4 | Subject: [PATCH 14/14] eglfs: fix egl error for platforms only supporting one | ||
5 | window/surface | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | running qmlscene -platform eglfs <filename>.qml | ||
11 | |||
12 | caused | ||
13 | |||
14 | EGL Error : Could not create the egl surface: error = 0x3003 | ||
15 | |||
16 | Rebased version of [1-2] | ||
17 | |||
18 | Upstream-Status: unknown | ||
19 | |||
20 | [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 | ||
21 | [2] https://github.com/prabindh/qt-configs/blob/master/qt5_1.0_Feb13/qeglfswindow.cpp.patch | ||
22 | |||
23 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | ||
24 | --- | ||
25 | src/plugins/platforms/eglfs/qeglfswindow.cpp | 15 +++++++++++++++ | ||
26 | 1 file changed, 15 insertions(+) | ||
27 | |||
28 | diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp | ||
29 | index bba00da..567820c 100644 | ||
30 | --- a/src/plugins/platforms/eglfs/qeglfswindow.cpp | ||
31 | +++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp | ||
32 | @@ -87,6 +87,16 @@ void QEglFSWindow::create() | ||
33 | if (m_flags.testFlag(Created)) | ||
34 | return; | ||
35 | |||
36 | + static EGLSurface __singleWindowSurface; | ||
37 | + if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows) && (__singleWindowSurface)) | ||
38 | + { | ||
39 | + m_surface = __singleWindowSurface; | ||
40 | +#ifdef QEGL_EXTRA_DEBUG | ||
41 | + qWarning("Surface recreate request, re-using %x\n", m_surface); | ||
42 | +#endif | ||
43 | + return; | ||
44 | + } | ||
45 | + | ||
46 | m_flags = Created; | ||
47 | m_wid = newWId(); | ||
48 | |||
49 | @@ -130,6 +140,11 @@ void QEglFSWindow::create() | ||
50 | |||
51 | resetSurface(); | ||
52 | |||
53 | + if(QEglFSHooks::hooks() && !QEglFSHooks::hooks()->hasCapability(QPlatformIntegration::MultipleWindows)) | ||
54 | + { | ||
55 | + __singleWindowSurface = m_surface; | ||
56 | + } | ||
57 | + | ||
58 | screen->setPrimarySurface(m_surface); | ||
59 | |||
60 | if (m_flags.testFlag(IsRaster)) { | ||
61 | -- | ||
62 | 1.8.5.3 | ||
63 | |||