Commit graph

6211 commits

Author SHA1 Message Date
Carl Worth
2922336855 Remove twin test case.
This test relied on the recently-removed ability to select
the internal twin-based font family with a name of "cairo".

Presumably, we'll want to bring this test case back when
some other means of requesting that font face is added.
2008-10-29 16:25:00 -07:00
Carl Worth
a824d284be Remove the ability to select the internal font face with a name of "cairo".
It's not fair to steal this name from the namespace of family names.
There are definitely cairo.ttf files that exist out there, and people
may already be using these, (or may use them in the future), with
cairo_select_font_face and a family name of "cairo".

In place of this, we'll want to come up with some other new, and
documented API for selecting the internal font face.
2008-10-29 16:21:42 -07:00
Carl Worth
f039da8d91 Add doltcompile and doltlibtool to .gitignore.
These generated files were recently added to our build system.
We definitely don't want to see them in git-status output.
2008-10-29 16:19:30 -07:00
Carl Worth
81439b3bc8 Add missing files to CLEANFILES and DISTCLEANFILES.
Without these files in these lists, "make distcheck" is unhappy.
2008-10-29 16:19:30 -07:00
Carl Worth
dd0416f5d4 Add recently added reference images to REFERENCE_IMAGES list.
This is just part of the make-distcheck routine for me. I know
Behdad added a test to check for missing images in the list, but
it doesn't seem to be getting run automatically as part of
'make test' nor 'make distcheck', (or if it it, then I'm not
noticing its output).
2008-10-29 16:19:29 -07:00
Chris Wilson
9cd9644c1d [test] Add a pass-through test.
Check that colour values are correctly passed through all the backends.
Simple test of the most fundamental functionality.
2008-10-29 22:04:34 +00:00
Carl Worth
cec689eab6 RELEASING: Suggest running 'make distcheck' against Xvfb.
This avoids hitting driver-specific bugs in the X server, and is
better than doing 'DISPLAY= make distcheck' which simply disables
all xlib testing completely.
2008-10-28 17:18:34 -07:00
Carl Worth
0ca6ba18e3 Add note to test/README on running with Xvfb.
This X server has been tested to run through the test suite with
no unexpected failures, and it avoids hitting any X-driver-specific
bugs.
2008-10-28 17:15:42 -07:00
Carl Worth
eed6771764 Disable the svg12 target in boilerplate.
This target was added to the boilerplate during 1.8.1. It currently
shows many failures in the test suite. These failures likely fall
into three different classes:

	* Tests needing new svg12-specific reference images

	* Tests exercising bugs in librsvg

	* Tests exercising existing cairo bugs

We haven't gone through the effort to separate these, but even for
the tests that are exercising actual cairo bugs, these are likely
bugs that existed in the cairo 1.8.0 release and not regressions.

Because of that, in this commit I'm conditionally disabling the
testing of the svg12 target. As soon as we increment the cairo
version to 1.9.0 or higher, this target will get re-enabled
automatically and we can begin the work to separate the tests as
described above and also fix the bugs.
2008-10-28 17:12:15 -07:00
Carl Worth
a94928ddfa Add svg-specific reference images for the twin test.
A bit annoying that I have to add the same image as both -svg11
and -svg12 but that's all the support we have in the current
test suite. I suppose I could avoid doing that by figuring out
why this test case cannot successfully roundtrip through librsvg
and back through cairo.
2008-10-28 15:55:38 -07:00
Carl Worth
53554ea889 Add ps2-specific reference images for trap-clip test.
These are quite similar to the existing ps3-specific reference images.
I definitely don't see any reason why this output should be considered
a failure.
2008-10-28 15:50:44 -07:00
Carl Worth
10fd16a05d Mark user-font-mask as XFAIL.
This test is expected to fail due to a couple of known bugs. Chris
has fixes for both bugs, but is holding off on them until after 1.8.2
to prevent introducing any possible new bugs with his fixes.
2008-10-28 15:41:40 -07:00
Carl Worth
655546243f Rename user-font-image test to user-font-mask.
Otherwise the reference image (user-font-image-ref.png) gets
interpreted as an image-specific reference image for the
user-font test case resulting in a bogus failure.
2008-10-28 15:35:35 -07:00
Carl Worth
42d2d1b6d3 Correct NEWS to say 'release' instead of 'snapshot' for 1.8.0
A copy-and-paste bug strikes again.
2008-10-28 12:48:03 -07:00
Chris Wilson
1327ec232c [image] Remove invalid assert.
The assert can fail for an error surface.

