We previously only supported compose-over-border when the centre was not
set to tile.
It's possible to use compose over border with tile.. even if it doesn't
make much sense.
Given that creating an opacityMask loads most of the image anyway, we
can make use of the FrameSVG painter path and avoid any additional code
complexity here.
REVIEW: 119406
this is the little part in plasma-framework for the applet alternatives chooser.
works together the branch mart/alternativesConfig of plasma-workspace and plsma-desktop.
for how it looks and why, see the vdg forum thread:
https://forum.kde.org/viewtopic.php?f=285&t=122067&p=315919#p315919
still possible problems:
I'm not sure about using a new desktop file entry X-Plasma-Provides, maybe Categories could be enough, but it may produce many false positives as well
REVIEW:119409
It was needed, after this we realized that the buttons looked odd,
in some cases, because the center wouldn't be under the 2px wide
sides.
This reverts commit e34d89a1f5.
Breeze theme usually has borders and center that can be tiled, which
ends up in more performant rendering, as we don't need to re-render
anything from the svg every time we resize an element.
Basically what we did was "s/hint-stretch-borders/hint-tile-center/g".
The only exceptions we found for this were: picker, dragger and monitor.
Reviewed by David Edmundson
CCMAIL: plasma-devel@kde.org
Revert the changes in contentsRect, it was clearly not the best place to
put the code that contains the code that computes the content size.
Instead move the code in FrameSvgItem, duplicates data and code but works.
Use FrameSVG as 9 tiles instead of uploading a big texture of the finished frame each time.
This also saves the cache being populated with full created frames in different sizes; which end up taking up space in the disk and shared memory cache as well as the GPU memory.
A code path falls back to the original uploading the entire texture if obscure settings are used, i.e overlay.
Benchmarks:
apitrace when resizing a frame goes from an average of 7.6ms per frame of CPU time just for the swizzling and uploading to 1.4ms
GPU time also drops from 40us to 10us
Themes will need to remove stretch-borders (when we gain nothing from stretching; i.e Breeze) to get the most out of it.
REVIEW: 119330
It's unreasonable to use private API, so make everything public API so that
every user of FrameSvg have as much features exposed as possible.
Reviewed by David Edmundson
While debugging a glitch I found out a bug in the painting code that hide
behind QRect documentation. See comment in sectionRect. This never rendered
correctly.
This reverts commit c38e6a204e.
This causes problems on the panel toolbox.
We were already trying to set a parent; however as it's a property of a QQuickItem
it only changes the visual parent; kdeclarative has a code path that if there's
a visual parent to skip the memory management; bug is probably there instead.