Commit graph

7065 commits

Author SHA1 Message Date
Chris Wilson
216a2e24c7 [test] Minor tweak to cairo-test-trace
Cleanse the code of a couple of redundant pointer manipulations.
2009-06-13 21:40:05 +01:00
Chris Wilson
2ab4245c86 [test] Need SOURCE when copying image data
As cairo-test-trace does not clear the image data before reuse, using
the default OVER operator will cause differing results for each process
when inadvertently alpha blending into the shared memory region. As we
essentially want to just copy the source pixels, be explicit and set the
SOURCE operator.
2009-06-13 21:36:20 +01:00
Chris Wilson
e003d665fe [test] Disable compilation of cairo-test-trace without shm_open()
Remember to only add cairo-test-trace to the list of EXTRA_PROGRAM so long
as we can actually compile it.
2009-06-13 19:18:11 +01:00
Chris Wilson
c092136fe9 [configure] Check for shm_open()
As needed for cairo-test-trace.
2009-06-13 19:07:37 +01:00
Chris Wilson
f298dd92ca [test] Remove dlmalloc
cairo-test-trace's shared memory allocation pattern is much simpler than
anticipated as it allocates a bunch of images and then frees them all,
and so only needs a simple linear allocator.
2009-06-13 19:07:00 +01:00
Chris Wilson
37f32f2951 [util] Disable default build of font-view
It's only a demonstration utility after a all and we do not need to incur
the cost of relinking it everytime we modify the main library.
2009-06-13 18:31:35 +01:00
Chris Wilson
0eca1b17b1 [surface] Give ownership of the snapshot to the snapshotter.
Previously the reference to the newly created snapshot was owned by the
containing pattern. The consequence of this was that when the pattern was
destroyed the snapshot was cleaned up which prevent reuse of the snapshot
across multiple pages. Transferring ownership upon attachment of the
snapshot to the target means that the snapshot stays in existence until
the target itself is destroyed or modified *and* the containing pattern
is consumed. Obvious in hindsight.
2009-06-13 17:16:20 +01:00
Chris Wilson
a1b3392e60 [surface] Mark cairo_surface_show_page() with begin-modification
cairo_surface_show_page() clears the surface after presentation, so we
need to discard the snapshots here.
2009-06-13 16:45:27 +01:00
Adrian Johnson
1798bdd322 Fix PDF pattern embedding
The PDF snapshot cow patch was reusing a previously emitted surface
pattern if the surface unique id matched the current surface. This
resulted in incorrect output as the new pattern may have a different
pattern matrix.

This patch fixes the PDF backend to always emit a new pattern but
re-use previously emitted image or metasurface XObjects.
2009-06-14 00:43:41 +09:30
Chris Wilson
f115c5479e [trace] Strip absolute path off name when profiling
Carl spotted this last night, but I misinterpreted it as an old problem
caused by the application changing its working directory before its first
cairo call - thus causing cairo-trace to attempt to open a file in the new
directory. Instead the problem was attempting to trace an executable with
an absolute path, where we just tagged it with a .lzma extentsion and
attempted to pipe the output there. Obviously this fails for the user
profiling system binaries. So use basename to strip the leading path.
2009-06-13 15:49:15 +01:00
Chris Wilson
c52eed6680 [trace] Handle wrapping python
python lazily loads libcairo.so and so it is not available via RTLD_NEXT,
and we need to dlopen cairo ourselves. Similarly the linker is not able to
resolve any naked function references and so we need to ensure that all of
our own calls into the library are wrapped with DLCALL.
2009-06-13 15:42:43 +01:00
Chris Wilson
606790a860 [script] Disable compilation of examples
Now that cairo-perf-trace exists and is a far superior replay tool, use
EXTRA_PROGRAM for the original replay tools.
2009-06-13 14:07:22 +01:00
Chris Wilson
31b7652e1f [test] Never, ever, blame a crashing test on external factors. 2009-06-13 12:19:51 +01:00
Chris Wilson
3dde883b77 [test] Code review after sleep
Review cairo-test-trace.c and rewrite parts to ease understanding and fix
various bugs - such as failure to notice the slaves crashing and not
releasing our shared memory after an interrupt.
2009-06-13 10:38:52 +01:00
Chris Wilson
1f542965f0 [perf] Mention cairo-perf-compare-backends in the README 2009-06-13 08:24:22 +01:00
Chris Wilson
3b6e4018c6 [test] Add cairo-test-trace
The basic premise is that we feed the trace to multiple backends in
parallel and compare the output at the end of each context (based on
the premise that contexts demarcate expose events, or their logical
equivalents) with that of the image[1] backend. Each backend is
executed in a separate process, for robustness, with the image data
residing in shared memory and synchronising over a socket.

[1] Should be reference implementation, currently the image backend is
    considered to be the reference for all other backends.