TODO: Decide what values should be returned from getters for error
surfaces.
2008-10-28 10:00:38 +00:00
Chris Wilson
9481d999df [image] Check create_for_data() to ensure a valid minimum stride.
Double check that the user is not being silly by passing in a stride that
is too small for the width. evince/poppler is one such example...
2008-10-28 09:59:01 +00:00
Chris Wilson
88f628b397 [perf] Fix rectangular case of unaligned-clip.
Janoos spotted that the unaligned clip actually degenerated to an empty
clip due to a typo when constructing the second rectangle. Simply use a
cairo_rectangle() instead.
2008-10-28 09:06:25 +00:00
Behdad Esfahbod
1522805f39 [Makefile.am.releasing] Fix typo 2008-10-27 20:57:56 -04:00
Carl Worth
3386794d96 Add creation of a versioned manual to the release-publish target.
This arranges so that a versioned manual will be available of the form:

	http://cairographics.org/manual-X.Y.Z

for all future releases and snapshots. We're going through the process
of manually doing all former releases, such as:

	http://cairographics.org/manual-1.2.0/

which the LSB folks wanted to reference.
2008-10-27 14:09:19 -07:00
Adrian Johnson
a1a7ec6a05 Change ps to ps3 in test/README
The ps target no longer exists.
2008-10-27 23:13:05 +10:30
Adrian Johnson
670d942fe3 Change user-font-image test to use a pattern
This can be used to expose a bug in _cairo_rectangle_intersect() by
changing:

  fixed_scale = 1024 to 1 in cairo-user-font.c

and

cairo_matrix_translate (&matrix, 0, -8) to (&matrix, 0, -9) in
user-font-image.c

This will cause cairo_text_extents (cr, text, &extents) in
user-font-image.c to return a height of 8388683.
2008-10-27 23:04:16 +10:30
Adrian Johnson
cdacf55e1b Add user-font-image test
Draws bitmap glyphs using cairo_mask(). This test exposes a bug in the
calculation of the glyph extents.
2008-10-27 22:07:04 +10:30
Chris Wilson
22e2dac819 [stroke] Ensure we record the first face for a dashed path.
If the first face was outside the bounds then we skipped it, and so a
close would incorrectly connect to the first visible face.
2008-10-26 10:25:31 +00:00
Chris Wilson
64fb3290f0 [stroke] _cairo_stroker_line_to_dashed() whitespace
A couple of comment spelling mistakes and rearrange whitespace to more
closely match CODING_STYLE.
2008-10-26 10:25:26 +00:00
Chris Wilson
88935947d1 [test] Add leaky-dashed-stroke
A test case for a leak whilst closing a dashed stroke extracted from the
report by Jeff Muizelaar who found the artifact whilst looking at
  firefox http://people.mozilla.com/~jmuizelaar/BerlinDistricts-check.svg
2008-10-26 05:30:56 +00:00
Chris Wilson
195fd27cc6 [build] Use AC_LINK_IFELSE for testing linker flags.
Richard Hult reported that -Wl,--allow-shlib-undefined was incorrectly
being identified as supported by gcc under Mac OS/X:

configure:25103: checking whether gcc supports -Wl,--allow-shlib-undefined
configure:25117: gcc -c -Werror -Wl,--allow-shlib-undefined  conftest.c
>&5
i686-apple-darwin9-gcc-4.0.1: --allow-shlib-undefined: linker input file
unused because linking not done

So instead of just checking whether the compiler accepts the flag, check
that we can actually link a dummy file.
2008-10-23 11:16:40 +01:00
Behdad Esfahbod
d692284ab8 [test/user-font] Exercise glyph 0
Previously there was a bug in cairo and/or poppler causing glyph 0 of
user fonts to not show up.  This is fixed now, so we exercise glyph 0.
2008-10-23 01:45:35 -04:00
Chris Wilson
e6219f7116 [win32] Correct error paths in text_to_glyphs().
Carl spotted that 1db894 introduced an error into text_to_glyphs() such
that following an allocation error the code would attempt to thaw an
unfrozen glyph cache, leading to an attempt to unlock an unlocked mutex -
which causes a deadlock under win32.
2008-10-22 17:55:44 +01:00
Chris Wilson
09651a1c1a Twin perf case 2008-10-22 16:38:12 +01:00
Chris Wilson
954ebacb71 Map toy font face to implementation.
Quartz fonts and user fonts use an indirect font face when creating a
scaled font for the toy font face. This means that they insert a scaled
font into the font map that has a different font face to the one that is
initially searched upon. The result is that when we try to create an
identical scaled font, we fail to find the existing scaled font and
attempt to insert a duplicate into the hash table - which triggers an
assert.

