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

Sebastian Kügler sebas at kde.org
Tue Mar 9 10:41:46 CET 2010


On Monday 08 March 2010 23:38:33 Aaron J. Seigo wrote:
> On March 8, 2010, Sebastian Kügler wrote:
> > Scaling on the GPU is a video card feature. Using a QImage (and thus
> > having
> 
> uploading that much data to the video card and then using the hardware
> scaling  may be slower than keeping the image in RAM, scaling on the CPU
> and then doing the data transfer to the card. in theory it shouldn't be,
> but since the GPU isn't just being used for this (but also for kwin
> compositing and any other app running and doing things) and since the
> advertised maximum texture size is still often 2048x2048 such large images
> can really put a burden on graphics system.

If we can keep the interesting image data on the card, we just have to rescale it, so 
no uploading of it (we only have to pay that price once, when doing QImage -> 
QPixmap). So if we assume that the image is resized way more often than loaded 
(reasonable, IMO) we should use the GPU's scaling and thus a QPixmap.

Still, it would be interesting to see how much of the blocking Davide wants to fix 
comes from loading the image from disk and decoding it vs. scaling it in software and 
on the GPU. (This knowledge can be useful elsewhere, such as in the slideshow 
wallpaper plugin, where the tradeoff will be a bit different.)

> for smaller images, you're absolutely right though.
> 
> regardless, i don't think it makes any sense to store that much data in
> either  VRAM or RAM for an image that is 99% of the time going to be the
> same size which is likely much smaller than the actual resolution.

Yes, that's why I suggested not storing it in its full glory.
-- 
sebas

http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9


More information about the Plasma-devel mailing list