2009-06-12 22:28:38 +01:00
Chris Wilson
a41e1275d2 [boilerplate] Make array of targets const.
Protect the boilerplate targets from unexpected modifications.
2009-06-12 22:28:38 +01:00
Chris Wilson
6aebde6598 [boilerplate] Export cairo_boilerplate_get_image_target()
A routine to scan the compiled list of targets and return the entry
corresponding to the image backend.
2009-06-12 22:28:38 +01:00
Carl Worth
d008167b9b Makefile: Fix two typos preventing doc-publish from working
It seems that everything up to this point in release-publish
worked fine, so with these fixes, hopefully the next run of
make release-publish will work without any snags.
2009-06-12 12:08:22 -07:00
Carl Worth
98eb84cfbb Increment version to 1.9.3 after the 1.9.2 snapshot. 2009-06-12 12:07:59 -07:00
Carl Worth
e9b9d2a7c1 Update version to 1.9.2
In preparation for the (long overdue) 1.9.2 snapshot today.
2009-06-12 11:59:02 -07:00
Carl Worth
8ac8c5b428 NEWS: Fix date and name of 1.9.2 snapshot
It's a snapshot, not a release, and the broken REFERENCE_IMAGE list
derailed me from finishing yesterday.
2009-06-12 11:58:57 -07:00
Chris Wilson
3f474555dd [test] Add jp2.jp2 to EXTRA_DIST
Required by test/mime-data and so triggering failures during distcheck as
it was not packaged.
2009-06-12 11:19:50 +01:00
Chris Wilson
7f114b781f [doc] Workaround read-only tree during make distcheck
This looks to be an ugly necessity to work-around the nasty issue that
we currently gtkdoc expect to be run inside the source tree. I'm sure
Behdad will be able to resolve this much more elegantly than this quick
and fragile attempt.
2009-06-12 11:15:16 +01:00
Chris Wilson
1498c9c333 [script] Also mmap backing storage for the pattern descriptions
These can be reasonably large and persist for long times due to the
font holdover caches, so manually swap them out to save space on tiny
swapless machines.
2009-06-12 08:33:25 +01:00
Chris Wilson
80ba06803b [Makefile] Update list of reference images. 2009-06-12 08:33:24 +01:00
Carl Worth
fb21a0da87 Update CLEANFILES for 'make distcheck'
This is a standard part of the release ritual.
2009-06-11 15:28:02 -07:00
Carl Worth
a4f023ef2e NEWS: Update date for snapshot planned for today. 2009-06-11 14:54:03 -07:00
Carl Worth
82139b4291 NEWS: Explain bovine polaroids a bit more.
It's a fun joke, but the COW snapshots feature is important enough
that we should actually tell users what it is.
2009-06-11 14:54:03 -07:00
Carl Worth
4d5f66d5b1 NEWS: Cleanup in preparation for 1.9.2 snapshot
Mostly just wrapping to a reasonable line length, and some minor
wording changes.
2009-06-11 14:54:03 -07:00
Carl Worth
19630f4b73 Make the warning about the need to --enable-gtk-doc more explicit.
I must have read it three times and kept thinking, "but I *did*
just install gtk-doc", before I finally understood what it was
trying to tell me.
2009-06-11 14:54:03 -07:00
Chris Wilson
3aaea453b0 [script] Store fonts inside mmaped files.
As an aide to tiny swapless systems write the rarely used bytes that
define type42 fonts into a deleted file and mmap them back into our
address space.
2009-06-11 22:38:09 +01:00
Chris Wilson
6167f27adf [script] Fix memleak of duplicated strings from files
csi_string_new() duplicated the bytes which was not what was desired, so
implement a csi_string_new_for_bytes() to take ownership and prevent the
leak that was occuring, for example, every time we create a new font face.
2009-06-11 22:38:09 +01:00
Jeff Muizelaar
13b56c42bf Fix compilation on OS X when compiling for 64 bit
OS X doesn't support ATSUI in 64 bit so don't include the cairo ATSUI
API in that case.
2009-06-11 17:32:23 -04:00
Chris Wilson
9e3019ef98 [perf] Add libcairoperf.la to DEPENDENCIES
It seems adding the explicit dependencies to encourage it to rebuild
components from other parts of the source tree removed the automagic
dependency of libcairoperf.la. So add it to the list. Maybe this is not
the correct solution, but it works again for now.
2009-06-11 22:27:18 +01:00
Chris Wilson
55cbf52547 [perf] Fix -i getopt parsing.
Gah, I presumed that the ':' separated options that required arguments
from stand-alone options. I was wrong. The ':' indicates that the
preceding option takes an argument. So add it back to -i.
2009-06-11 15:40:27 +01:00
Chris Wilson
614bfdc084 [xcb] Trivial compile fix.
Update show_glyphs() interface.
2009-06-11 15:35:05 +01:00
Chris Wilson
f7dbdf1fd1 [script] Hide pixman-ops when copying pixels
Seeing unexpected time inside pixman composite is quite disturbing when
trying to track down the apparent slowness in some benchmarks. Remove one
source of this artefact by simply memcpy'ing pixel data when trivial.
2009-06-11 15:19:59 +01:00
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