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
This commit is contained in:
David Edmundson 2017-09-27 15:50:49 +01:00
parent 94235482f9
commit daef5c8b6b

View File

@ -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();