[cairo] [PATCH] add extents to clone_similar

Owen Taylor otaylor at redhat.com
Thu Oct 5 11:10:15 PDT 2006

On Thu, 2006-10-05 at 14:02 -0400, Christopher "Monty" Montgomery wrote:
> On 10/5/06, Owen Taylor <otaylor at redhat.com> wrote:
> > On Thu, 2006-10-05 at 13:15 -0400, Christopher "Monty" Montgomery wrote:
> > > Hi Carl,
> > >
> > > The promised patch from yesterday's discussion.  Add extent hints to
> > > the various backends' clone_similar methods in order to avoid
> > > complete-surface copies into the X server from small image fills.
> >
> > This is about the case where:
> >
> >  - You have a large image surface
> >  - You want to draw a small portion of it onto an Xlib surface
> Bingo.  Any case where a portion of an image surface is blitted to an
> xlib surface, although it obviously matters most for large ones.
> BTW, are there any internal situations where that would happen?  Are
> xlib surfaces also pulled back and forth to images in other cases,
> such as blending without XRENDER?

No, the fallback code works through a different code path these days -
see _cairo_surface_acquire/release_dest_image(). There is handling
of extents there via the "interest rect". (The backend can provide
more of the destination surface than the interest rect if it wants;
it just has to provide at least the interest rect.)

The original fallback code did have the problem of grabbing the entire
image, which was what attracted my attention to your mail: I was
wondering if there had been a regression. But then I realized that
you were likely dealing with the situation above.

					- Owen

More information about the cairo mailing list