Re: Cairo + GTK animation - high Xorg load

Uli Schlachter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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
-- 
cairo mailing list
[email protected]
https://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.