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

List:       kde-devel
Subject:    Re: QPixmap::fill() slowness
From:       Aurélien Gâteau <aurelien.gateau () free ! fr>
Date:       2008-05-23 12:53:38
Message-ID: g16erh$h8o$1 () ger ! gmane ! org
[Download RAW message or body]

Michael Lentner wrote:

> Am Freitag, 23. Mai 2008 schrieb Aurélien Gâteau:
>> Hello,
>>
>> I need to create a fully transparent QPixmap. The way I do so is:
>>
>> QPixmap pix(width, height);
>> pix.fill(Qt::transparent);
>>
>> Unfortunately, this is quite slow.
>> Stepping through the code of QPixmap::fill() gets me in
>> QX11PixmapData::fill(). In this method I can see a very interesting
>> XRender version, but I don't get to use it because my pixmap depth is 24
>> , not 32. Instead, the code creates a transparent QImage and converts it
>> to a QPixmap.
>>
>> Any idea how to get a transparent QPixmap in a faster way?
> 
> I already complained once to Trolltech, and they say the initial depth
> depends on the system depth. But for that QApplication has to support 32
> bit, but it doesn't, and it seems nobody really cares :(
> As a workaround, you can have somewhere a 1x1 32 bit pixmap and copy the
> needed sizes from it. That's the way I create pixmaps.

Interesting. How do you create this 1x1 32 bit pixmap? from an image?

Aurélien

 
>> 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