Commit graph

5585 commits

Author SHA1 Message Date
Antoine Azar
1c6556f656 Fixed cairo version in win32 makefile 2008-08-28 14:23:16 -04:00
Behdad Esfahbod
22552dae51 Rename _cairo_matrix_compute_scale_factors to _cairo_matrix_compute_basis_scale_factors 2008-08-27 20:08:49 -04:00
Behdad Esfahbod
f7a91e5bd7 [configure.in] Autogenerate libtool version info
For unstable version 1.7.5 we create libcairo.so.2.10705.0
For   stable version 1.8.5 we create libcairo.so.2.10800.5

No more manual work.
2008-08-27 19:06:13 -04:00
Behdad Esfahbod
df64e0e632 Cleanup libtool version handling
In preparation to remove the manual numbering completely
2008-08-27 18:41:22 -04:00
Behdad Esfahbod
50b2076a54 [autogen.sh] Prefer glibtoolize to libtoolize if available
Makes OS X users happy.
2008-08-27 17:59:13 -04:00
Behdad Esfahbod
98942f99f3 [configure.in] Move library version information to Version.mk 2008-08-27 17:53:30 -04:00
Vladimir Vukicevic
2cf82eaf0d [xlib] Check CreatePixmap dimensions before calling, to avoid unnecessary size errors 2008-08-27 14:16:52 -07:00
Behdad Esfahbod
719c17c293 [src/Makefile.am] Remove gcc dependency 2008-08-27 17:09:19 -04:00
Chris Wilson
a8c0998baf [ps] Check tmpfile status after reading.
Be paranoid and check to see if we encountered an error whilst reading the
temporary file.
2008-08-27 14:58:53 +01:00
Chris Wilson
bd21b2f630 [test] Ensure that the output is always saved.
Do the saving of the output first before checking for various failures
with respect to the reference images.
2008-08-26 23:03:08 +01:00
Chris Wilson
de6742c5f1 [ps] Mark the hex data as unsigned char.
Use unsigned char to avoid sign extensions issues when bit shifting.
2008-08-26 23:02:41 +01:00
Chris Wilson
92fcb9d2f7 [configure.in] Autoconf strikes back
Need to disable references to *.cpp to convince autoconf
not to use the g++ linker (and fail miserably).
2008-08-26 23:02:10 +01:00
Chris Wilson
08ea9d1f2a [pdiff] Get the surface data pointer once.
Don't call cairo_image_surface_get_data() for every single component of
the two surfaces to compare.
2008-08-26 23:01:30 +01:00
Chris Wilson
590ccb9006 [ps] Convert a few residual CRLF to LF.
Just a few CRLF eol-terminators remained, cluttering the output.
2008-08-26 23:01:15 +01:00
Behdad Esfahbod
78758b6acc [Makefile.am] Add autogen.sh to dist. Oops! 2008-08-23 14:22:58 -04:00
Chris Wilson
17a6d541f8 [test] Explicity save a fail image.
Be explicit about handling cached FAIL images, instead of relying on the
sequences of failed matches as the files are an external resource and we
can not guarantee their individual accessibility.

Note this also changes the filename, so you may want to run:
$ find -name '*-last.*' -print | xargs rm
after this checkout.
2008-08-21 08:45:06 +01:00
Chris Wilson
b9287e6669 [test] Cache last output and compare next time.
Compare the current output against a previous run to determine if there
has been any change since last time, and only run through imagediff if
there has been. For the vector surfaces, we can check the vector output
first and potentially skip the rasterisation. On my machine this reduces
the time for a second run from 6 minutes to 2m30s. As most of the time,
most test output will remain unchanged, so this seems to be a big win. On
unix systems, hard linking is used to reduce the amount of storage space
required - others will see about a three-fold increase in the amount of
disk used.  The directory continues to be a stress test for file selectors.

In order to reduce the changes between runs, the current time is no longer
written to the PNG files (justified by that it only exists as a debugging
aid) and the boilerplate tweaks the PS surface so that the creation date
is fixed. To fully realise the benefits here, we need to strip the
creation time from all the reference images...

