Commit graph

2751 commits

Author SHA1 Message Date
Carl Worth
f6b400a292 perf: Add world-map performance test case.
The map for this test case was originally demonstrated as a
performance problem in this mozilla bug report:

	A very slow SVG file with <path>s
	https://bugzilla.mozilla.org/show_bug.cgi?id=332413

I obtained permission from the creator of the original file to
include the data here, (see comments in world-map.h for details).
2006-11-08 06:07:01 -08:00
Carl Worth
2d927eaefa perf/Makefile.am: Add missing zrusin-another.h file to list 2006-11-08 06:07:01 -08:00
Carl Worth
0d1340f716 perf: Eliminate CAIRO_STATS_MIN_VALID_SAMPLES
We don't need this at this deep level since callers can now
implement this limiting manually since stats.iterations is
now returned. Also, this was interfering with the -i option
to cairo-perf anyway.
2006-11-08 06:07:01 -08:00
Carl Worth
6d5df0e3e2 cairo-perf-diff-files: Add support for diffing "raw" files from "cairo-perf -r" 2006-11-08 06:07:01 -08:00
Carl Worth
d1e1192090 cairo-perf: Print ticks_per_ms value in raw mode so raw analysis tools can report times 2006-11-08 06:07:01 -08:00
Carl Worth
5393989272 perf: Move statistics code into new cairo-stats.h for sharing 2006-11-08 06:07:01 -08:00
Carl Worth
7673e3ac3f boilerplate: Add xrealloc function 2006-11-08 06:07:01 -08:00
Vladimir Vukicevic
1e4515c548 [win32] implement EXTEND_REPEAT in composite when possible
Optimizes EXTEND_REPEAT, especially when DDBs are in use through the
use of PatBlt or manually expanding out the repeated blits (up to a
limit).  Will still fall back to fallback code as necessary.
2006-11-07 13:15:28 -08:00
Vladimir Vukicevic
6db219c3a1 [win32] clean up win32_surface_composite
Make sure that all operations are correct (the operations chosen
are listed in cairo-win32-surface.c); in particular, deal with the extra
byte present in FORMAT_RGB24 surfaces correctly.

Also adds support for calling StretchDIBits to draw RGB24
cairo_image_surfaces directly.
2006-11-07 13:12:09 -08:00
Vladimir Vukicevic
3e002a474b [win32] Update pixman MMX code to work with MSVC
Patch from Tor Lillqvist.
2006-11-07 13:12:07 -08:00
Behdad Esfahbod
fc87d41481 [configure] Err if a suitable pkg-config is not found 2006-11-07 15:07:33 -05:00
Carl Worth
fc584e1fbb Rewrite _cairo_matrix_transform_bounding_box to actually accept a box not a rectangle
It turns out that all of the callers want a box anyway, so this
simplfies the code in addition to being more honest to the name.

(For those new to the convention, a "box" is an (x1,y2),(x2,y2)
pair while a "rectangle" is an (x,y),(width,height) pair.)
2006-11-07 01:42:21 -08:00
Carl Worth
777eaf326a test/Makefile.am: Fix typo in EXTRA_DIST that was breaking distcheck 2006-11-07 01:33:40 -08:00
Carl Worth
0564b5074c cairo-perf: Add command line options for test cases to run, listing tests, and new raw mode. 2006-11-07 01:29:38 -08:00
Carl Worth
49b72f004d Add zrusin-another test cases (tessellate and fill).
This new test case is the 0th polygon polygon from Zack Rusin's
recent cairorender program as made avaialable here:

	http://ktown.kde.org/~zrusin/examples/cairorender.tar.bz2

This polygon contains about 1000 coordinates and looks like a
hand-drawn version of the word another.
2006-11-06 23:56:19 -08:00
Carl Worth
52eb7134bd cairo-perf-diff: Use two-part hash to avoid stale data when perf suite changes.
The perf tree's sha1 is now in the cache file name, so that
if the performance suite itself ever changes then new data
will be generated rather than using stale stuff from the cache.

Also, we now use the src tree's sha1 rather than the commit's
so that commits that don't change the src directory are also
treated as identical, (which they really should be as far as
performance of the library itself is concerned).
2006-11-06 09:39:02 -08:00
Carl Worth
e760d0927e Don't rely on NQUARTZ or OS2 surface types unless they exist.
This allows the cairo-perf stuff to build on older checkouts,
(such as 1.2.4), so that we can usefully do things like:

	cairo-perf-diff 1.2.4 HEAD
2006-11-06 09:39:02 -08:00
Dan Amelang
4cd50965a1 Change _cairo_fixed_from_double to use the "magic number" technique
See long thread here:
http://lists.freedesktop.org/archives/cairo/2006-October/008285.html

