[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-28 12:21:13
Message-ID: CAGeFrHD4BMiT6aXOPnJ1KPT6bEmgQ0k697Hkb6-Dd1ETaCO8bw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
On Thu, Jul 28, 2016 at 1:08 PM, Michail Vourlakos <mvourlakos@gmail.com>
wrote:
> David, I had tried it some iterations before in my code path, it wasnt
> as equally performant as the Images solution, I will give it one more
> try...
>
> I suppose you are proposing to drop Images, add a ShaderEffectSource
> with live:false
Yes.
> 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.
> PlasmaCore.IconItem {
> id: iconImage
> width: 2 * panel.iconSize - 8
> height: 2 * panel.iconSize - 8
>
> property int newTempSize: Math.floor(panel.iconSize *
> wrapper.scale * wrapper.appearScale)
> width: newTempSize
> height: newTempSize
>
>
>
> On 7/28/16, David Edmundson <david@davidedmundson.co.uk> wrote:
> > ShaderEffectSource with live:false should be equally performant as this
> (if
> > anything more so).
> > It /should/ also fix your code.
> >
> > Then call scheduleUpdate() whenever onSourceChanged is emitted.
> >
> > We load the pixmap in the polish() event which happens between all QML
> > processing and the frame being rendered.
> > There's no timer.
> >
> _______________________________________________
> 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 1:08 PM, Michail Vourlakos <span dir="ltr"><<a target="_blank" \
href="mailto:mvourlakos@gmail.com">mvourlakos@gmail.com</a>></span> \
wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex" class="gmail_quote">David, I had tried it some \
iterations before in my code path, it wasnt<br> as equally performant as the Images \
solution, I will give it one more<br> try...<br></blockquote><blockquote \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex" class="gmail_quote"> <br>
I suppose you are proposing to drop Images, add a ShaderEffectSource<br>
with live:false</blockquote><div><br></div><div>Yes.<br></div><div> \
</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex" class="gmail_quote"> for DropShadow and the \
animation for hover to add it<br> in the PlasmaCore.IconItem \
right?<br></blockquote><div><br></div><div>I'd put the animation in the \
DropShadow itself and scale that.<br></div><br></div><div \
class="gmail_quote"></div><div class="gmail_quote">I bet changing the size of a \
ShaderEffectSource triggers a re-render, and that's why you see the performance \
hit.<br><br></div><div class="gmail_quote">Currently you're changing the \
iconImageBuffer but the QSGTextureProvider it created will just remain \
static.<br></div><div class="gmail_quote"><div> <br><br><br><br></div><blockquote \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex" class="gmail_quote"> <span class="gmail-im \
gmail-HOEnZb"><br> PlasmaCore.IconItem {<br>
id: iconImage<br>
width: 2 * panel.iconSize - 8<br>
height: 2 * panel.iconSize - 8<br>
<br>
</span><span class="gmail-im gmail-HOEnZb">property int newTempSize: \
Math.floor(panel.iconSize *<br> wrapper.scale * wrapper.appearScale)<br>
width: newTempSize<br>
height: newTempSize<br>
<br>
<br>
<br>
</span><div class="gmail-HOEnZb"><div class="gmail-h5">On 7/28/16, David Edmundson \
<<a href="mailto:david@davidedmundson.co.uk">david@davidedmundson.co.uk</a>> \
wrote:<br> > ShaderEffectSource with live:false should be equally performant as \
this (if<br> > anything more so).<br>
> It /should/ also fix your code.<br>
><br>
> Then call scheduleUpdate() whenever onSourceChanged is emitted.<br>
><br>
> We load the pixmap in the polish() event which happens between all QML<br>
> processing and the frame being rendered.<br>
> There's no timer.<br>
><br>
</div></div><div class="gmail-HOEnZb"><div \
class="gmail-h5">_______________________________________________<br> Plasma-devel \
mailing list<br> <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a target="_blank" rel="noreferrer" \
href="https://mail.kde.org/mailman/listinfo/plasma-devel">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