Commit graph

202 commits

Author SHA1 Message Date
Chris Wilson
6662eede2a [perf] Fix errors reported by cppcheck
Trivial mistakes, identified in bugs
http://bugs.freedesktop.org/show_bug.cgi?id=19206 and
http://bugs.freedesktop.org/show_bug.cgi?id=19207.
2009-01-02 09:53:20 +00:00
Chris Wilson
8419c4f124 [perf] Correct another reference to '<cairo>'
I think that's the last use of the old internal name for twin!
2009-01-02 09:53:20 +00:00
Chris Wilson
0a1d194ad8 [perf] Fix for git-1.6
git-1.6 moved all the subcommands out of the PATH so update our usage.
2008-12-14 16:41:17 +00:00
Chris Wilson
0c0f4862c5 [perf-diff] Fix cairo-perf-diff for git 1.6
Since git 1.6 the plumbing commands aren't installed in the user's
path by default.  This patch fixes cairo-perf-diff to find the
git-sh-setup command from git's lib dir.
2008-12-06 13:32:37 +02:00
M Joonas Pihlaja
afba0c3129 [perf] Add perf tests to hit rectilinear code paths.
These tests look at the differences in code paths
hit by filling paths that are rectilinear (or not) and
pixel aligned (or not) with the even-odd and non-zero
fill rules.  The paths are not simple, so they don't
hit the special case quad/triangle tessellator.
2008-12-06 13:30:29 +02:00
M Joonas Pihlaja
8ec58113df [perf] Explicitly test rendering a path with lots of intersections.
We don't have one just for this purpose.  The only other
path with many intersections that gets actually rendered is zrusin-another,
but that might be sped up in the future (say by identifying
collinearities up front or something like that.)
2008-12-06 13:21:44 +02:00
Chris Wilson
36147140ce [perf] Fix build
If automake detects the use of cairo_perf_LDADD in an unused conditional
that overrides the default - so we need to manually set cairo_perf_LDADD.
2008-11-29 10:13:53 +00:00
Paolo Bonzini
993941cfd7 [perf] Fix SDL compilation for MacOS X
The attached patch makes the SDL tests compile under Mac OS X.  The
problem is:

1) that <SDL_main.h> should be included in files that define the main
function for SDL Mac OS X programs (this is not true with the upcoming
SDL 1.3 release).

2) that -lSDLmain, because it is statically linked, needs the Cocoa
framework in the LDADD of the main program.  Again, 1.3 will not require
this.
2008-11-26 16:15:35 +00:00
Chris Wilson
7657bda017 [perf/pythagoras_tree] Another fractal.
Test lots of rectangles and recursion path construction.
2008-11-19 14:06:10 +00:00
Chris Wilson
abd0a2627d [perf/dragon] Add a dragon curve perf case.
Inspired by http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/
and http://en.wikipedia.org/wiki/Dragon_curve, add a performance test case
to measure drawing this space-filling fractal curve.
2008-11-19 14:06:10 +00:00
Chris Wilson
ab8a0bfd82 Add a COPYING file to each aux. source directory
Include a COPYING inside perf/, test/, util/ to clarify the licensing
conditions beneath the respective directories. This is because cairo
itself (libcairo.so) is LGPL-2.1/MPL-1.1 but that only relates to src/.
The auxiliary source files are under a mix of free licenses and we wish to
be clear just what license applies to each file.

In particular, cairo-trace needs to include the GPL terms and conditions.
2008-10-31 16:14:14 +00:00
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
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
Chris Wilson
09651a1c1a Twin perf case 2008-10-22 16:38:12 +01:00
Chris Wilson
3a45b07af9 [perf] Free images for composite-checker
Fix memleak of the image surfaces.
2008-10-20 23:04:03 +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
M Joonas Pihlaja
55e06745a6 [perf-suite] Explicitly read the results of rdtsc from edx:eax.
The =A format used to read a 64 bit result from rdtsc works on x86,
but not on x86-64.
2008-09-25 00:17:57 +03:00
Behdad Esfahbod
0ac7a242f8 [build] Add Makefile.win32.common 2008-09-22 20:11:38 -04:00
Behdad Esfahbod
66d6cb642c [Makefile.am.common] Unify more common rules 2008-09-11 18:06:57 -04:00
Behdad Esfahbod
de5b8bce37 Makefile.am cleanup
Use a common build/Makefile.am.common file.
2008-09-11 15:49:09 -04:00
Behdad Esfahbod
c20179b65f [{test,perf}/Makefile.am] Define html-local target instead of html
Fixes automake warning.
2008-09-08 15:17:52 -04:00
Behdad Esfahbod
87dfceb9ec [Makefile.am] Rename INCLUDES to AM_CPPFLAGS
Fixes automake warnings
2008-09-08 15:13:07 -04: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
Behdad Esfahbod
5926257770 Revamp the build system.
Quick summary of changes:

  - Move list of cairo source files out of src/Makefile.am and into
    src/Sources.mk,

  - Generate files src/Config.mk and src/Config.mk.win32 that choose
    the right set of source files and headers based on configured
    backends and features.  This drastically simplifies building
    using other build systems.  The src/Makefile.win32 file needs
    to be updated to reflect these changes.

  - Add README files to various directories,

  - Add toplevel HACKING file.
