[cairo] Cairo + GTK animation - high Xorg load
Chris Wilson
chris at chris-wilson.co.uk
Fri Oct 28 20:45:21 UTC 2016
On Fri, Oct 28, 2016 at 05:46:52PM +0000, David Herzfeld wrote:
> On Oct 28 2016, at 12:33 pm, Stefan Salewski <mail at ssalewski.de> 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
More information about the cairo
mailing list