Re: Painting an image surface into itself in order to scroll it
Nicholas Allen <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
> >> 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 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo