[webkit-qt] QImage vs QPixmap

Girish Ramakrishnan girish at forwardbias.in
Wed Mar 3 21:12:47 PST 2010


Antti Koivisto wrote:
> The main reasons I'd prefer using QImages everywhere are
> 
> 1) QImage is less confusing abstraction than the QPixmap. Since nature
> of QPixmap depends completely on context, it is hard to explain,
> understand or optimize for. It's performance characteristics are
> opaque (QImage texture cache unfortunately muddles it too). I'd prefer
> to have APIs that don't do magical things unless specifically asked
> for, especially for something as low level as a bitmap image.
> 2) QImage is usable from any thread. This is required for secondary
> thread painting. Patching QPixmap to be usable from any thread would
> make it even more confusing (it would be safe to use outside the main
> thread on some contexts, not on others)
> 3) Fast updates etc.mentioned by others
> 

I hope I understood the discussion right that we want to use Qt/WebKit
to render to QImage. If so, for X11 windowless NPAPI plugins, switching
to QImage would make them unusable. We will have to convert from X11
Pixmap to QImage for each frame. And note that, flash in
QGraphicsWebView always operates in windowless mode (we inject wmode
opaque).

Girish


More information about the webkit-qt mailing list