From 176b62f327198166c4dc691606d562724ea438b6 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Tue, 10 Apr 2018 13:25:06 +1000 Subject: webassembly: use default opengl backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaaa9776846ae10f5f4b04f2fd4da52deeac66f0a Reviewed-by: Morten Johan Sørvig --- src/quick/items/qquickflickable.cpp | 3 +++ src/quick/items/qquickview.cpp | 4 ---- src/quick/scenegraph/qsgcontextplugin.cpp | 3 --- src/quick/scenegraph/qsgrenderloop.cpp | 4 ++++ src/quick/scenegraph/scenegraph.pri | 1 + 5 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/quick') diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp index 8cb64377cc..d4f10a9fd9 100644 --- a/src/quick/items/qquickflickable.cpp +++ b/src/quick/items/qquickflickable.cpp @@ -493,6 +493,9 @@ void QQuickFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal maxExt data.inOvershoot = false; fixupMode = Normal; data.vTime = timeline.time(); +#ifdef Q_OS_HTML5 + QCoreApplication::processEvents(QEventLoop::EventLoopExec); +#endif } static bool fuzzyLessThanOrEqualTo(qreal a, qreal b) diff --git a/src/quick/items/qquickview.cpp b/src/quick/items/qquickview.cpp index 17f6539974..1ac6c768e8 100644 --- a/src/quick/items/qquickview.cpp +++ b/src/quick/items/qquickview.cpp @@ -102,11 +102,7 @@ void QQuickViewPrivate::execute() } if (!source.isEmpty()) { QML_MEMORY_SCOPE_URL(engine.data()->baseUrl().resolved(source)); -#ifdef Q_OS_HTML5 - component = new QQmlComponent(engine.data(), source, QQmlComponent::PreferSynchronous, q); -#else component = new QQmlComponent(engine.data(), source, q); -#endif if (!component->isLoading()) { q->continueExecute(); } else { diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 31f1c4c722..628619fa46 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -135,9 +135,6 @@ QSGAdaptationBackendData *contextFactory() && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) { requestedBackend = QString::fromLocal8Bit("software"); } -#ifdef Q_OS_HTML5 - requestedBackend = QString::fromLocal8Bit("software"); -#endif if (!requestedBackend.isEmpty()) { qCDebug(QSG_LOG_INFO, "Loading backend %s", qUtf8Printable(requestedBackend)); diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 8130272295..a55b7b4ad9 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -207,6 +207,7 @@ QSGRenderLoop *QSGRenderLoop::instance() if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) loopType = ThreadedRenderLoop; #endif + if (qmlNoThreadedRenderer()) loopType = BasicRenderLoop; else if (qmlForceThreadedRenderer()) @@ -469,6 +470,9 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) // Might have been set during syncSceneGraph() if (data.updatePending) maybeUpdate(window); +#ifdef Q_OS_HTML5 + QCoreApplication::processEvents(QEventLoop::EventLoopExec); +#endif } void QSGGuiThreadRenderLoop::exposureChanged(QQuickWindow *window) diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri index 4fa3e7b6bf..ac70c3153f 100644 --- a/src/quick/scenegraph/scenegraph.pri +++ b/src/quick/scenegraph/scenegraph.pri @@ -1,5 +1,6 @@ # DEFINES += QSG_SEPARATE_INDEX_BUFFER # DEFINES += QSG_DISTANCEFIELD_CACHE_DEBUG +emscripten: DEFINES += QSG_SEPARATE_INDEX_BUFFER # Core API HEADERS += \ -- cgit v1.2.3