[cairo] Painting an image surface into itself in order to scroll it
Nicholas Allen
nick.allen at onlinehome.de
Fri Jan 4 04:49:55 PST 2013
>
>> It seems cairo has a bug that this is not possible with just one image
>> surface if you scroll the contents downwards. I can work around it by
>> creating 2 image surfaces and copying one to the other but I would
>> expect cairo to be able to handle this with just one surface.
>
> If you don't do the copy to an extra surface, cairo would have to do
> it for you. This means that the resulting performance is equally bad.
> Yes, there could be shortcuts for the image backend, but I think most
> other (raster) backends would have to do the extra copy.
I don't see why cairo would need to do the copy - it can just iterate
over the pixels in a different order (right to left instead of left to
right for example). That way it doesn't overwrite pixels as it does the
blit. I just wanted to save memory here but if cairo doesn't support
this then I'll just change the code to use 2 image surfaces but this
seems rather wasteful of memory...
Cheers,
Nick
More information about the cairo
mailing list