On Fri, Sep 13, 2013 at 03:58:33PM +0400, Konstantin Tokarev wrote:
> Thank you for reply,
> 
> I was more interested in possible advantages of QImage over QPixmap in 
> QtWebKit (not vice versa). For example, QPixmap does not allow direct 
> manipulations with its pixel buffer which might be used to speed up some 
> operations. I'm just wondering if such trick was an initial motivation for 
> QPixmap -> QImage conversion.
> 
> (I'm not using X11 and I can get hardware blitting for QImage)

QPixmap::toImage and fromImage allow you to do almost everything you could do 
with a QImage directly. QPixmap stores an implicitely shared copy of the QImage 
internally.

>From my knowledge, the initial motivation of the switch to QImage was because 
>you control when the costly image upload to graphics memory happens, while 
>with QPixmap it can happen implicitely at any point depending on the platform 
>implementation. Another example of implementation details of QPixmap that had 
>to be managed can be found in the patch you referenced, in 
>ImageBufferData::toQImage().
So it was mostly to remove workarounds and make things simpler, but the later 
discovered performance regression on DirectFB was still more important and we 
had to revert it.

Cheers,
Jocelyn
_______________________________________________
webkit-qt mailing list
webkit-qt@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt

Reply via email to