From daef5c8b6b9cb7eb81a2c6be4a967170cd69a80d Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 27 Sep 2017 15:50:49 +0100 Subject: [PATCH] Fix FrameSVGItem with the software renderer Summary: Software rendering (at time of writing Qt5.10) doesn't seem to like our tiling/stretching in the 9-tiles. Also when using QPainter it's arguably faster to create and cache pixmaps of the whole frame, which is what the slow path of FrameSVGItem does. Test Plan: Ran FrameSVG test then plasma shell with scene device set Reviewers: #plasma, broulik Reviewed By: #plasma, broulik Subscribers: plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D8013 --- src/declarativeimports/core/framesvgitem.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp index 61dd74f07..af7e4beab 100644 --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -462,6 +462,12 @@ void FrameSvgItem::doUpdate() bool hasComposeOverBorder = m_frameSvg->hasElement(prefix % QLatin1String("hint-compose-over-border")) && m_frameSvg->hasElement(QLatin1String("mask-") % prefix % QLatin1String("center")); m_fastPath = !hasOverlay && !hasComposeOverBorder; + + //software rendering (at time of writing Qt5.10) doesn't seem to like our tiling/stretching in the 9-tiles. + //also when using QPainter it's arguably faster to create and cache pixmaps of the whole frame, which is what the slow path does + if (QQuickWindow::sceneGraphBackend() == QLatin1String("software")) { + m_fastPath = false; + } m_textureChanged = true; update();