[cairo] Speed

ecir hana ecir.hana at gmail.com
Fri Sep 11 09:29:05 PDT 2009


Hello,
one thing I never understood is how does the drawing works while
zoomed in. I mean, you have a window which redraws on some expose or
paint event. In the callback you can get Cairo surface to draw to, you
crop the surface to the dirty area and draw. Now I zoom-in so only a
tiny portion of the whole window content is visible - does it mean
Cairo has to check all the drawing operation in my callback only to
see that it should draw only small subset of the operations? Wouldn't
it make sense then to use some kind of partitioning data-structure
which supplies the callback with operations for drawing just a portion
of the screen? In other words, to manually track what's visible and
what not so Cairo doesn't have to linearly check all the ops? I don't
know, maybe this is very basic and usual optimization? Is this thing
called "tiling"? Or, is it even worth it? (I guess yes, think about
drawing detail of a page with lots of text...?)


More information about the cairo mailing list