diff options
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d.cpp')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 1a0d6287aa..a3644c313b 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) @@ -2119,7 +2122,7 @@ QV4::ReturnedValue QQuickJSContext2DPrototype::method_fillRect(QV4::CallContext } /*! - \qmlmethod object QtQuick::Context2D::fillRect(real x, real y, real w, real h) + \qmlmethod object QtQuick::Context2D::strokeRect(real x, real y, real w, real h) Stroke the specified rectangle's path using the strokeStyle, lineWidth, lineJoin, and (if appropriate) miterLimit attributes. @@ -4109,6 +4112,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; |