Commit graph

382 commits

Author SHA1 Message Date
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
Carl Worth
02f753c23a Fix cairo-perf-diff to compile cairo-perf explicitly 2007-06-18 18:24:09 -07: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
1d86c7fa88 [perf] Link to librt if available
This is needed on Solaris, but also works on Linux.
2007-06-09 13:48:32 -04:00
Carl Worth
ddca8fec07 perf: Add $(EXTRA_PROGRAMS) to CLEANFILES
Otherwise these programs stick around and break distclean,
distcheck, and hence release-publish targets.
2007-05-01 13:37:16 -07:00
Behdad Esfahbod
8ea48710dc [perf] Check availability before including nonstandard headers 2007-04-30 19:20:56 -04:00
Behdad Esfahbod
fbc8bf0503 [perf] Don't build cairo-perf in "make all" 2007-04-30 19:11:31 -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
7e6ab5461c Add missing prototypes for getline and strndup
This is needed to prevent breaking the build for non-GNU systems.
2007-04-28 07:46:56 -07:00
Carl Worth
422798db1d cairo-perf-diff-files: Add missing include of libgen.h for basename 2007-04-28 07:46:15 -07:00
Carl Worth
050dad7173 cairo-perf-diff-files: Always print old and new configuration names
Previously, if the change in the first test case was small enough
to be considered insignificant, then the header lines showing the
names of the old and new configurations would be omitted. This
commit fixes that bug.
2007-04-26 11:30:27 -07:00
Carl Worth
6035d3b47e cairo-perf-diff: Repair command-line option parsing.
Apparently --force and --html have been broken since the attempt
to address --help in ef5611df6c .
2007-04-25 16:28:14 -07:00
Carl Worth
342de46eb4 Make the traditional speedup vs. slowdown report style available again
Now, if you pass exactly two performance reports on the command line
you'll get the traditional report style again, (so the tool remains
backwards compatible). If you really want the new style with two
reports you can get it by adding /dev/null as a third argument.
2007-04-25 11:27:33 -07:00
Carl Worth
db2a761ae7 Implement support for generating a report from more than two files
This support is intended to compare the identical backends across multiple
reports from several different configurations, (of one sort or another).
The configuration names used in the report are taken from the filenames
of the report files, (which will format most nicely if 8 characters or
less).

The traditional two-input report mode, (showing one line perdiff with
all speedups before all slowdowns), is removed with this commit, but
is intended to return again shortly.
2007-04-25 11:27:33 -07:00
Carl Worth
5030cfce5d cairo-perf-diff-files: Use pointers instead of indexing to iterate over reports
We terminate the iteration by adding a final report with a NULL
name. This will simplify future code that iterates over more than
two reports simultaneously.
2007-04-25 11:27:33 -07:00
Carl Worth
6121f4fccf cairo-perf-diff-files: Simplify code to grow report->tests 2007-04-25 11:27:33 -07:00
Carl Worth
cc03f0499e cairo-perf-diff-files: Sort and compute stats at the time of loading a report 2007-04-25 11:27:33 -07:00
Carl Worth
228c83c9d2 cairo-perf-diff: Separate command-line options within the args structure
A function like cairo_perf_report_diff wants the options, but really
doesn't want/need to see the filenames for example,
2007-04-25 11:27:33 -07:00
Carl Worth
876786b3f7 Move implementation of getline and strndup
These kept getting in my way as I looked for structure declarations
at the top of the file.
2007-04-25 11:27:33 -07:00
Carl Worth
90d532e08f Replace old and new reports with reports array
Another baby step toward allowing comparison of more than two reports.
2007-04-25 11:27:33 -07:00
Carl Worth
c6c17633e4 Replace old_filename and new_filename with a filenames array
More preparation for comparing more than two perf reports.
2007-04-25 11:27:33 -07:00