Review Request 126466: Drop unneeded timer from PlasmaCore.IconItem

David Edmundson david at davidedmundson.co.uk
Tue Dec 22 13:04:01 UTC 2015



> On Dec. 22, 2015, 11:59 a.m., David Edmundson wrote:
> > src/declarativeimports/core/iconitem.cpp, line 406
> > <https://git.reviewboard.kde.org/r/126466/diff/1/?file=425194#file425194line406>
> >
> >     One of the (albeit extremely flimsy) arguments to a timer is changing both the width and height means we do a loadPixmap twice.
> >     
> >     Could we move:
> >       const int iconSize = Units::roundToIconSize(qMin(boundingRect().size().width(), boundingRect().size().height()));
> >       
> >     to be a member var outside loadPixmap and only call loadPixmap if that acutally changes?
> 
> Marco Martin wrote:
>     yes, the timer was put there to avoid two loadpixmap in geometry changes.
>     the change you propose (David) would indeed avoid many of those duplicate kloadPixmap, especially during scalid up.
>     perhaps there would still be some problem while scalig down?
>     ie the icon is 40x40
>     width gets set to 28 -> 28x28 pixmap loaded
>     height gets set to 16 -> 16x16 pixmap gets loaded immediately after

we could move the actual loading into update() ?

By then all QML processing for that frame has finished.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126466/#review89900
-----------------------------------------------------------


On Dec. 22, 2015, 3:17 a.m., Eike Hein wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126466/
> -----------------------------------------------------------
> 
> (Updated Dec. 22, 2015, 3:17 a.m.)
> 
> 
> Review request for Plasma and David Edmundson.
> 
> 
> Bugs: 345545
>     http://bugs.kde.org/show_bug.cgi?id=345545
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> This timer seems to exist purely to delay loading the pixmap for the purpose of "hey, maybe it will work later ..." when it's not actually needed thanks to QQmlParserStatus. Dropping it brings speed up to par with QIconItem and fixes various icon flicker around Plasma, in particular in the Task Manager: When swapping out a launcher delegate for a task delegate, or when swapping out delegates during virtual desktop switches.
> 
> 
> Diffs
> -----
> 
>   src/declarativeimports/core/iconitem.cpp e260487 
> 
> Diff: https://git.reviewboard.kde.org/r/126466/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Eike Hein
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20151222/e2527558/attachment-0001.html>


More information about the Plasma-devel mailing list