[cairo] cairo / xlib not updating window content
Bruyère Jean-Philippe
jp_bruyere at hotmail.com
Thu Aug 9 15:08:44 UTC 2018
Hi Pavel,
I'm currently testing performances with cairo, and I've just completed
the xlib backend tests. I've try several options to get rid of the
flickering, and I end up with very simple loop giving perfect results.
Two things are important:
- 1: create and destroy context for each frame.
- 2: call XSync (dsp, ...) with true or false for events dropping.
I've tried to call XSync before context creation, just after, before
destroying it and after, and all this gave good results without flushing
cairo surface nor using push/pop grouping.
Sources: https://github.com/jpbruyere/vgperf/blob/master/src/cairo/test1.h
config:
-latest cairo-1.15.13 from git://git.cairographics.org/git/cairo
-os=debian-10
-mesa=18.1.0-devel from https://anongit.freedesktop.org/git/mesa/mesa.git
-X11=1:7.7+19 (from debian-10)
jp
On 29/07/18 16:23, Pavel Petrovic wrote:
> for records, also adding a solution from Uli Schlachter with a similar
> surface that is painted to real surface
> after each drawing, which may be more efficient than push/pop group (?):
>
> https://stackoverflow.com/questions/51569047/cairo-xlib-not-updating-window-content
> https://kempelen.dai.fmph.uniba.sk/test_cairo/test_cairo_Uli_Schlachter.c
>
> thx, p.
More information about the cairo
mailing list