[cairo] Scrolling/Copying

Jon Smirl jonsmirl at gmail.com
Thu Jun 23 15:28:57 PDT 2005


On 6/23/05, Bill Spitzak <spitzak at d2.com> wrote:
> Another solution is to just say that copying areas is not supported by
> Cairo. On modern systems with double-buffering and modern GUI's where
> displays are hardly ever entirely static, it may not be worth it to try
> to figure out what can be copied. Existing API's that support copying
> usually have an interface to indicate what part was damaged (by
> overlapping windows) so it would be easy to have these use Cairo by
> doing nothing and returning the fact that the entire area was damaged.

I'm with Bill on this one. When the CTM is not identity (like the case
of the hidden transform for the compositor) what you read back may not
be what you expect. For example the hidden transform may have turned
the window into a single pixel. When you read this back you are not
going to get your expected screen contents.  The whole concept of
copying assumes an identity CTM and that the transform is not changed
between copies.

Copy for scroll also impacts future schemes where the window is cached
as a display list. The display list would need to be expanded into a
bitmap and the compression of this method is lost. Cached display
lists are especially effective for things like xterms.

Modern hardware can regenerate complex games at 100FPS, seems to me
like it shouldn't have trouble repainting a little text. Scrolling may
even be slower since the scrolled region may be many megabytes in
size.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the cairo mailing list