Commit graph

7027 commits

Author SHA1 Message Date
Chris Wilson
ecee5663bf [perf] Fixup compare-backends to work with just a single test. 2009-06-11 15:19:50 +01:00
Chris Wilson
42c0aee1d9 [perf] Add a -x to exclude traces from a benchmark.
Read names of traces to exclude from a file specified using -x on the
commandline, i.e.
$ ./cairo-perf-trace -x cairo-traces/tiny.exclude

This is a convenient method for me to exclude certain traces for
particular machines. For example tiny cannot run
firefox-36-20090609.trace as that has a greater working set than the
available RAM on tiny.
2009-06-11 13:00:31 +01:00
Chris Wilson
b40ce402ad [NEWS] Add more notes 2009-06-11 09:16:29 +01:00
Chris Wilson
610da573e9 [win32-font] Non-fatal error from GetGlyphOutlineW(GGO_METRICS)
If GetGlyphOutlineW(GGO_METRICS) fails to retreive the metrics for the
specified glyph it returns GDI_ERROR. Like ft, do not interpret this as a
fatal error but just mark the glyph as empty.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=20255
Bug 20255 -- cairo_scaled_font_glyph_extents breaks with invalid glyph id
2009-06-10 13:02:43 +01:00
Chris Wilson
81b5dc42b0 [perf] Expand the section on cairo-perf-trace in the README
Promote the information on how to use cairo-perf-trace and include it
immediately after the details on cairo-perf. This should make it much
clearer on how to replay the traces, and the difference between the two
benchmarks.
2009-06-10 08:52:50 +01:00
Chris Wilson
ec92e633ed [perf] Couple cairo-perf-traces into make perf
Rather than complicating cairo-perf to extend it to perform both micro-
and macro-benchmarks, simply run the two binaries in succession during
make perf.

For bonus points, consider whether we should hook cairo-perf-trace into
cairo-perf-diff.
2009-06-10 08:52:43 +01:00
Chris Wilson
0db946cdd9 [perf] Add explicit dependences for the local libraries
Update the build rules and add the dependences for the libraries built in
other parts of cairo.
2009-06-10 08:52:35 +01:00
Chris Wilson
844c809698 [boilerplate] Print out known targets on error.
Improve the 'Cannot find target ...' error message for an incorrect
CAIRO_TEST_TARGET by actually listing the targets that have been compiled
into the test suite.
2009-06-09 12:45:53 +01:00
Chris Wilson
ac56371550 [test] Exercise overlapping glyphs
Quite an expensive test that converts an image into a distorted array of
glyphs, using a perspective transformation taking the intensity of the
pixel as depth. This generates a pretty picture and many overlapping
glyphs.
2009-06-09 00:06:08 +01:00
Chris Wilson
015df191ba [trace] Prevent overflowing the operand stack when recreating objects
Objects like cairo_scaled_font_t may return a reference to a previously
defined scaled-font instead of creating a new token each time. This caused
cairo-trace to overflow its operand stack by pushing a new instance of the
old token every time. Modify the tracer such that a font token can only
appear once on the stack -- for font-faces we remove the old operand and
for scaled-fonts we simply pop, chosen to reflect expected usage.
2009-06-08 17:40:16 +01:00
Chris Wilson
09492288b3 [trace] Option to re-enable mark-dirty
Applications such as swfdec have a strictly correct use of mark-dirty and
so we need an option to re-enable mark-dirty tracing in conjunction with
--profile.
2009-06-08 17:38:14 +01:00
Chris Wilson
39bac6eddd [perf] Mention cairo-perf-trace early on in the README 2009-06-08 11:52:56 +01:00
Chris Wilson
34ccaeae2d [perf] Continuously update the summary for traces 2009-06-08 00:12:28 +01:00
Chris Wilson
055e9b0eb6 [test] Cache resolved scaled-font
The intention is to stress test the solid pattern caches, so we can cheat
and avoid repeatedly resolving the toy font.
2009-06-07 23:35:57 +01:00
Chris Wilson
25c3750939 [scaled-font] Report the original-font-face
When queried with cairo_scaled_font_get_font_face() return the original
font-face which matches the one supplied by the user, rather than the
implementation derived face.

Fixes test/font-face-get-type.
2009-06-07 19:49:05 +01:00
Chris Wilson
6d693f6bd7 [ft] Support font_face->get_implementation
The lazy resolution of patterns was defeating the scaled_font cache as
ft-fonts that resolved to the same unscaled font were being given different
font-faces upon creation. We can keep the lazy resolution by simply asking
the ft backend to create a fully resolved ft-font-face when we need to
create a scaled-font. This font is then keyed by the resolved font-face
and so will match all future lazily resolved identical patterns.
2009-06-07 19:49:00 +01:00
Chris Wilson
a29426f4bf [ft] Assert that we create an unscaled font for the resolved pattern 2009-06-07 19:48:59 +01:00
Chris Wilson
7d8a0a1cdd [cairo] Keep a small stash of cairo contexts
A cairo context is meant to be extremely cheap to create such that it can
be used in transient expose events. Thus these are allocated reasonably
frequently and show up malloc profiles.
2009-06-07 19:48:59 +01:00
Chris Wilson
f08fe5b550 [trace] Redirect stdout to /dev/null when compressing
Otherwise we mix in stdout in with the trace and prevent replay.
2009-06-07 19:48:59 +01:00
Chris Wilson
750c1b5b48 [configure] Check for FcInit() 2009-06-07 19:48:59 +01:00
Chris Wilson
f7a562a590 [configure] Don't attempt to build GTK+ utilities on system without GTK+ 2009-06-07 19:48:59 +01:00
Chris Wilson
7a95b2745a [boilerplate] Minor typo in win32-printing 2009-06-06 21:36:08 +01:00
Chris Wilson
16eb160c77 [script] Enable compilation without fontconfig
Some insane people actually try compiling cairo with freetype and without
fontconfig...
2009-06-06 20:10:49 +01:00
Chris Wilson
d753ba96ab [script] Manage used entries within hash tables
Apply the patch from Karl Tomlinson,
https://bugs.freedesktop.org/attachment.cgi?id=19802, to repack the hash
table if the number of free slots falls too low.
2009-06-06 13:52:20 +01:00
Chris Wilson
4ccfd474a3 [perf] Switch to using clock_gettime()
Try using clock_gettime() for a high resolution stable time source in
preference to the potentially unstable TSC.
2009-06-06 13:37:00 +01:00
Chris Wilson
867c88ae90 [script] Add a finish method to the interpreter
When using fonts circular references are established between the holdover
font caches and the interpreter which need manual intervention via
cairo_script_interpreter_finish() to break.
2009-06-06 12:59:39 +01:00
Chris Wilson
098822d7ee [script] Fix erroneous error return when rendering type3 glyphs
Only return a USER_FONT_ERROR if an error occurs whilst rendering the
glyph!
2009-06-06 10:35:19 +01:00
Chris Wilson
24e51dd2ee [atomic] Hide compiler warnings
Add uint variants of _cairo_atomic_int_*() to hide the compiler warnings
about sign conversions.
2009-06-05 18:35:52 +01:00
Chris Wilson
4ae5e2d445 [atomic] Provide mutex-based ptr cmpxchg
To handle those CPUs where we do not have an atomic cmpxchg.
2009-06-05 18:29:40 +01:00
Thomas Jaeger
a1d0a06b62 xlib, xcb: Hand off EXTEND_PAD/EXTEND_REFLECT to Render
Most drivers and the X server used to have incorrect RepeatPad/RepeatReflect
implementations, forcing cairo to fall back to client-side software rendering,
which is painfully slow due to pixmaps being transfered over the wire.  These
issues are mostly fixed in the drivers (with the exception of radeonhd, whose
developers didn't respond) and the RepeatPad software fallback is implemented
correctly as of pixman-0.15.0, so this patch will hand off composite operations
with EXTEND_PAD/EXTEND_REFLECT source patterns to XRender.

There is no way to detect whether the X server or the drivers use a
broken Render implementation, we make a guess based on the server
version:  It's probably safe to assume that 1.7 X servers will use
fixed drivers and a recent enough version of pixman.
2009-06-05 17:26:09 +01:00
Chris Wilson
60aefd0d63 [configure] Bump pixman dependency.
Reflect was only fixed in the 0.15 series, so require at least that
version of pixman so we can that advantage of that and drop our
workaround.
2009-06-05 07:32:44 +01:00
Chris Wilson
9d7a7e76b8 [scaled-font] Close race from 16d128
Whilst waiting for the fontmap lock on destruction another thread may not
only have resurrected the font but also destroyed it acquired the lock
first and inserted into the holdovers before the first thread resumes. So
check that the font is not already in the holdovers array before
inserting.
2009-06-05 07:32:44 +01:00
Chris Wilson
f4d9a4482f [pattern] Generalise the freed pattern pool
Also cache recently freed surface and gradient patterns. With thanks to
Jonathan Morton for the inspiration and initial pointer pool code for
pixman.
2009-06-05 07:32:07 +01:00
Chris Wilson
132f44dce1 valgrindify init/fini routines
Annotate object init/fini routines to detect use-after-free for
on-stack/embedded objects.
2009-06-04 14:17:43 +01:00
Chris Wilson
e89828c533 [freelist] valgrindify freed blocks
Mark freed blocks as unaccessible upon free() and then as undefined
on alloc().
2009-06-04 12:50:39 +01:00
Chris Wilson
4e11d56f8e [perf] Update trace summary after each iteration
Running the macro-benchmarks takes so long, feedback is important.
2009-06-04 11:16:48 +01:00
Chris Wilson
5c2e73e74c [perf] Enable traces to be interrupted
Waiting for a long running benchmark can be very annoying, especially if
you just want a rough-and-ready result. So hook into SIGINT and stop the
current benchmark (after the end of the iteration) on the first ^C. A
second ^C within the same iteration will kill the program as before.
2009-06-04 10:03:45 +01:00
Chris Wilson
2eaced2447 [perf] Reconstruct interpreter for each run
Destroy the interpreter after each run of a trace so that we collect any
left-over garbage.
2009-06-03 21:49:17 +01:00
Chris Wilson
1b92ea250f [ft] Don't call FT_Done_Face() on a face we do not own
_font_map_release_face_lock_held() was being called unconditionally during
_cairo_ft_font_reset_static_data(). This presents two problems. The first
is that we call FT_Done_Face() on an object not owned by cairo, and the
second is that the bookkeeping is then incorrect which will trigger an
assert later.
2009-06-03 20:34:01 +01:00
Chris Wilson
8e5295979f [pattern] Typo in document
Remove extraneous markup from program-listing.

https://bugs.freedesktop.org/show_bug.cgi?id=20441
2009-06-03 20:17:59 +01:00
Chris Wilson
fa5d6c7afd [trace] Add a --profile mode
To save typing when creating macro-benchmarks --profile disables
mark-dirty and caller-info and compresses the trace using LZMA. Not for
computers short on memory!
2009-06-03 19:29:19 +01:00
Chris Wilson
9451f0b983 [perf] Drop ticks from trace benchmarks
Don't report the tick values for the macro-benchmarks as these are so
large as to be meaningless.
2009-06-03 13:26:52 +01:00
Chris Wilson
c988dc3719 [cairo] Doc typo.
Fix conflicting sentence as pointed out by
https://bugs.freedesktop.org/show_bug.cgi?id=20183
2009-06-03 10:51:23 +01:00
Chris Wilson
35d0dd00c9 [image] Doc typo.
Correct parameter reference as pointed out by
https://bugs.freedesktop.org/show_bug.cgi?id=20182
2009-06-03 10:49:16 +01:00
Chris Wilson
58459ac643 [font-options] Doc typo
Remove duplicate 'with' as pointed out by
https://bugs.freedesktop.org/show_bug.cgi?id=20180
2009-06-03 10:45:51 +01:00
Chris Wilson
8d39dee8e2 [cairo] Update documentation for bug 20154
Several typographical errors were pointed out in
https://bugs.freedesktop.org/show_bug.cgi?id=20154
2009-06-03 10:40:38 +01:00
Chris Wilson
73469e693c [cairo] Tweak error strings.
Rewrite a few error strings so that they more closer match the
documentation. Where they differ, I believe I have chosen the more
informative combination of the two texts.
2009-06-03 09:51:52 +01:00
Andrew Lavin
ab86662ab4 [test] Compile fix for invalid-matrix
Fixed test compile error on OS X that caused fenv.h not to be included.
2009-06-03 09:19:26 +01:00
Chris Wilson
eec5476484 [perf] s/git/anongit/
Third time lucky?
2009-06-03 08:57:15 +01:00
Chris Wilson
ce7e633942 [perf] Warn if no traces were found 2009-06-02 21:59:07 +01:00