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

List:       kde-devel
Subject:    Re: QPixmap::fill() slowness
From:       Ian Wadham <ianw2 () optusnet ! com ! au>
Date:       2008-05-24 0:29:39
Message-ID: 200805241029.40555.ianw2 () optusnet ! com ! au
[Download RAW message or body]

On Fri, 23 May 2008 10:59 pm, Dmitry Suzdalev wrote:
> On Friday 23 May 2008 12:17:57 Aurélien Gâteau wrote:
> > Any idea how to get a transparent QPixmap in a faster way?
>
> Btw, this would be also interesting for kdegames as we're using such
> QPixmaps in some games when rendering graphics from svg files to QPixmaps
>
KGoldrunner, in kgrtheme.cpp KGrTheme::loadGraphic(), uses
QPixmap pix (size); followed later by pix.fill (QColor (0, 0, 0, 0));
then sets a QPainter to use when loading the SVG into "pix".

I am not aware that there is any significant overhead in the fill()
operation, done this way, as compared with the svg.render(),
but Luciano Montanaro might know more.

IIRC he found that SVG loading direct into pixmaps was faster
than loading into a QImage and converting to a QPixmap later,
which is what we originally used to do, partly because it was not
easy to see how to create an empty pixmap with an alpha part.

Cheers, Ian W.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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