Re: Cairo + GTK animation - high Xorg load

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Fri, Oct 28, 2016 at 05:46:52PM +0000, David Herzfeld wrote:
>    On Oct 28 2016, at 12:33 pm, Stefan Salewski <[email protected]> wrote:
>    Although, I guess I'm still a little confused about exactly why the
>    Xorg load has gone down. Isn't the same amount of data being shipped over
>    to Xorg via the socket? i.e., isn't cairo_paint() sending the same size
>    surface over to Xorg in this new version?

The rendering is being done inside the Xserver (unless gtk+3's drawing
area has changed radically). That path is converted to geometry by cairo
(it should result in a set of XRender tristrips) and then the Xserver
converts it into a coverage mask by scanline rasterisation. By keeping
the previous frame in a pixmap, you keep the rasterisation from the last
pass and only need to rasterise the new content. Something else to bear
in mind is that cairo_set_antialias() will affect the precision of the
rasterisation, the choice is between CAIRO_ANTIALIAS_FAST and
CAIRO_ANTIALIAS_BEST for the quality/performance tradeoff.
CAIRO_ANTIALIAS_DEFAULT here maps to CAIRO_ANTIALIAS_FAST.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
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.