This patch provides a 3x performance improvement (on x86) for the
conversion of floating-point to fixed-point values as measured by
the recent pattern_create_radial performance test:

image-rgba      pattern_create_radial-16     8.98 3.36% ->   2.97 1.03%:  3.38x speedup
██▍
image-rgb       pattern_create_radial-16     8.94 3.21% ->   2.97 0.18%:  3.36x speedup
██▍
 xlib-rgb       pattern_create_radial-16     9.55 3.17% ->   3.64 0.51%:  2.93x speedup
█▉
 xlib-rgba      pattern_create_radial-16     9.63 3.53% ->   3.69 0.66%:  2.91x speedup
█▉
2006-11-06 09:37:40 -08:00
Dan Amelang
5376e47425 Add autoconf macro AX_C_FLOAT_WORDS_BIGENDIAN
The symbol that this macro defines (FLOAT_WORDS_BIGENDIAN) can be used
to make double arithmetic tricks portable.
2006-11-06 09:35:10 -08:00
Carl Worth
941b517024 cairo-perf-diff: Build and run latest cairo-perf program rather than whatever was in the old checkout 2006-11-06 09:35:10 -08:00
Carl Worth
e2ede57fbb cairo-perf-diff: Fix to still function if run from the top-level directory containing .git 2006-11-06 09:35:10 -08:00
Jinghua Luo
8e74f9f945 glitz: fix a memory leak in _cairo_glitz_surface_composite_trapezoids. 2006-11-06 12:21:25 +08:00
Behdad Esfahbod
e759959fd6 [Makefile.am] Pass tag message to git-tag in release-publish
(cherry picked from 7cac87c804 commit)
2006-11-02 21:17:12 -05:00
Behdad Esfahbod
91ffb36faa [Makefile.am] Minor fixes in release-publish output
(cherry picked from 953332d128 commit)
2006-11-02 21:17:12 -05:00
Carl Worth
16bc72feaf Increment CAIRO_VERSION to 1.3.1 now that a 1.2.6 release exists 2006-11-02 17:16:52 -08:00
Carl Worth
5500c59b9b Remove typo (mean vs median)
This didn't end up making a difference in practice since the
median is assigned again later on.
2006-11-02 12:27:17 -08:00
Carl Worth
b717e98777 cairo-perf: Change outlier elimination and report minimum times.
Instead of just discarding the worst 15% of the results, we now
do IQR-based detection and elimination of outliers. Also, instead
of reporting mean times we now report minimum and median times.
We still do compute the mean and standard deviation for the
detection of when results seem stable for early bailout. And we
do still report the standard deviation.

A statistician might complain that it looks funny to report the
median and the standard deviation together, (instead of median
and average absolute deviation from the median, say), but I liked
the standard deviation since it is always larger, so it might
ensure better separatation if we use it to determine when two
sets of results are sufficiently different to be interesting.
2006-11-02 12:21:26 -08:00
Dan Amelang
d2d0d11bde Add new perf test "pattern_create_radial"
This test is really just for hammering the double to fixed-point conversion
(in _cairo_fixed_from_double) that happens as doubles from API calls gets
translated into internal cairo fixed-point numbers.
2006-11-02 10:38:00 -08:00
Carl Worth
a618fd2cf9 cairo-perf-diff: Simplify git usage and just run cairo-perf that gets built with cairo revision
Many thanks to Josh Triplett for help with theses fixes:

1. Simplify the usage of git to eliminate the fragile and nasty
   stuff we were doing previously, (such as manually symlinking
   things under .git rather than just using git-clone -s).

2. Don't try running latest cairo-perf with LD_LIBRARY_PATH
   pointing to built cairo version. Apparently stupid libtool
   and its use of rpath is foiling us here. Instead just run
   whatever cairo-perf gets built as part of the source that
   gets checked out.

