diff options
Diffstat (limited to 'tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp')
-rw-r--r-- | tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp b/tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp index 4411107c4..213420b13 100644 --- a/tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp +++ b/tests/auto/quick/qquickwebviewgraphics/tst_qquickwebviewgraphics.cpp @@ -43,7 +43,8 @@ #include <QQmlContext> #include <QQuickView> #include <QQuickItem> -#include <QtQuick/private/qsgcontext_p.h> +#include <QPainter> +#include <qtwebengineglobal.h> class TestView : public QQuickView { Q_OBJECT @@ -111,12 +112,7 @@ void tst_QQuickWebViewGraphics::initTestCase() #if defined(TST_QQUICKWEBVIEWGRAPHICS_SOFTWARE) qApp->setProperty("QQuickWebEngineView_DisableHardwareAcceleration", QVariant(true)); #else - // This is currently needed by all QtWebEngine application using the HW accelerated QQuickWebView. - // It enables sharing between the QOpenGLContext of all QQuickWindows of the application. - // We have to do so until we expose a public API for it, or chose enable it by default in Qt 5.3.0. - QOpenGLContext *shareContext = new QOpenGLContext; - shareContext->create(); - QSGContext::setSharedOpenGLContext(shareContext); + QWebEngine::initialize(); #endif } |