This test checks if setting and unsetting mime data works correctly. E.g. this
verifies that we get the same pointer back which we passed in (=no copy made).
This test currently crashes in its last call to cairo_surface_get_mime_data().
Signed-off-by: Uli Schlachter <psychon@znc.in>
FMGetATSFontRefFromFont() is not public on Lion nor on 64-bits
Frameworks, but it seems to be available in the dynamic libs, hence we
can dlsym() it just like other private functions.
Works around the error:
cairo-quartz-font.c: In function 'cairo_quartz_font_face_create_for_atsu_font_id':
cairo-quartz-font.c:830: error: implicit declaration of function 'FMGetATSFontRefFromFont'
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39493
We were calling the antialias close function from the unantialiased
paths - a function that operates on a completely different structure to
the one passed in.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If the stroke is too large, the strokes around the box overlap and we
fail to generate the canonical form of the boxes. So if we detect that
the boxes overlap, feed them through the tessellator to reduce them to
canonical form.
Fixes line-width-overlap.
Based on a patch by Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Exercise the case of stroking a box with a pen wider than the box
itself, a variation on line-width-overlap suggested by Paulo Zanoni.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Rather than having the reference images individually listed in
test/Makefile.refs the whole directory can be included in the EXTRA_DIST
block.
This removes the need to have the check-ref-missing Makefile target.
The recording surface has no knowledge of the target surface when it
generates the scaled font and informs the client about the kerning and
metrics. This results in an unfortunate slight misalignment when
replaying the glyphs against the ideal case.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
There is a subtle flaw in the current querying of polygon extents; it
simply returns the limits and not the point extremeties and certainly
not the tessellation extents. Computing that is likely to take long than
rendering the polygon. This does mean that we need to also fixup the
extents prior to performing the empty unbounded fast path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The source and target x/y coordinates were swapped. No idea why this only now
caused a test suite failure, perhaps something recently started using SHM?
Fixes: map-bit-to-image, map-to-image-fill
Signed-off-by: Uli Schlachter <psychon@znc.in>
This fixes the following assert for pretty much every single xcb-fallback test:
cairo-xcb-surface.c:320: _get_image: Assertion `surface->fallback == ((void *)0)' failed.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Poppler renders the PDF output of this test correctly with cairo 1.10.2 but fails with current git.
Commenting out the cairo_translate makes the PDF output render correctly with current git.
And only upload the parts of the image that are modified during the
fallback. I have to keep reminding myself that the goal is always to
reduce the amount of fallbacks required...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This doesn't just need a clip without any path, it also needs pixel aligned
boxes.
This improves the result for unaligned boxes in tighten-bounds.
Signed-off-by: Uli Schlachter <psychon@znc.in>
This function changed its behavior and no longer does what we want. Instead,
this now uses its own function which uses _cairo_clip_combine_with_surface().
This fixes crashes in the tighten-bounds and random-clip tests. These happened
because cairo-xcb was trying to be clever. ;-)
Since _cairo_clip_get_surface() did less, the resulting surface had
deferred_clear == true and picture == XCB_NONE. The code then tried using this
evil picture and either ran into an assert() or caused a BadPicture error.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If one of the _cairo_surface_fill() calls failed, this function would stop and
return an intermediate result, thus hiding the error that happened.
Signed-off-by: Uli Schlachter <psychon@znc.in>
In af9fbd176b the show_glyphs hook has
been removed from cairo_scaled_backend_t, but quartz-font was not
updated.
Fixes:
cairo-quartz-font.c:798: warning: initialization from incompatible pointer type
On some platforms, executables have an extension which confuses
automake into building an entirely different binary.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
These functions also know to update the clip and recompute the sample
areas and other derived information.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>