[cairo] glitz_drawable_swap_buffer_region slow?

David Reveman davidr at novell.com
Wed Mar 1 09:00:27 PST 2006

On Wed, 2006-03-01 at 14:22 +0100, stefan kersten wrote:
> i'm having a problem with the glitz backend and
> double-buffered drawables: to avoid having to redraw the
> whole window i use a damage rect, but when the damage is
> smaller than the window size, performance decreases quite a
> bit.
> iow this
>   glitz_drawable_t* drawable = glitz_surface_get_drawable(m_glitz);
>   glitz_box_t damage = { x, y, x+w, y+h };
>   glitz_drawable_swap_buffer_region(drawable, 0, 0, &damage, 1);
> is a lot slower than this
>   glitz_drawable_t* drawable = glitz_surface_get_drawable(m_glitz);
>   glitz_drawable_swap_buffers(drawable);
> any ideas as to what might be happening?

Swapping part of a drawable is implemented using glCopyPixels from back
to front buffer and depending on the driver you're using this may or may
not be accelerated. When swapping the complete drawable a call to [glX|
agl...]SwapBuffers is made and that's always accelerated, it might even
be implemented as a buffer flip and is then basically free.

> <sk>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo


More information about the cairo mailing list