[webkit-dev] Canvas performance and memory usage

Andreas Kling andreas.kling at nokia.com
Wed Aug 4 02:11:01 PDT 2010


On 08/04/2010 03:55 AM, ext Martin Robinson wrote:
> Resent from the proper address:
>
> On Tue, Aug 3, 2010 at 6:00 PM, Martin Robinson
> <martin.james.robinson at gmail.com>  wrote:
>>> I notice that Qt added imageForRendering() and felt they could not use
>>> image() for some reason.  I'd be curious if a Qt expert could weigh in on
>>> that, since maybe with a redesign a separate call would not be needed.
>
> I'm not a Qt expert, but just based on a quick look, it seems that
> imageForRendering  avoids the full QPixmap copy.

Indeed. I added it because while QPixmap is copy-on-write it will always 
do a deep copy when painting is active on the pixmap.

Since we have no way to retain painter state between QPainter::end() and 
QPainter::begin(), we leave the painter active at all times which leads 
us to this situation.

-Kling


More information about the webkit-dev mailing list