The biggest problem with using the caches is that different runs of the
test suite can go through different code paths, introducing potential
Heisenbergs. If you suspect that caching is interfering with the test
results, use 'make -C test clean-caches check'.
2008-08-20 23:56:56 +01:00
Chris Wilson
98bb04cf93 [ps] Check for end-of-stream after advancing character.
Whilst writing the base85 stream we advance an extra character if we spot
a '~', however we need to be paranoid that we have not stepped beyond the
end of the data for this write.
2008-08-20 23:20:14 +01:00
Chris Wilson
b47c772934 [test/bufferdiff] Move unused code.
Only imagediff calls png_diff, so it makes sense to move that function out
of the cairo-test and into the utility.
2008-08-20 23:20:09 +01:00
Alex Rostovtsev
186e7a2602 [png] Specify a no-op flush callback (NULL deref)
libpng changed behaviour in v1.2.30 to call the png_ptr->output_flush_fn
in png_write_end(). If no flush function is provided with
png_set_write_fn(), libpng will use its default fflush() instead - which
assumes that closure passed is a FILE* and not an arbitrary user pointer.

Consequently, we must actually set a dummy output_flush_fn to avoid
segfaulting.
2008-08-19 23:45:40 +01:00
Chris Wilson
5712a2c619 [test] Destroy test ouput image on failure.
Add the missing cairo_surface_destroy(). Sigh, less haste more speed.
2008-08-19 15:17:45 +01:00
Chris Wilson
0354457bed [test] Always write the test output to a png.
Always write the test output to a png so that it can be copied and used as
a reference image with CAIRO_REF_DIR.
2008-08-19 15:10:51 +01:00
Chris Wilson
86d221521b [test] Pass extended output name to ref_name_for_test().
Having included some extra details in the test output PNG filename, we
need to pass the extra information to
cairo_ref_name_for_test_target_format() in order to find the match.
2008-08-19 14:58:48 +01:00
Chris Wilson
b30b1c5e2c [perf] Continue testing after we fail to create a surface.
Sometimes we cannot create a surface because it is larger than the screen.
Ignore these non-fatal errors and move on to the next performance case.
2008-08-19 11:54:07 +01:00
Chris Wilson
776844eb9e [boilerplate] Daemonic conversion utility.
In order to achieve substantial speed improvements the external conversion
utilities are rewritten as a daemon that communicates with the test suite
over a local socket. This is faster as it avoids the libtool and dynamic
linker overhead for each invocation, the caches persist between tests and
we no longer require a round trip through libpng.

The daemon is started automatically by the test suite and if communication
cannot be established then it falls back to using a pipe to a normal
conversion utility. The daemon will then persist for 60 seconds waiting
for further connections.

