[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-25 12:09:35
Message-ID: 200805252209.35874.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
>
I did a more detailed timing test on SVG graphics loading in KGoldrunner.
Here is a typical result, using a large (background) pixmap:

    <1 msec  Create a QPixmap with QSize (784, 560)
    <1 msec  pixmap.fill (QColor (0, 0, 0, 0));
                     (same for QColor(Qt::transparent))
    223 msec SVG.render()
    <1 msec  Painter end()
    112 msec pixCache->insert();

The last line is a surprise!  That is using KPixmapCache.  Thankfully
KPmCache is a LOT faster on retrieval ... :-)

General conclusion: the time for pixmap.fill is negligibly small here
in Australia :-)

Hope this helps you, Aurélien.  All the best, 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