diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-08-12 15:06:04 +0200 |
---|---|---|
committer | Alan Alpert <aalpert@blackberry.com> | 2014-08-14 03:16:25 +0200 |
commit | da7df10b3d5769d1da7851895d27257a0d930012 (patch) | |
tree | 2f17f98f295fd368773df3bf24339855e940d730 /src | |
parent | a0986e6116e3a98f181cfd77fbcd3cf168dbc565 (diff) |
Disable threaded FBO canvas drawing when not supported.
Change-Id: I1e8300c61ba31a5400fc43f85a9c39d2245b4518
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 3cc4dd04ad..e7eef048cc 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -70,6 +70,9 @@ #include <private/qv4objectproto_p.h> #include <private/qv4scopedvalue_p.h> +#include <private/qguiapplication_p.h> +#include <qpa/qplatformintegration.h> + #include <QtCore/QRunnable> #if defined(Q_OS_QNX) || defined(Q_OS_ANDROID) @@ -4156,6 +4159,13 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args } #endif + // Disable threaded background rendering if the platform has issues with it + if (m_renderTarget == QQuickCanvasItem::FramebufferObject + && m_renderStrategy == QQuickCanvasItem::Threaded + && !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL)) { + m_renderTarget = QQuickCanvasItem::Image; + } + switch (m_renderTarget) { case QQuickCanvasItem::Image: m_texture = new QQuickContext2DImageTexture; |