[cairo] How to know if a surface is mapped

Carlos López González genetita at gmail.com
Wed Mar 20 00:33:13 PDT 2013


Hi!
I'm designing a rendering system that uses Cairo surfaces as the destiny to
render the scenes.
The rendering system launches a threaded (asynchronous) system to render
the shapes on the Cairo surface.
When the widget that will show the render result on the screen is requested
to be drawn, it reads the Cairo surface and paints it over the widget.

The problem comes when the render system needs to map/unmap the Cairo
surface and the widget is requested to be drawn. In that case, according to
the documentation the surface behavior is unknown and so the render result
is incorrect. But the widget thinks that the update of the drawing area was
done and it is marked as 'clean' (no refreshed again).

So the question is: is there any way to know if a surface is currently
mapped?

I've look to the cairo_status_t possible values and don't figure out any
that could response to that situation.

Thanks!
-- 
Carlos
http://synfig.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130320/c15d2672/attachment.html>


More information about the cairo mailing list