Qt-interest Archive, February 2008
QImage => QPixmap optimization
Message 1 in thread
Hi,
I know it has been already discussed sometime here, but I didn't find a good
answer for the moment.
Here's a workflow of pixels we want to optimize :
- create a QImage ( using our own image class )
- QImage to QPixmap ( QPixmap::fromImage() )
- Drawing using setCompositionMode, drawTitlePixmap, setCompositionMode,
drawPixmap.
This workflow is not really intense but we generate around 10 times per
second a QImage ( 800x400) we want to display.
The current code works pretty well everywhere except on linux. Normally, the
conversion should be quick because we don't
need to convert color or depth when creating the Pixmap. But apparently,
there's something about transfering the image data
between application and XServer. How does that work ? What are the motion
behind this ?
Sidenote : It is particulary slow when we use a remote display. If we sniff
the datas through the network, it's mainly only zero,
but a lot of them. It totally saturate the client and CPU is 100% there. It
doesn't quite nothing, so that's strange.
So is there any hint here on how to optimize that ? ( We'll do opengl in the
future, I just want to check if something else could
be done beside that ).
BTW : I checked preventing the Pixmap convertion by using drawImage, but
this one converts to Pixmap internally ...
Thanks
Alexandre