Review Request: frame plasmoid: image load and scaling with threads

Davide Bettio davide.bettio at kdemail.net
Mon Mar 8 14:35:45 CET 2010



> On 2010-03-08 11:47:49, Sebastian Kügler wrote:
> > /trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp, line 255
> > <http://reviewboard.kde.org/r/3162/diff/3/?file=20458#file20458line255>
> >
> >     This is a hot path (it gets called whenever the applet resizes, which can be quite often during drags). Doing a QImage -> QPixmap conversion here is not a good idea.
> >     
> >     The QPixmap-based version would just blit the pixmap into a smaller rect which is fast (it can be hw-accelerated)

We have to convert the QImage to QPixmap somewhere and we can't do that in a different thread.


- Davide


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/3162/#review4411
-----------------------------------------------------------


On 2010-03-08 02:27:47, Davide Bettio wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/3162/
> -----------------------------------------------------------
> 
> (Updated 2010-03-08 02:27:47)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> First of all: **This is a preview of the patch** I'm still working on it but I need some advices.
> Picture Frame does 2 really bad things (when used with huge images):
> * it loads huge images (in my case 4000x3000 pixels) into X11 pixmaps
> * plasma is blocked while the image is scaled
> As side effect also X11 freezes.
> 
> This patch solves both issues using threads.
> 
> I think that we should remove "smooth scaling" option from our configuration UI. what do you think?
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdeplasma-addons/applets/frame/CMakeLists.txt 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/appearanceSettings.ui 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/configdialog.h 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/configdialog.cpp 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/frame.h 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/frame.cpp 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/imageloader.cpp PRE-CREATION 
>   /trunk/KDE/kdeplasma-addons/applets/frame/imagescaler.cpp PRE-CREATION 
>   /trunk/KDE/kdeplasma-addons/applets/frame/picture.h 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/picture.cpp 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/slideshow.h 1093624 
>   /trunk/KDE/kdeplasma-addons/applets/frame/slideshow.cpp 1093624 
> 
> Diff: http://reviewboard.kde.org/r/3162/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Davide
> 
>



More information about the Plasma-devel mailing list