This second point means that cairo-perf-diff won't yet be useful
for comparing the performance of old cairo revisions that pre-date
cairo-perf. I've since been reasing and we might be able to use
--disable-rpath to the configure script to get what we want.
2006-11-02 04:45:27 -08:00
Jamey Sharp
504ea250f7 XCB/perf: implement boilerplate_xcb_synchronize for fair performance tests.
It sure was nice when some tests showed XCB to be 1300 times faster
than Xlib though...
2006-10-29 13:50:04 -08:00
Behdad Esfahbod
bc983700c4 [autogen.sh] Make sed script portable 2006-10-29 14:50:09 -05:00
Jamey Sharp
7442b40866 perf: cairo-perf-diff-files.c should generate cairo-perf-diff-files
... rather than overwriting the new cairo-perf-diff script, which
should (by the way) be included in dist tarballs.
2006-10-29 11:18:09 -08:00
Jamey Sharp
b0f5af3b47 Add clip-push-group to .gitignore. 2006-10-29 10:59:30 -08:00
Christian Biesinger
a34ba73136 [beos] Allow a pixel error of 1 for BeOS tests
That allows us to delete the BeOS-specific reference images.
2006-10-27 23:51:56 +02:00
Christian Biesinger
2ec0237051 [beos] make tests compile again 2006-10-27 23:51:56 +02:00
Christian Biesinger
e29aea745a [win32] Add parentheses around & operator
This fixes a GCC warning. Also, it fixes a bug: The precedence
of & is not what you might expect.
2006-10-27 23:51:55 +02:00
Carl Worth
61bf9b009b Make xlib and xcb backends tolerant of single-bit errors in the test suite output. 2006-10-26 15:52:21 -07:00
Christian Biesinger
05a259d493 [beos] Fix build error
Rename cairo_rectangle_fixed_t to cairo_rectangle_int16_t
as needed per commit 746f66c3fc.
2006-10-26 21:47:16 +02:00
Ian Osgood
acac0c1966 don't squish tiny images in test/index.html 2006-10-26 09:57:32 -07:00
Adrian Johnson
bd0f991908 Add OpenType/CFF Subsetting 2006-10-27 00:00:24 +09:30
Adrian Johnson
e4c3da8080 PS: Use xshow/yshow/xyshow for strings of glyphs
Optimize show glyphs by looking for strings of glyphs from the same subset
and use the xyshow operator to display. As a further optimization the xshow
and yshow operators are used for displaying horizontal and vertical text.
2006-10-26 23:41:57 +09:30
Behdad Esfahbod
e1ded5b1e0 [PDF] Set CTM before path construction
The previous order is undefined according to the PDF spec.  The resulting PDF
was being misrendered using OS X Preview viewer.  This was reported in this
thread:

  http://lists.freedesktop.org/archives/cairo/2006-October/008271.html
2006-10-25 21:40:08 -04:00
Carl Worth
a9f51c2973 Add new cairo-perf-diff for finding the performance difference between any 2 revisions.
The old cairo-perf-diff is now named cairo-perf-diff-files, but
the new one calls out to it and can still be used in an identical
way.

The new cairo-perf-diff can also be used to see what the performance
impact of a single commit is like so:

	cairo-perf-diff HEAD

or between two commits:

	cairo-perf-diff 1.2.4 HEAD

The script is careful to always run the latest cairo-perf program
even when testing old versions of the library. Also, the output
from any given performance run is cached so it gets less painful
to run as the cache gets primed (the cache is in .perf next to
.git).

The script is still a bit fragile in spots. In particular it depends
on cairo-perf being built in advance but doesn't do anythin to ensure
that happens.
2006-10-25 17:15:22 -07:00
Behdad Esfahbod
c7b9f84744 Require automake 1.7 again
We are not using the slash-in-SUBDIRS feature of automake 1.9 anymore, so bump
required version down.
2006-10-25 16:07:34 -04:00
Behdad Esfahbod
f85aca4c3f Make autogen.sh extract required versions from configure.in 2006-10-25 16:07:34 -04:00
Behdad Esfahbod
838ff68cd5 [perf] Remove SUBDIRS=../boilerplate and add explicit dependencies
This is quite like what I just did in test/.  We can now require an older
version of automake as we used to.
2006-10-25 16:07:34 -04:00
Carl Worth
02096f66f3 Fix typo 2006-10-25 12:52:02 -07:00
Carl Worth
7955fe63cc Fix offset/extent bug in ps output for repeating source surface patterns
The bug was exposed by the recent addition of the paint-repeat test.
The ps output was crashing various interpreters by using infinite
extents for repeating patterns. Fixing that was easy enough, but
the offset of the repeating pattern was still being lost. The fix
for both involved imitating the style of emit_surface_pattern as
it exists in cairo-pdf-surface.c, (though the details are quite
different due to differences in the models of PS and PDF).
2006-10-25 12:52:02 -07:00
Carl Worth
76f816c765 test/paint-repeat: Use offset larger than source surface for better stress testing 2006-10-25 12:52:02 -07:00
Carl Worth
06d3786b2c Add new paint-repeat test
I added this test originally to make it easier to debug
some recent bugs, (the test suite did have some repeating
in the checkered backgrounds, but with an offset of 0,
and then also in trap clip with an offset larger than the
surface itself). This test exercises repeating more directly.

It also triggers a bug in the PostScript backend that I've
not yet investigated. So the test does fail currently.
2006-10-25 12:52:02 -07:00