[cairo] Cairo + GTK animation - high Xorg load
Uli Schlachter
psychon at znc.in
Sat Oct 29 15:38:02 UTC 2016
Hi,
On 29.10.2016 14:37, David J. Herzfeld wrote:
[...]
> Perhaps one more question: given a cairo surface created via
> cairo_surface_create_similar, is it possible to go though the X process of
> rasterization without displaying? So that the process of cairo_paint() simply
> hands off the already rasterized pixmap to X?
That question makes no sense to me, sorry.
cairo_surface_create_similar() on an X11 surface will internally create
a Pixmap and draw to that. A pixmap is never visible/being displayed.
When you then cairo_paint() and use this surface as a surface, the X11
server will just be told to copy the data over (think: XCopyArea (but
only in the simplest case)).
> Perhaps this is the purpose of cairo_flush_surface()?
The purpose of this function is to make all pending drawing "happen". In
the case of an X11 surface this means that the drawable that is being
drawn to afterwards contains the expected content.
When you draw to the surface created with create_similar, things are
already being rasterized immediately.
Uli
--
“Some people are worth melting for.” - Olaf
More information about the cairo
mailing list