D22375: new class KBusyIndicatorWidget similar to QtQuick's BusyIndicator
René J.V. Bertin
noreply at phabricator.kde.org
Thu Oct 3 11:58:15 BST 2019
rjvbb added a comment.
> Does it happen with every code that uses QPropertyAnimation, or just with this KBusyIndicator?
I don't know, neither for QVariantAnimation (which is used here).
Testing just now (on the N3150 machine) with the Sliders page of the oxygen-demo app I get between 30% and 35% CPU (!) with Fusion, Breeze and Oxygen (which all use something based on QAbstractAnimation). QtCurve uses an internal, QTimer-based implementation that uses about half that (still too much I realise now).
I should add that I use a traditional icon theme, pixmap instead of svg based. Rotating pixmaps is maybe much more expensive than rotating and svg, and both probably depend on how much of it is done in vector intrinsics.
Traditionally, this kind of animation used either pre-calculated frames (cf. the busy cursors) or else colourmap animation (which is *very* cheap). The latter is not going to be feasible here but building table (QVector?) of a reasonable number of pre-rotated pixmaps and looping over that should be possible (can even be done "online" by caching the frames as you display them). Of course my current workaround is a lot easier and should be fine a long as the animation doesn't run on the same thread as the actually busy one.
REPOSITORY
R236 KWidgetsAddons
REVISION DETAIL
https://phabricator.kde.org/D22375
To: sitter, cfeck, apol
Cc: rjvbb, ngraham, kossebau, broulik, kde-frameworks-devel, apol, LeGast00n, GB_2, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191003/bebc0f06/attachment.html>
More information about the Kde-frameworks-devel
mailing list