Of course any memory leak (stares at poppler) is exacerbated.
2008-08-19 11:15:12 +01:00
Behdad Esfahbod
00bc650455 Add new public API cairo_surface_has_show_text_glyphs()
We added cairo_has_show_text_glyphs() before.  Since this is really a
surface property, should have the surface method too.  Like we added
cairo_surface_show_page()...
2008-08-18 14:54:21 -04:00
Chris Wilson
4cd478b95f [test] Initialise test context.
Fixup a couple more tests that do not initialise a test context for
themselves.
2008-08-18 17:56:21 +01:00
Chris Wilson
cdd021b5fb [boilerplate] Check exit code from system for trapped signals.
If the external conversion utility was killed by a signal (e.g. the user
sent SIGINT), raise that signal within our process as well. This means
that a crash inside poppler or rsvg will be flagged as a crash inside the
test suite, and makes interrupting the test suite far more responsive.
2008-08-18 17:56:21 +01:00
Chris Wilson
95575d7a69 [configure.in] Add release status
Print out whether the current version represents a release, a development
snapshot or is being compiled from git.
2008-08-18 17:56:21 +01:00
Behdad Esfahbod
da83f405ca Tone down comment 2008-08-18 12:31:13 -04:00
Behdad Esfahbod
5379af109c [cairo-ft] Add useless cairo_warn decorator 2008-08-18 12:31:13 -04:00
Chris Wilson
c56385eacc [test/make-html.pl] Don't include links to non-existent images.
Some tests do not generate output images, so do not insert a link if we
don't have an image.
2008-08-18 16:18:57 +01:00
Chris Wilson
17fbb652b1 [test] Avoid redundant writes/reads of test surfaces via png.
As Behdad suggested, we can dramatically speed up the test suite by
short-circuiting the write to a png file, only to then immediately read it
back in. So for the raster based surfaces, we avoid the round-trip through
libpng by implementing a new boilerplate method to directly extract the image
buffer from the test result. A secondary speedup is achieved by caching the
most recent reference image.
2008-08-18 16:18:52 +01:00
Chris Wilson
9b0b55cea7 [test/leaky-dashed-rectangle] Add ref to bug report.
Yevgen Muntyan has filed a bug report with the same symptoms as
leaky-dashed-rectangle, so add a reminder for when it is finally fixed.
2008-08-18 08:26:57 +01:00
Chris Wilson
212cbd3f1b [test/user-font] Correct the lifetime of the user font face.
By keeping a static reference to the user font face, it is erroneously kept
alive during a call to cairo_debug_reset_static_data(). (A violation of
the caller's contract to ensure that no active reference to a cairo object
is held by the caller.)
2008-08-18 08:26:43 +01:00
Chris Wilson
19d721d84c [cairo-compiler-private.h] Clear definition of __attribute__
Avoid a redefinition error when playing silly tricks with 'cpp -U__GNUC__'.
2008-08-17 21:43:14 +01:00
Chris Wilson
12d3d32f22 [Makefile.am] Support uno.
For the extreme masochist only. At the moment, it only generate syntax
errors, but the command line appears functional.
2008-08-17 21:41:36 +01:00
Chris Wilson
6808174e72 [win32-font] Review error handling.
The test-suite for win32 shows less than ideal error detection whilst
running on mingw32. Looking at the code, I spotted a few places where the
error propagation could be improved, and lo...
2008-08-17 21:00:52 +01:00
Chris Wilson
5ef52cd08f [svg] Tweak base64_write_func().
On a wild goose chase to eliminate a valgrind warning (caused by libpng,
alas) tweak the code for a bit of simplification.
2008-08-17 20:27:02 +01:00
Chris Wilson
c745a622db [test/toy-font-face] Use cairo_test_init/fini().
Minor step to harmonise the test with the rest of the suite.
2008-08-17 17:33:29 +01:00
Chris Wilson
37bca38772 [test/create-from-png] Return the failure.
Having checked all the possible PNG formats, report any failures.
2008-08-17 15:30:51 +01:00
Chris Wilson
3dc8e2dd0d [boilerplate] Dead store elimination.
Value stored to 'found' is never read.
2008-08-17 15:29:20 +01:00
Chris Wilson
d5f90a241c [ft-font] Dead store elimination.
Value stored to 'stride' is never read.
2008-08-17 15:19:19 +01:00
Chris Wilson
5109fdb1e6 [xlib] Return the integer from XGetDefault().
If the default value does not match a fontconfig constant, actually return
the parsed token.
2008-08-17 15:19:19 +01:00
Chris Wilson
4f4621adbf [scaled-font-subsets] Check for a failed malloc.
Missing NULL check after malloc.
2008-08-17 15:19:19 +01:00
Chris Wilson
418ebb0930 [scaled-font-subsets] Propagate error status from index_to_ucs4().
Check for an error status from ->index_to_ucs4() and propagate.
2008-08-17 15:19:19 +01:00
Chris Wilson
2ab700f21a [type3-glyph] Propagate error from image emission.
Return the error status from ->emit_image().
2008-08-17 15:19:19 +01:00
Chris Wilson
0549fcfd85 [pdf-operators] Propagate status from end_text().
Check for an error status after end_text().
2008-08-17 15:19:19 +01:00
Chris Wilson
96d45cfeee [pdf-operators] Propagate error from emit_glyph_string*().
Do not overwrite the error status if returned by either of the
emit_glyph_string*() routines.
2008-08-17 15:19:12 +01:00
Chris Wilson
63f64ff336 [pdf-operators] Propagate error from begin_actualtext().
Check the status return from begin_actualtext().
2008-08-17 14:53:55 +01:00