create-for-stream often fails whilst running under valgrind due to the
postscript output containing a CreationDate with seconds resolution,
hence the visibility of the resource leaks during failure.
Ideally, the minimum value would indicate the best possible performance,
but I've encountered situations where a bogus minimum value gets lodged
into the cached results for some reason, (and yet doesn't also get
discarded as an outlier). The downside of that situation is that running
more iterations never changes the result, so it's hard to fix the problem,
(resulting in cairo-perf-diff feeling just plain broken as more runs
change nothing).
So let's try using the median time instead.
The so-attributed-to-X-server bug was that cairo maps the drawing
region to the pattern space, rounds the box, and uploads only that
part of the source surface to the X server. Well, this only works for
NEAREST filter as any more sophisticated filter needs to sneak a peek
at the neighboring pixels around the edges too.
The right fix involves taking into account the filter used, and the
pattern matrix, but for most cases, a single pixel should be enough.
Not sure about scaling down...
Anyway, this is just a workaround to get 1.4.4 out of the door. I'll
commit a proper fix soon.
It's much nicer to use automake to conditionally compile a file,
instead of always compiling it and conditionally having the compiler
see an empty file.
It looks like this is an X server bug, and we don't have an
imminent fix. Meanwhile, the bug is avoidable by preferring
to use xlib surface sources for transformed rendering to xlib
instead of using image surface sources.
This test can fail if the wrong font is loaded, but that's no
different than many other text tests---so it doesn't really
deserve special XFAIL treatment because of that.
Due to the interaction between multiple threads showing glyphs and
asynchronous CloseDisplays, it is possible for a font to maintain a
cairo_xlib_screen_info_t beyond the CloseDisplay. The simple solution
is to add a reference count in order to track the lifetime of the
cairo_xlib_screen_info_t correctly.
This new feature isn't appropriate for a minor cairo release,
(we're between 1.4.2 and 1.4.4 right now), but will make a
lot of sense during 1.5.
The code being reverted here was originally added with the
following commit:
46eab95698
but this change reverts only the public-facing parts of it.
In order to avoid recursive dead-locks where whilst one thread holds the
scaled font lock and is waiting on the XLockDisplay() another thread catches
the CloseDisplay and then tries to acquire the scaled font lock, we drop
the list mutex whilst processing the callbacks.
Do not initialize font options when setting up the
cairo_xlib_screen_info_t corresponding to the display itself and not
associated with any screen. This avoids a potential NULL dereferences.
(Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10517)
Whilst not being able to delete all of the test output is messy it is
however not fatal, so do not abort configuration simply because we
cannot find either program.
Replace hard-coded find, xargs and rm with the paths determined during
configure. This also gives us an opportunity to detect missing programs
and inform the developer.