summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-03-14 16:47:11 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-03-19 08:24:33 +0000
commit2417cade46d5680fe4a23ad2e3d1607b3989c758 (patch)
tree6aac1af7b2607923ce492b148fda6ade82360dae /tests/auto/gui/kernel
parentefa6e989125b3a9cf54a408aae8a86ef4bddf778 (diff)
tst_QOpenGLWindow: Move resizing to separate test
Resizing is broken on Wayland EGL on Intel Mesa. Move resizing into a separate test and skip it on Wayland it until it's fixed in Mesa. Task-number: QTBUG-66848 Change-Id: I9450a5a588b0f5d8f0bd0210aae2dc72aa48d622 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
index 8ffd1bb9b4..a971450ee8 100644
--- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
+++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp
@@ -42,6 +42,7 @@ private slots:
void initTestCase();
void create();
void basic();
+ void resize();
void painter();
void partial_data();
void partial();
@@ -115,8 +116,7 @@ void tst_QOpenGLWindow::basic()
// Check that the virtuals are invoked.
QCOMPARE(w.initCount, 1);
- int resCount = w.resizeCount;
- QVERIFY(resCount >= 1);
+ QVERIFY(w.resizeCount >= 1);
QVERIFY(w.paintCount >= 1);
// Check that something has been drawn;
@@ -132,6 +132,27 @@ void tst_QOpenGLWindow::basic()
QCOMPARE(v[2], GLint(w.width() * w.devicePixelRatio()));
QCOMPARE(v[3], GLint(w.height() * w.devicePixelRatio()));
w.doneCurrent();
+}
+
+static bool isPlatformWayland()
+{
+ return QGuiApplication::platformName().startsWith(QLatin1String("wayland"), Qt::CaseInsensitive);
+}
+
+void tst_QOpenGLWindow::resize()
+{
+ if (isPlatformWayland())
+ QSKIP("Wayland: Crashes on Intel Mesa due to a driver bug (QTBUG-66848).");
+
+ Window w;
+ w.reset();
+ w.resize(640, 480);
+ w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
+
+ // Check that the virtuals are invoked.
+ int resCount = w.resizeCount;
+ QVERIFY(resCount >= 1);
// Check that a future resize triggers resizeGL.
w.resize(800, 600);