[cairo] How to speed up CAIRO drawing to screen/gtk_drawing_area (buffering)?
mail at ssalewski.de
Mon Jul 19 10:27:51 PDT 2010
some weeks ago I started with my first non trivial GTK application,
which includes drawing by cairo to a gtk_drawing_area. My task is
drawing measurement data, simulating a digital oscilloscope. So drawing
modes should include drawing with maximum refresh rates, only limited by
TFT hardware refresh (60 Hz). My first tests, based on code from
gave indeed fine results. (If you are curious, there is a picture of an
early draft available at the bottom of this page
But for optimal performance on slow hardware I may consider something
like buffering. One idea is, that I draw slowly changing stuff like axis
with tics and text to a buffer, which I copy to screen and overwrite
with fast varying data plots.
I found this fine tutorial
and a thread from this list.
For me as a cairo beginner it is not easy to fully understand the
sketches from the above thread. So my question:
Are there examples for very fast cairo drawing (text and lines) with
buffering, back- and foreground, multiple layers, available?
And one related question: Does is make sense to disable
anti-aliased/smoothing cairo drawing mode for slow hardware and high
desired refresh rate?
More information about the cairo