In order to avoid creating duplicate fonts, we add a new method to the
font backends that allows cairo_scaled_font_create() to peek at the
font_face that will be used to actually implement the scaled font
constructor - thus we are able to use the correct font_face as part of the
hash key.
2008-10-22 16:38:12 +01:00
Adrian Johnson
5e4a1cb0b8 Don't add a notdef glyph to Type 3 font subsets
This allows user-fonts to use glyph 0 when embedding in PS/PDF.
According to ISO32000 Type 3 fonts do not require a notdef glyph.
2008-10-22 22:00:31 +10:30
Chris Wilson
170686d4b0 [cairoint] Remove the duplicate prototype.
In the previous commit I added comments and a duplicate prototype. Remove
the duplicate - but keep the comments.
2008-10-22 01:01:06 +01:00
Chris Wilson
1db8949f2b Ensure that the scaled font is frozen for the lifetime of the scaled glyph.
After discussing the scaled font locking with Behdad, it transpired that it
is not sufficient for a font to be locked for the lifetime of a scaled glyph,
but that the scaled font's glyph cache must be frozen for the glyph'
lifetime.  If the cache is not frozen, then there is a possibility that the
glyph may be evicted before the reference goes out of scope i.e. the glyph
becomes invalid whilst we are trying to use it.

Since the freezing of the cache is the stronger barrier, we remove the
locking/unlocking of the mutex from the backends and instead move the
mutex acquisition into the freeze/thaw routines. Then update the rule on
acquiring glyphs to enforce that the cache is frozen and review the usage
of freeze/thaw by all the backends to ensure that the cache is frozen for
the lifetime of the glyph.
2008-10-22 00:53:55 +01:00
Chris Wilson
b2cbbceb4c [test/meta-surface-pattern] Propagate errors.
Use cairo_get_target() to propagate any errors from the secondary context.
2008-10-21 20:01:23 +01:00
Behdad Esfahbod
9d4262ebe0 [build] Use dolt
Dolt is a hack to speed up libtool-based build systems:

	http://dolt.freedesktop.org/

It's completely transparent to the user.  Brings make time
of cairo from 70s down to 20s.  Yay!
2008-10-21 17:45:54 -04:00
Chris Wilson
5a822046cc [test/xlib-expose-event] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:12 +01:00
Chris Wilson
21223cc12c [test/unbounded-operator] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:11 +01:00
Chris Wilson
4c8de6d99d [test/surface-pattern-scale-up] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
e8de7d1c36 [test/surface-pattern-scale-down] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
b5551cfce2 [test/rotate-image-surface-paint] Proapgate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:11 +01:00
Chris Wilson
6d41ffbbed [test/pixman-rotate] Propagate errors
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:10 +01:00
Chris Wilson
64949b8173 [test/operator-source] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
971f030b7d [test/operator-clear] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9b919b0e91 [test/extend-pad] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:31:06 +01:00
Chris Wilson
69415b4fc6 [test/device-offset-scale] Propagate errors
Use cairo_get_target() to propagate errors from the secondary contexts.
2008-10-21 11:31:06 +01:00
Chris Wilson
9ab296123e [test/device-offset-positive] Propagate errors.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:14:01 +01:00
Chris Wilson
594fa0836f [test/device-offset] Propagate error.
Use cairo_get_target() to propagate errors from the secondary context.
2008-10-21 11:12:11 +01:00
Chris Wilson
29da47be60 [ps] Check for an empty font subset.
Return early before trying to emit an empty subset into the document -
avoids a potential use of an uninitialised status variable.
2008-10-21 10:42:41 +01:00
Chris Wilson
fd1f3c27e0 [configure] Check for atomic xchg.
Bug 18140 identifies a case where we have an atomic increment, but not an
atomic exchange. We need both to implement atomic reference counting, so
add a second check to detect whether __sync_val_compare_and_swap
generates a non-atomic instruction.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18140.
2008-10-21 09:23:15 +01:00
Chris Wilson
71e4f7e3a1 Add API documentation for NULL filenames and write_funcs.
Mention in the API docs that you can pass a NULL filename to
cairo_(pdf|ps|svg)_surface_create in order to construct a queryable
surface without generating any temporary files. Similarly when passing a
NULL write_func to cairo_pdf_surface_create_for_stream et al.
2008-10-20 23:54:57 +01:00