Commit graph

7086 commits

Author SHA1 Message Date
M Joonas Pihlaja
d1994d1ac2 [test/any2ppm] Daemonize without BSD's daemon().
Solaris libc doesn't provide daemon() so implement
any2ppm daemon's detaching without it.
2009-06-18 16:07:38 +01:00
M Joonas Pihlaja
aafff0b952 [boilerplate] Check for connect() in libsocket.
Solaris requires -lsocket to be able to talk to
the any2ppm daemon over unix domain sockets.
2009-06-18 15:48:59 +01:00
M Joonas Pihlaja
c4c0693169 [test] Make test constructors without perl.
Remove the dependency on perl when building the test suite
by replacing the script which makes cairo-test-constructors.c
with a C program.
2009-06-18 15:41:19 +01:00
M Joonas Pihlaja
cdd27a8d4c [test] Never use gcc __attribute__ magic for constructors.
The configure test for __attribute__((constructor)) succeeds when
compiling with Sun Studio 12 on OpenSolaris but the attribute
is just ignored and has no actual effect.  This causes the test
suite to not run any tests at all.  With this patch we revert to
always using make-cairo-test-constructors.pl.
2009-06-18 15:39:16 +01:00
M Joonas Pihlaja
46eb56a99f [cairo-surface] Handle the all clipped out case for regions.
Explicitly handle a region clip which represents that the
entire surface is clipped out by passing in a temporary
empty region to the backend set_clip_region() method.
Previously the passed in region may have been NULL even
when clip->all_clipped = TRUE.

Fixes a bug tickled by the clip-all test case which was
brought to light by 394e139213.
2009-06-18 16:42:53 +03:00
Chris Wilson
002264d572 [clip] Missing {} (coding style)
Carl spotted that I'd slipped in a little CODING_STYLE violation.
2009-06-17 17:15:26 +01:00
Nis Martensen
bc87074185 [path] Fix missing implicit move-to
When cairo_curve_to happens to start a new subpath (e.g., after a call
to cairo_new_sub_path()), it also needs to update the last_move_point.
Otherwise the new current point after a close_path() will be at an
unexpected position.

Therefore, call _cairo_path_fixed_move_to() explicitly.
2009-06-17 16:39:56 +01:00
Nis Martensen
3c5e57e694 [test] Verify current point position after subpath closure
Make sure cairo_close_path always takes the current point where it
should be.
2009-06-17 16:39:00 +01:00
Chris Wilson
394e139213 [clip] During _clip() limit the extracted traps to the current clip extents
By applying a tight _cairo_traps_limit() we can reduce the amount of work
we need to do when tessellating the path and extracting the trapezoids.
2009-06-17 16:20:07 +01:00
Chris Wilson
650b85ec77 [clip] Avoid copying region within _cairo_clip_intersect_region()
Within _cairo_clip_intersect_region() we can simply assign the freshly
extracted traps-region if we previously had no region set.
2009-06-17 14:19:19 +01:00
Chris Wilson
4bc89e224f [NEWS] Add release notes from 1.8.8 2009-06-16 15:13:46 +01:00
Chris Wilson
116c93cb7f [cairo] Remove instance of 'return free()'
Gah! This is a GCC-ism, so therefore it has to go.
2009-06-16 11:36:36 +01:00
Vladimir Vukicevic
22587f57bd Import Qt backend by Mozilla
Written by Vladimir Vukicevic to enable integration with Qt embedded
devices, this backend allows cairo code to target QPainter, and use
it as a source for other cairo backends.

This imports the sources from mozilla-central:
http://mxr.mozilla.org/mozilla-central/find?text=&kind=text&string=cairo-qpainter
renames them from cairo-qpainter to cairo-qt, and integrates the patch
by Oleg Romashin:
https://bugs.freedesktop.org/attachment.cgi?id=18953

And then attempts to restore 'make check' to full functionality.

However:
 - C++ does not play well with the PLT symbol hiding, and leaks into the
   global namespace. 'make check' fails at check-plt.sh

 - Qt embeds a GUI into QApplication which it requires to construct any
   QPainter drawable, i.e. used by the boilerplate to create a cairo-qt
   surface, and this leaks fonts (cairo-ft-fonts no less) causing assertion
   failures that all cairo objects are accounted for upon destruction.

[Updated by Chris Wilson]
Acked-by: Jeff Muizelaar <jeff@infidigm.net>
Acked-by: Carl Worth <cworth@cworth.org>
2009-06-16 11:03:46 +01:00
Chris Wilson
7d3881114a [perf] Report errors during replays 2009-06-16 11:03:45 +01:00
Chris Wilson
061e0477e9 [perf] Report iteration count
Show number of discard results by showing the number of statistically
valid samples out of total population count.
2009-06-16 11:03:41 +01:00
Chris Wilson
bab8af62e7 [region] Add PLT entry for cairo_region_create_rectangles() 2009-06-15 15:04:13 +01:00
Chris Wilson
6da9c410d4 Missing header file for cairo-test-null-surface. 2009-06-15 12:14:51 +01:00
Chris Wilson
e5727e20f5 Expose _cairo_null_surface_create() via a test surface
Using a null surface is a convenient method to measure the overhead of the
performance testing framework, so export it although as a test-surface so
that it will only be available in development builds and not pollute
distributed libraries.
2009-06-15 12:03:37 +01:00
Chris Wilson
f2057061c6 [trace] Add sticky bit to (system-wide) trace output dir
Need to allow user programs to dump their traces into the common output
directory, when using /etc/ld.so.preload to capture traces for the entire
desktop.
2009-06-15 12:02:25 +01:00
Chris Wilson
3fe50a77ea [configure] Rephrase warning message for disabling core features.
"strictly recommended" is an odd phrase and though the stern warning is
appropriate as replacing a system library with a more limited version is
likely to cause mayhem, we are but mere servants and should be reserved in
our parlance.
2009-06-15 12:02:25 +01:00
Søren Sandmann Pedersen
5d57aeaa23 Reinstate cairo_region_create_rectangles()
cairo_region_union_rectangle() is linear in the number of rectangles
in the region. There is no way to make it significantly faster without
losing the ability to return errors synchronously, so a
cairo_region_create_rectangles() is needed to avoid a large
performance regression.
2009-06-15 05:48:51 -04:00
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