[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Is it possible to know when a PlasmaCore IconItem is ready?
From:       David Edmundson <david () davidedmundson ! co ! uk>
Date:       2016-07-29 9:58:07
Message-ID: CAGeFrHAzoCTw2mioaakUM_YsUihT6aHww0zD2yX1HW6sAQ2T4w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Jul 28, 2016 at 10:40 PM, Michail Vourlakos <mvourlakos@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@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>

[Attachment #5 (text/html)]

<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul \
28, 2016 at 10:40 PM, Michail Vourlakos <span dir="ltr">&lt;<a \
href="mailto:mvourlakos@gmail.com" \
target="_blank">mvourlakos@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="">&gt;<br> &gt;&gt; for DropShadow and the \
animation for hover to add it<br> &gt;&gt; in the PlasmaCore.IconItem right?<br>
&gt;&gt;<br>
&gt;<br>
&gt; I&#39;d put the animation in the DropShadow itself and scale that.<br>
&gt;<br>
&gt; I bet changing the size of a ShaderEffectSource triggers a re-render, and<br>
&gt; that&#39;s why you see the performance hit.<br>
&gt;<br>
&gt; Currently you&#39;re changing the iconImageBuffer but the QSGTextureProvider \
it<br> &gt; created will just remain static.<br>
&gt;<br>
<br>
</span>the following code drops my performance to half comparing to the<br>
Images solution,<br>
do I miss something? :<br>
<br></blockquote><div><br><br></div><div>Move the IconItem outside the \
DropShadow.<br></div><div>Otherwise you&#39;re scaling the source still, which is \
what we want to avoid.<br></div><br><div>Out of curiosity, how are you measuring \
performance?<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 \
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
      DropShadow {<br>
            id:shadowImageNoActive<br>
<br>
            width: 64<br>
            height: 64<br>
<br>
            scale: wrapper.scale * wrapper.appearScale<br>
<br>
            anchors.centerIn: parent<br>
<br>
            radius: 7.0<br>
            samples: 10<br>
            color: &quot;#90080808&quot;<br>
            source: ShaderEffectSource {<br>
                  id:effectSource<br>
                  width: iconImage.width<br>
                  height: iconImage.height<br>
                  sourceItem: iconImage<br>
                  hideSource: true<br>
                  live: false<br>
            }<br>
<br>
            PlasmaCore.IconItem {<br>
                  id: iconImage<br>
<br>
                  width:64<br>
                  height:64<br>
<br>
                  anchors.centerIn: parent<br>
<span class="im HOEnZb"><br>
                  active: true<br>
                  enabled: true<br>
                  usesPlasmaTheme: false<br>
<br>
                  source: decoration<br>
<br>
            }<br>
<br>
      }<br>
</span><div class="HOEnZb"><div \
class="h5">_______________________________________________<br> Plasma-devel mailing \
list<br> <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" rel="noreferrer" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
</div></div></blockquote></div><br></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic