Commit graph

81 commits

Author SHA1 Message Date
Chris Wilson
4f2f46ef1b Restore the ability to choose the internal font.
Behdad wants to include the feature with 1.10, so we enable it as early as
possible in 1.9 dev cycle to generate as much feedback as possible.

The first change is to use "<cairo>" as being a name unlikely to clash
with any real font names.

This reverts commits:
  a824d284be,
  2922336855,
  e0046aaf41,
  f534bd549e.
2008-10-30 19:14:45 +00:00
Carl Worth
e0046aaf41 Remove twin perf case.
This performance 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 performance case back when
some other means of requesting that font face is added.
2008-10-29 16:26:39 -07:00
Chris Wilson
09651a1c1a Twin perf case 2008-10-22 16:38:12 +01:00
Chris Wilson
f2ff794426 [perf] A crude tool to visualise performance changes across a series.
Generate a cairo-perf-diff graph for a series of commits in order to be
able to identify significant commits. Still very crude, but minimally
functional.
2008-10-19 09:36:53 +01:00
Björn Lindqvist
f644d78dc1 [perf] Add composite performance test.
Add a new test case to Cairo for checking the performance of Cairo's
equivalent to GDK's gdk_pixbuf_composite_color() operation. That is an
operation that happens to be extremely useful when viewing or editing
transparent images so I think it is important that it is as fast as
possible.
2008-10-08 20:10:27 +01:00
Chris Wilson
0a7d781ab0 [perf] Add rounded rectangle perf case.
Add the performance test case to compare the speed of filling a rounded
rectangle (one with camphered corners) as opposed to an ordinary
rectangle. Since the majority of the pixels are identical, ideally the two
cases would take similar times (modulo the additional overhead in the more
complex path).
2008-09-28 18:59:43 +01:00
Behdad Esfahbod
a7951081f1 Move _GNU_SOURCE declarations to where it's used
Such that we don't rely on more GNU extensions accidentally.
2008-09-02 21:54:09 -04: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
436c0c8be2 [test] Preparatory work for running under memfault.
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data).  To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.

For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.

In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-08-13 21:54:59 +01:00
Chris Wilson
ac44817c4a [cairo-perf] Only allocate arrays once.
Store the array of times on the cairo_perf_t context to avoid
reallocating it for every perf-case.
2008-06-13 21:34:42 +01:00
Chris Wilson
f57100acd4 [test] Handle TEST_CONTENT_COLOR_ALPHA_FLATTENED similar surfaces.
Convert the boilerplate specific flattened content value to the ordinary
CAIRO_CONTENT_COLOR_ALPHA for use with cairo_push_group_with_content() -
otherwise cairo rightfully flags an error and the test harness decides
that the similar surface is not available.
2008-04-11 15:39:11 +01:00
Azar@.(none)
95db215cc1 Some fixes and improvements to the Win32 build 2008-02-06 21:45:24 -05:00
Chris Wilson
ae2535e4cb [cairo-perf] Run performance tests over similar surfaces as well.
Immediately repeat the performance test against a similar surface to
ensure that they introduce no regressions. Primarily introduced to
sanity check the change to use XShmPixmaps instead of XPixmaps in the
xlib backend, but it should be generally useful.
2007-10-20 00:32:00 +01:00
Chris Wilson
24075f1bdd [cairo-perf] Blacklist xlib-fallback.
Do not try and create non-Render xlib surfaces as they explicitly do
not support performance testing.
2007-08-24 14:30:19 +01:00
Vladimir Vukicevic
2477e57de5 [perf] Add pixman_region_init_rects and use in extract_region
Avoid O(N*N) loop in traps_extract_region by letting us hand pixman
an array of rects all at once.
2007-06-18 14:02:41 -07:00
Behdad Esfahbod
8ea48710dc [perf] Check availability before including nonstandard headers 2007-04-30 19:20:56 -04:00
Chris Wilson
a5d1fc923f Free all memory when cairo-perf exits.
Similar to cairo-test, we free any global memory used by cairo for its
caches through the debug interfaces. We do this so that valgrind does
not unnecessary warn about memory leaks for the cached data and any true
leak is then not lost in the noise.
2007-04-30 16:06:47 +01:00
Carl Worth
72b812be8c perf: Add new paint-with-alpha test
MacSlow noticed that cairo_paint_with_alpha is much slower than
it should be, (and jrmuizel has a nice plan for fixing the
performance bug).
2007-04-25 07:24:23 -07:00
Behdad Esfahbod
157074c794 [boilerplate] Add cairo_boilerplate_get/free_targets
This means, test and perf suites now share the same target handling
code, including parsing CAIRO_TEST_TARGET.
2007-04-18 19:46:30 -04:00
Behdad Esfahbod
b9026d0b13 [perf] Make targets more consistent with the test suite
That is:
1) no VALGRING vs VG abbreviations
2) setting TARGETS and ITERS on the make command line works now
2007-04-18 19:09:53 -04:00
Chris Wilson
a396e0b057 cairo-perf - add the missing newline.
Oops, missed out the newline for the fprintf in the previous commit.
2007-04-18 14:24:10 +01:00
Chris Wilson
383e9d5368 cairo-perf - Check that the surface is created.
Exit(1) if we fail to create the target surface.
2007-04-18 14:13:42 +01:00
Mathias Hasselmann
dd4601b0d0 [cairo-perf] Emit warning, if cairo-perf is not CPU bound
cairo-perf and the X server should be bound to CPUs (either the same
	or separate) on SMP systems. Not doing so causes random results when
	the X server is moved to or from cairo-perf's CPU during the
	benchmarks.
2007-03-16 20:43:29 +01:00
Chris Wilson
92d331a234 Fix up the trivial leaks found by valgrind. 2007-03-07 09:25:12 -08:00
Vladimir Vukicevic
be451cd83d [quartz] rename NQUARTZ -> QUARTZ in defines 2007-02-20 12:54:03 -08:00
Dan Amelang
382e021ccb Add "rectangles" perf test
This test draws many small, solid pixel-aligned rectangles one at a
time.
2007-01-31 11:53:06 -08:00
Carl Worth
d5531c4f50 Add unaligned_clip perf case courtesy of Jeff Muizelaar
Conflicts:

	perf/Makefile.am
	perf/cairo-perf.c
	perf/cairo-perf.h
2007-01-09 14:31:22 -08:00
Carl Worth
cc11c264ec Add long-lines perf case
This shows some very bad slowness for lines that are mostly
offscreen (like 100x slower than just drawing the visible
portion).
2007-01-05 16:50:11 -08:00
M Joonas Pihlaja
4c95e2b7bf New performance test case "mosaic" for splines. 2006-12-16 21:32:19 +02:00
Carl Worth
1ed3811338 perf: Add box_outline test case.
This test shows that drawing a 100x100 single-pixel wide box outline is
currently 5 to 16 times slower when using the natural cairo_stroke() as
compared to a rather awkward cairo_fill() of two rectangles.

[ # ]  backend-content                    test-size min(ticks)  min(ms) median(ms) stddev. iterations
[  0]    image-rgba         box-outline-stroke-100     301321    0.218    0.219  0.39%   5
[  1]    image-rgba           box-outline-fill-100      18178    0.013    0.013  0.43%   5
[  0]     xlib-rgba         box-outline-stroke-100     379177    0.275    0.276  1.39%   6
[  1]     xlib-rgba           box-outline-fill-100      83355    0.060    0.060  0.17%   5
2006-11-17 18:00:36 -08:00
Carl Worth
a8faa0aef1 cairo-perf: When iteration count is given on command-line, never execute fewer 2006-11-17 17:48:39 -08:00
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
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
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
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
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
5c7798a646 perf: Print ticks as well as ms in output.
The ticks value is a bit more reliable since it won't exhibit
variation due to estimating the CPU frequency like the ms value
will.
2006-10-18 12:11:26 -07:00
Carl Worth
bb3d4b2f88 cairo-perf: Remove wasted whitespace in output. Squelch wanring. 2006-10-18 12:11:26 -07:00
Carl Worth
d8c23d5ed7 perf: Change minimum size of paint test to 256
The paint tests at sizes less than 256 were just too fast to be
significant.
2006-10-18 12:11:26 -07:00
Carl Worth
71037f3612 Rename wait_for_rendering to syncrhonize
We're not using this call both before and after rendering
so the old name just didn't make sense anymore.
2006-10-16 09:07:47 -07:00
Carl Worth
648f4bc830 perf: Make iterations adaptive (bailing as soon as std. deviation is <= 3% for 5 consecutive iterations
This makes the entire performance test suite about 10 times faster
on my system. And I don't think that the results are significantly
worse, (many tests are stable after only 5 iterations while some
still run to 100 iterations without reaching our stability criteria).
2006-10-12 15:12:01 -07:00
Carl Worth
d7c2f7e2d7 perf: Rename finalize to synchronize as it is used in both start() and stop() now 2006-10-05 15:14:14 -07:00
Carl Worth
5412343a77 perf: Add subimage_copy test to demonstrate performance bug found by monty 2006-10-05 12:31:50 -07:00
Carl Worth
9285a1f7fe perf: Add text test 2006-10-05 12:31:50 -07:00