From kde-devel Sun May 25 12:09:35 2008 From: Ian Wadham Date: Sun, 25 May 2008 12:09:35 +0000 To: kde-devel Subject: Re: QPixmap::fill() slowness Message-Id: <200805252209.35874.ianw2 () optusnet ! com ! au> X-MARC-Message: https://marc.info/?l=kde-devel&m=121171751622160 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 <<