Is it possible to know when a PlasmaCore IconItem is ready?

David Edmundson david at davidedmundson.co.uk
Fri Jul 29 09:58:07 UTC 2016


On Thu, Jul 28, 2016 at 10:40 PM, Michail Vourlakos <mvourlakos at gmail.com>
wrote:

> >
> >> for DropShadow and the animation for hover to add it
> >> in the PlasmaCore.IconItem right?
> >>
> >
> > I'd put the animation in the DropShadow itself and scale that.
> >
> > I bet changing the size of a ShaderEffectSource triggers a re-render, and
> > that's why you see the performance hit.
> >
> > Currently you're changing the iconImageBuffer but the QSGTextureProvider
> it
> > created will just remain static.
> >
>
> the following code drops my performance to half comparing to the
> Images solution,
> do I miss something? :
>
>

Move the IconItem outside the DropShadow.
Otherwise you're scaling the source still, which is what we want to avoid.

Out of curiosity, how are you measuring performance?


>     DropShadow {
>         id:shadowImageNoActive
>
>         width: 64
>         height: 64
>
>         scale: wrapper.scale * wrapper.appearScale
>
>         anchors.centerIn: parent
>
>         radius: 7.0
>         samples: 10
>         color: "#90080808"
>         source: ShaderEffectSource {
>             id:effectSource
>             width: iconImage.width
>             height: iconImage.height
>             sourceItem: iconImage
>             hideSource: true
>             live: false
>         }
>
>         PlasmaCore.IconItem {
>             id: iconImage
>
>             width:64
>             height:64
>
>             anchors.centerIn: parent
>
>             active: true
>             enabled: true
>             usesPlasmaTheme: false
>
>             source: decoration
>
>         }
>
>     }
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160729/5517094d/attachment-0001.html>


More information about the Plasma-devel mailing list