summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-07 19:10:53 +0200
committerLiang Qi <liang.qi@qt.io>2018-06-07 19:10:53 +0200
commit096e37910d93f9c52976600e985c615ea36fe291 (patch)
tree713d020f4a04f03d8ca6e111055e7eebe85953a8 /tests/auto/other
parent88eda007a3b5046999dd0b287634765efcd8934d (diff)
parenta14a943f9ac3d1e85514d7fb6688c84e624ac850 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/lancelot/tst_lancelot.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp
index 79d0f7c6cf..15267d256e 100644
--- a/tests/auto/other/lancelot/tst_lancelot.cpp
+++ b/tests/auto/other/lancelot/tst_lancelot.cpp
@@ -39,6 +39,10 @@
#include <algorithm>
+#ifndef GL_RGB10
+#define GL_RGB10 0x8052
+#endif
+
class tst_Lancelot : public QObject
{
Q_OBJECT
@@ -85,6 +89,8 @@ private slots:
#ifndef QT_NO_OPENGL
void testOpenGL_data();
void testOpenGL();
+ void testOpenGLBGR30_data();
+ void testOpenGLBGR30();
void testCoreOpenGL_data();
void testCoreOpenGL();
private:
@@ -279,6 +285,16 @@ void tst_Lancelot::testOpenGL()
runTestSuite(OpenGL, QImage::Format_RGB32);
}
+void tst_Lancelot::testOpenGLBGR30_data()
+{
+ tst_Lancelot::testOpenGL_data();
+}
+
+void tst_Lancelot::testOpenGLBGR30()
+{
+ runTestSuite(OpenGL, QImage::Format_BGR30);
+}
+
void tst_Lancelot::testCoreOpenGL_data()
{
if (!checkSystemCoreGLSupport())
@@ -329,6 +345,8 @@ void tst_Lancelot::runTestSuite(GraphicsEngine engine, QImage::Format format, co
QOpenGLFramebufferObjectFormat fmt;
fmt.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
fmt.setSamples(4);
+ if (format == QImage::Format_BGR30)
+ fmt.setInternalTextureFormat(GL_RGB10);
QOpenGLContext ctx;
ctx.setFormat(contextFormat);
QVERIFY(ctx.create());