Commit graph

3718 commits

Author SHA1 Message Date
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
Jeff Muizelaar
0a1d2070e2 Fix bugs in fbCompositeSrc_8888x8x8888mmx and fbCompositeSrc_x888x8x8888mmx
And re-enable fbCompositeSrc_8888x8x8888mmx now that it should work.

This gives another little boost to the paint-with-alpha perf test:

image-rgba paint-with-alpha_image_rgba_over-512 11.76 -> 5.20: 1.85x speedup
▉
image-rgb  paint-with-alpha_image_rgba_over-512 11.76 -> 5.26: 1.84x speedup
▉
2007-04-25 16:27:04 -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
Carl Worth
1849a7a8be cairo-perf-diff-files: Add new --min-change option, (replacing third positional argument)
An upcoming change will allow cairo-perf-diff-files to generate
a report based on more than two files. This prepares for that by
moving the minimum-change support from the 3rd positional argument
to a new --min-change option.
2007-04-25 11:27:32 -07:00
Carl Worth
ef5611df6c cairo-perf-diff: Fix implementation of --help
Previously only "--" would givethe usage, and not "--help"
as intended. The new approach has been tested with ash, bash,
and dash, (hopefully that's good enough).
2007-04-25 11:27:32 -07:00
Carl Worth
a8d4fed67a cairo-perf-diff-files: Remove some overzealous option parsing.
The code was complicated and confusing, and only existed to implement
undocumented and unneeded command-line options.
2007-04-25 11:27:32 -07:00
Carl Worth
fe9dd71956 Correct misattribution of Mathias' work to Chris 2007-04-25 11:27:32 -07:00
Carl Worth
29670d3766 Add a content value to solid patterns
This allows for the surface acquired from the pattern to have the
same content. In particular, in a case such as cairo_paint_with_alpha
we can now acquire an A8 mask surface instead of an ARGB32 mask
surface which can be rendered much more efficiently. This results
in a 4x speedup when using the OVER operator with the recently
added paint-with-alpha test:

Speedups
========
image-rgb  paint-with-alpha_image_rgb_over-256 2.25 -> 0.60: 4.45x speedup
███▌

It does slowdown the same test when using the SOURCE operator, but
I don't think we care. Performing SOURCE with a mask is already a very
slow operation, (hitting compositeGeneral), so the slowdown here is
likely from having to convert from A8 back to ARGB32 before the
generalized compositing. So if someone cares about this slowdown,
(though SOURCE with cairo_paint_with_alpha doesn't seem extremely
useful), they will probably be motivated enough to contribute a
customized compositing function to replace compositeGeneral in which
case this slowdown should go away:

image-rgba paint-with-alpha_image_rgb_source-256 3.84 -> 8.86%: 1.94x slowdown
█
2007-04-25 11:09:31 -07:00
Carl Worth
fea5336e2d Allow fbCompositeSrc_x888x8x8888mmx when destination has alpha
Previously the check for this optimized function would only allow
the function to be called if the source and destination had
identical formats. But the function doesn't read the destination
alpha (if any) so can be used when it exists as well.

(Thanks to Jeff Muizelaar for pointing out this problem.)
2007-04-25 10:39:19 -07: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
Carl Worth
302f1146da Fix two bugs in documentation code sample of cairo_arc
The sample code for drawing an ellipse had width and height
reversed in the call to cairo_scale, and also had both
incorrectly inverted.
2007-04-25 07:24:23 -07:00
Behdad Esfahbod
e37c9edac0 [ROADMAP] Add cairo_xlib_surface_get_xrender_format() 2007-04-24 17:33:37 -04:00
Peter Weilbacher
ac0ef0302e Merge branch 'master' of git+ssh://pmw@git.freedesktop.org/git/cairo 2007-04-23 23:18:05 +02:00
Chris Wilson
260dcb316e Add a _cairo_error() to png_simple_error_callback()
With the introduction of the error callbacks for PNG, we have the
opportunity for the user to set a breakpoint (via _cairo_error) at the
point the error is first rasied.
2007-04-23 13:54:37 +01:00
Chris Wilson
0fce7e85a1 Do not print out libpng error messages to stderr.
We wish to avoid writing to file descriptors (and streams) that are
outside cairo's control. In this case, the messages are superfluous as
the errors are propagated via the cairo_status_t returns.
2007-04-23 13:10:15 +01:00
Behdad Esfahbod
59670dd5d3 [ROADMAP] Add URL to David Turner's patchset 2007-04-23 05:19:56 -04:00
Behdad Esfahbod
ce91a17648 [cairo-mutex] Add a poor man's mutex implementation in case of CAIRO_NO_MUTEX
just for fun.
2007-04-22 16:13:33 -04:00
Behdad Esfahbod
97b50e99bf [BeOS] Remove old-style mutex initialization cruft 2007-04-22 16:05:25 -04:00
Behdad Esfahbod
0fd13a3db0 [BeOS] Add mutex implementation 2007-04-22 16:04:49 -04:00
Behdad Esfahbod
fc83784525 [cairo-mutex] Properly paranthesize macro arguments 2007-04-22 15:56:18 -04:00
Behdad Esfahbod
406fc63b68 [util] Change make target from "tools" to "util"
to match targets like "test", "perf", and "doc", that match
their directory names.
2007-04-22 07:11:47 -04:00
Peter Weilbacher
5bc1f3365d [perf] Add OS/2 implementation for timer routines 2007-04-22 07:11:00 -04:00
Behdad Esfahbod
3b46e105bd [util] Import my malloc wrapper that prints simple statistics
To build, do:

	make malloc-stats.so

inside util/, and to use, run:

	LD_PRELOAD=malloc-stats.so some-program

For binaries managed by libtool, eg, cairo-perf, do:

	../libtool --mode=execute /bin/true ./cairo-perf
	LD_PRELOAD="../util/malloc-stats.so" .libs/lt-cairo-perf

The code also includes Jeff Muizelaar's libbacktracesymbols that
is a much better implementation of backtrace_symbols() than what
is provided by glibc.  That can be built by:

	make backtrace-symbols.so
2007-04-21 08:23:15 -04:00
Peter Weilbacher
d3cf2144db Merge branch 'master' of git+ssh://pmw@git.freedesktop.org/git/cairo 2007-04-21 13:50:30 +02:00
Peter Weilbacher
6c12961140 Use deprecated png symbol only when compiling against old version
png_set_gray_1_2_4_to_8 is deprecated in libpng >= 1.2.9, the identical
substitute for it is png_set_expand_gray_1_2_4_to_8
2007-04-21 13:49:04 +02:00
Behdad Esfahbod
515491334c Add util/ to distribution
We already reference an script in util/ in PORTING_GUIDE, but was
not shipping it!
2007-04-21 07:48:10 -04:00
Behdad Esfahbod
abdcbf896a [boilerplate] Add missing headers. Oops!
I blame git for it...
2007-04-21 07:23:30 -04:00
Behdad Esfahbod
781f2533a3 [.gitignore] Add cairo-*.*.* 2007-04-21 07:21:38 -04:00
Behdad Esfahbod
febcd689e7 Update .gitignore to ignore .perf 2007-04-21 07:19:47 -04:00
Behdad Esfahbod
de425ada87 [doc/public/Headers.mk] Update. 2007-04-21 03:46:18 -04:00
Behdad Esfahbod
519b722747 [RELEASING] Remove *-test.h from instructions
as they are all removed now.
2007-04-21 03:45:51 -04:00
Behdad Esfahbod
0108f9c69f [check-def.sh] Do not allow _cairo_.*_test_ symbols anymore
as all are removed now.
2007-04-21 03:44:53 -04:00
Behdad Esfahbod
79098c0370 [scaled-font] Get rid of _cairo_scaled_font_test_set_max_glyphs_cached_per_font
in favor of cairo_boilerplate_scaled_font_set_max_glyphs_cached.
2007-04-21 03:43:04 -04:00
Behdad Esfahbod
44563161de Move a couple typedefs to cairo-types-private.h 2007-04-21 03:38:24 -04:00
Behdad Esfahbod
737d20a570 Move cairo_hash_entry_t to cairo-types-private.h 2007-04-21 03:35:07 -04:00
Behdad Esfahbod
51ce92c3db [scaled-font] Move cairo_scaled_font_t to cairo-scaled-font-private.h 2007-04-21 03:24:31 -04:00
Behdad Esfahbod
91f1056caf Move cairo_cache_t to cairo-types-private.h 2007-04-21 03:18:30 -04:00
Behdad Esfahbod
d2bb5f3007 [svg] Get rid of _cairo_svg_test_force_fallbacks
in favor of cairo_boilerplate_svg_surface_force_fallbacks.
2007-04-21 03:08:26 -04:00
Behdad Esfahbod
ea1b7c2d8a [paginated] Include cairo-surface-private.h 2007-04-21 03:04:03 -04:00
Behdad Esfahbod
7e0ae8bd43 [svg] Move cairo_svg_surface_t to cairo-svg-surface-private.h 2007-04-21 02:57:55 -04:00
Behdad Esfahbod
3885fff3e6 [ps] Get rid of _cairo_ps_test_force_fallbacks
in favor of cairo_boilerplate_ps_surface_force_fallbacks.
2007-04-21 02:51:22 -04:00