[webkit-qt] QImage vs QPixmap

Zack Rusin zack at kde.org
Thu Mar 4 08:57:10 PST 2010


On Thursday 04 March 2010 07:36:22 Antti Koivisto wrote:
> On Thu, Mar 4, 2010 at 1:05 AM, Zack Rusin <zack at kde.org> wrote:
> > 3) it's 2x memory usage vs qpixmap.
> 
> By 2x you mean the original bitmap + the texture cache in GL context?

Correct. But not only that, every single platform needs 2x mem, not only GL. 
The data in QImage needs to be uploaded to be displayed, so whether one is 
using X11, VG, GL, with or without caching when rendering QImage will be 2x 
mem no matter what.

> The cache presumably has limited size and mostly contain textures for
> images that have been displayed recently. Typically only a small
> portion of all images on a web page are visible at a given time. The
> real memory use should not be anywhere near 2x assuming the cache
> works sensibly.

Of course once that limit hits it means that the data will have to be uploaded 
on every rendering meaning that rendering will be exponentially slower.

Anyway, it's a purely academic discussion at this point. Like I mentioned as 
long as X11 works the way it does and X11 engine is the default (and as Girish 
pointed out NPAPI works the way it does) there's no way we could switch to 
QImage's globally.

z


More information about the webkit-qt mailing list