diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 1640b58c75f06822b444dc089ed4641f9e6268f2..b987a398a5be22b4b7a26259c9690ae5285c6aac 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -465,7 +465,7 @@ void QQuickWindowPrivate::init(QQuickWindow *c, QQuickRenderControl *control) context = windowManager->createRenderContext(sg); } - q->setSurfaceType(QWindow::OpenGLSurface); + q->setSurfaceType(windowManager ? windowManager->windowSurfaceType() : QSurface::OpenGLSurface); q->setFormat(q->defaultFormat()); animationController = new QQuickAnimatorController(); diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 064d363412b0ecb960ad85b2efcde9c762c6d482..0f43ecffd7c84ea1316a49a50f5645cc746d89e4 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -86,6 +86,11 @@ QSGRenderLoop::~QSGRenderLoop() { } +QSurface::SurfaceType QSGRenderLoop::windowSurfaceType() const +{ + return QSurface::OpenGLSurface; +} + void QSGRenderLoop::cleanup() { if (!s_instance) diff --git a/src/quick/scenegraph/qsgrenderloop_p.h b/src/quick/scenegraph/qsgrenderloop_p.h index 8d5312b188dfcfc694a29d3c7059ca840926cd60..b398a64234f6a5f08ffe061932f609d1181201e4 100644 --- a/src/quick/scenegraph/qsgrenderloop_p.h +++ b/src/quick/scenegraph/qsgrenderloop_p.h @@ -43,6 +43,7 @@ #define QSGRenderLoop_P_H #include <QtGui/QImage> +#include <QtGui/QSurface> #include <private/qtquickglobal_p.h> #include <QtCore/QSet> @@ -83,6 +84,8 @@ public: void removeWindow(QQuickWindow *win) { m_windows.remove(win); } QSet<QQuickWindow *> windows() const { return m_windows; } + virtual QSurface::SurfaceType windowSurfaceType() const; + // ### make this less of a singleton static QSGRenderLoop *instance(); static void setInstance(QSGRenderLoop *instance);