When Should You Call cairo_surface_flush?
Lawrence D'Oliveiro <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
Does cairo_surface_flush <http://cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-flush> need to be called before making non-Cairo accesses to an image surface? The docs say “This function must be called before switching from drawing on the surface with cairo to drawing on it directly with native APIs” -- of course “drawing ... with native APIs” has to mean “any kind of memory access”, so my guess is “yes”. Currently in my Qahirah examples <https://github.com/ldo/qahirah_examples>, I am doing a flush before writing the images to PNG files. I would have thought Cairo would do this automatically, but I can find no sign of that in the source code (src/cairo-png.c). Thanks for any clarification. -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo