Before attempting to even set the attributes on the source Picture, we
ensure that it exists. So remove the redundant safe-guards to do nothing
if it doesn't exist.
I have an idea to categorise traces within their own subdirectories and so
for convenience added path walking to cairo-perf-trace. Principally this
should allow for forests of symlinks of all types.
We are expected to return a new reference from get_implementation(), and
failing to do so was causing use-after-frees (detected by the reference
counting checks).
Enforce that each test must render within 60 seconds or be considered to
have hit an infinite loop and be reported as a CRASH. The timeout value is
adjustable via CAIRO_TEST_TIMEOUT -- a value of 0 will disable.
During cairo_boilerplate_get_image_surface_from_png() the original status
returned by cairo_image_surface_create_from_png() could have been masked
by inappropriate context construction when flattening or extracting.
Simply check after creating the surface from the png file, and return
immediately if in error.
Only use the RGB16_565 surface as a source during testing. We presume that
pixman is itself rigorously tested and the output is equivalent to the
image surface. Enabling this test surface would require too large of a
burden to maintain the reference images for the 16-bit backend.
Observe that patterns are not altered during an operation and so we are
safe to use the data from the original pattern without copying. (This is
enforced through the declaration that the backends operate on constant
patterns which are not allowed to be referenced or destroyed.)
Keep the resolved font face alive whilst the default FcConfig remains
identical i.e. resolve the pattern again if the system configuration
changes (e.g. a new font is added or the rules are updated). This should
retain the benefits of lazily resolving font patterns whilst improving
performance by reducing the number of calls to FcFontMatch().
These need to be recorded using an XFAIL reference. In the meantime, as
the poppler output has changed, just remove all the invalid PDF reference
images.
Test case for:
Bug 22441 -- Unexpected shift with push_group and pop_group
https://bugs.freedesktop.org/show_bug.cgi?id=22441
This is a test that demonstrates the error in the pdf backend when using
groups on surfaces with non-integer sizes. In order to create such a
surface, we need to update the boilerplate to use doubles instead of
integers when specifying the surface size.
A trivial fix to reset the original surface size after emitting the group.
The annoying aspect is that this should have been caught by the test suite.
Alas, no. A gentle reminder that simple line coverage is insufficient. :(
Sun's make doesn't like conditional assignments to variables
in dependencies in the form of "target: VAR+=VAL". This
construct was used to force the test suite run in the foreground
in the check-valgrind target. It is replaced by a more
explicit set of the CAIRO_TEST_MODE environment variable.
Evaulate the integer sizes during configure to find one of the exact same
size as a void* to use in the conversion of the atomic ptr cmpxchg to an
atomic int cmpxchg.
Fix an implicit pointer/integer cast in _cairo_atomic_ptr_cmpxchg()
when building with LLVM/clang.
The Intel synchronization primitives __sync_val_compare_and_swap()
are only defined by Intel for types int, long, long long and their
unsigned variants. This patch uses one of those for
_cairo_atomic_ptr_cmpxchg() instead of relying on a gcc extension of
__sync_val_compare_and_swap() to pointer types.
Create an xlib target that uses a separate display, specified by
CAIRO_REFERENCE_DISPLAY, that can be used as a reference implementation
for the normal display. So this can be used by cairo-trace-test to create
a reference surface that mimics exactly the true surface, but if it
targets an Xvfb display will be entirely rendered in software. If
CAIRO_REFERENCE_DISPLAY is not set, the reference surface degrades into an
xlib-fallback surface which is a close approximation (but still has
behavioural differences).
The build system has a singular failure whereby if a backend disappears
between on compile and the next, automake will fail to reconstruct the
Makefiles - resulting in a broken build. Attempt to fix this by removing
the build dir and recloning, which should work for any corrupt caches but
obviously will fail again at a true build failure.
As cairo-perf-diff will execute the current cairo-perf against historical
revisions, any introduced api must be protect in order to compile on old
versions.
The m4 that comes with OpenBSD gets confused by the extra quoting
applied to the version number argument when building the
bodies of the cairo_version_{major,minor,micro} macros using
m4_bpatsubst(). Since we're making sure that the argument is always
a number, we can safely use the unquoted \2 body rather than \[\2\].
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...)