2008-09-02 20:24:08 -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
8f56727986 [perf] Beware $OS may not be set.
Avoid a warning by ensuring that the two strings in the equality check are
not empty.
2008-08-17 11:39:56 +01:00
Chris Wilson
c44f2ab4d1 [perf] Silence trivial compiler warning.
The compiler complained about passing a non-string literal as the format
to printf, so just to sanitize the code and keep the compiler happy, add
the magic "%s" format.
2008-08-17 11:39:56 +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
Frederic Plourde
5284f8cab4 [win32] Make cairo-perf-diff run on win32 2008-07-17 13:56:22 -07: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
Bertram Felgenhauer
24c319fbae [perf] add tests for magnified and minified image sources.
With this change, cairo's performance testsuite will catch performance
regressions in pixman's fbFetchTransformed path.
2008-02-19 22:19:44 +01:00
Azar@.(none)
95db215cc1 Some fixes and improvements to the Win32 build 2008-02-06 21:45:24 -05:00
Carl Worth
7800cfd7de Add several Makefile.win32 files to EXTRA_DIST
Otherwise, these files were being omitted from the tar files.
2008-02-06 17:01:22 -08:00
Chris Wilson
cbe8d3855e [test] Fixup make check for mingw
Add EXEEXT to TESTS so that mingw builds the correct target.
2008-01-10 17:10:12 +00:00
Chris Wilson
3bf06c3366 [test/*] Create new surfaces using the group target.
cairo_get_target() returns the original surface passed to
cairo_create(), and not the current destination as required when
testing drawing to the same surface using multiple contexts.

For completeness we also use the group target when creating similar
surfaces within the tests (to check that similar surfaces of similar
surfaces also work).
2007-12-20 21:21:32 +00:00
Behdad Esfahbod
e6166f7b44 Convert bash scripts to regular sh ones for greater portability 2007-12-01 04:19:39 -05:00
Carl Worth
0d932f43fe Explicitly call bash for bash-specific scripts
Thanks to Solaris-using Brian Cameron for pointing out that our
shell scripts are bash-specific. We'd be glad if someone cared to
rewrite them to not require bash, but for now let's have truth in
advertising at least.
2007-11-30 16:19:45 -08:00
Chris Wilson
1651359ffb [cairo-perf-diff-files] Only use a valid initializer for min_test.
Do not assume that the tests[0] is a valid test, but instead scan for
the first test that has a name (i.e. is not a terminator).
2007-10-24 19:33:19 +01:00
Chris Wilson
38c779e7d6 [cairo-perf-diff-files] Check for terminator before comparing tests.
Only the name of the terminating test is set so check that the current
test is not the terminator before comparing.
2007-10-23 13:03:40 +01: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
c70c2cf6d6 [Makefile.am] Fix ${top_srcdir}/libtool
libtool exists in the top level build directory, but in a couple of
places we refer to the top level source directory.
2007-10-19 23:31:36 +01:00
Behdad Esfahbod
84a2c8968a [test,perf] Support TARGETS_EXCLUDE make variable 2007-09-05 12:38:27 -04:00
Behdad Esfahbod
7ccae2de6d [perf] Make cairo-perf-diff build cairo-perf-diff-files 2007-08-28 13:46:28 -04: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
Chris Wilson
51b6cca8de [cairo-perf-diff] Remove reference to pixman.
Remove the use of pixman as part of the perf id as pixman is no longer
an integral component of cairo.
2007-08-18 00:54:30 +01:00
Nis Martensen
027915717d Typo fixes in README files 2007-08-06 10:38:38 -07:00