We need to translate the path in order to compensate for the device offset
applied to the group surface when pushing and popping. (The path is
transformed to device space on creation, and so needs recomputing for the
new device.)
Specify another boilerplate target to use as the reference for this
target. We then use this in cairo-test-trace in preference to using the
image surface. Still not perfect, though the framework is improving.
We always query an xrender_format for a Visual upon surface creation, so
checking again in create_similar() is redundant. (It also interferes with
disabling XRender...)
After opening a specific file or fd for ourselves, reset the
CAIRO_TRACE_FD to point to an invalid fd in order to prevent any child
processes (who inherit our environment) from attempting to trace cairo
calls. If we allow them to continue, then the two traces will intermix
and be unreplayable.
Embed the pixels for images less than 32*32 as this catches most icons
which are frequently uploaded, but is still an unlikely size for a
destination image surface.
Fixes bug 22356 -- Spurious "out of memory" error on system without fonts
https://bugs.freedesktop.org/show_bug.cgi?id=22356
If FcFontMatch() fails, then it means that there are no fonts available on
the system (or it may have been a malloc error, we have no way of telling).
Instead of report NO_MEMORY and disabling all drawing, one of the
rationales for including a builtin font was so that we could continue even
in the face of this error and show *something* to the user. (This being a
last resort (and especially important for demos!) and hopefully easier to
diagnose than no output at all.)
Handle the new CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED status code
in the switch/case of the ..._create_in_error() functions for
creating span renderers or scan converters.
The fill code path for the xlib and fallback surfaces use trapezoids
rather than spans, so there's lots of differences due to antialising
differences at the edge of the fill. This patch adds a ref image
for the xlib and test-fallback surfaces.
The svg backend snapshots the meta surface which because of snapshot-cow
creates a circular reference back to the creator. So in order to break the
circular reference when we have finished with the snapshot, we need to
call cairo_surface_finish() in addition to simply destroying the surface.
Joonas reported that adding the extra routines to the null-surface as used
by the analysis surface broke user-fonts. So create a separate null
backend to be exported via the test-null surface.
Shrink the overall size of the per-screen GC cache, but allow multiple GCs
per depth, as it quite common to need up to two temporary GCs along some
drawing paths. Decrease the number of GCs we obtain in total by returning
clean (i.e. a GC without a clip set) back to the screen pool after use.
Compensate for the increased number of put/get by performing the query
using atomic operations where available. So overall we see a dramatic
reduction on the numbers of XCreateGC and XFreeGC, of even greater benefit
for RENDER-less servers.
Solaris 9 confuses shave, resulting in an empty variable.
This patch papers over the resulting build failure from
the test shell built-in being called with an empty argument
which was unquoted.
This adds a configure check for fenv.h and makes
invalid-matrix.c check for it with HAVE_FENV_H instead
of HAVE_FEDISABLEEXCEPT -- turns out Solaris doesn't
have fedisableexcept(), but it does have feclearexcept().
The same issue appears on OSX and was fixed in
ab86662ab4. This patch
adds some configure magic.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect. This causes the test
suite to not run any tests at all. With this patch we revert to
always using make-cairo-test-constructors.pl.
Explicitly handle a region clip which represents that the
entire surface is clipped out by passing in a temporary
empty region to the backend set_clip_region() method.
Previously the passed in region may have been NULL even
when clip->all_clipped = TRUE.
Fixes a bug tickled by the clip-all test case which was
brought to light by 394e139213.
When cairo_curve_to happens to start a new subpath (e.g., after a call
to cairo_new_sub_path()), it also needs to update the last_move_point.
Otherwise the new current point after a close_path() will be at an
unexpected position.
Therefore, call _cairo_path_fixed_move_to() explicitly.
Written by Vladimir Vukicevic to enable integration with Qt embedded
devices, this backend allows cairo code to target QPainter, and use
it as a source for other cairo backends.
This imports the sources from mozilla-central:
http://mxr.mozilla.org/mozilla-central/find?text=&kind=text&string=cairo-qpainter
renames them from cairo-qpainter to cairo-qt, and integrates the patch
by Oleg Romashin:
https://bugs.freedesktop.org/attachment.cgi?id=18953
And then attempts to restore 'make check' to full functionality.
However:
- C++ does not play well with the PLT symbol hiding, and leaks into the
global namespace. 'make check' fails at check-plt.sh
- Qt embeds a GUI into QApplication which it requires to construct any
QPainter drawable, i.e. used by the boilerplate to create a cairo-qt
surface, and this leaks fonts (cairo-ft-fonts no less) causing assertion
failures that all cairo objects are accounted for upon destruction.
[Updated by Chris Wilson]
Acked-by: Jeff Muizelaar <jeff@infidigm.net>
Acked-by: Carl Worth <cworth@cworth.org>
Using a null surface is a convenient method to measure the overhead of the
performance testing framework, so export it although as a test-surface so
that it will only be available in development builds and not pollute
distributed libraries.