[cairo] basic question?
Bill Spitzak
spitzak at gmail.com
Wed Aug 19 09:53:16 PDT 2009
The advantage of back buffers is that they can be drawn to directly
without context switches. This is why they are faster. For the normal
displays Cairo has to be able to get the display to be up to date after
every single cairo call.
I feel that Cairo could automatically be as fast as possible with the
addition of some cairo flush() call that indicates that you actually
want the display to update. This does not guarantee back buffering, but
allows the driver to use it if it is faster. The flush() means that you
want the display to be updated now. It could also be used to queue up
driver requests locally.
Tying this to the xlib flush is problematic as there are far too many
xlib calls that do it and that programs find it hard to avoid. A
reliable check for the window state, for instance, will flush, and
typically this is not wanted.
I am aware that Cairo does not have a flush now, but one method to be
compatible is to not require flush() until after the first time it is
called. From then on it can assume flush() will be sent when the program
wants the display up to date.
More information about the cairo
mailing list