Commit graph

5859 commits

Author SHA1 Message Date
Behdad Esfahbod
e686a00da8 [build] Add CAIRO_CONFIG_MAKEFILE_PRIVATE 2008-09-22 20:11:39 -04:00
Behdad Esfahbod
0ac7a242f8 [build] Add Makefile.win32.common 2008-09-22 20:11:38 -04:00
Behdad Esfahbod
984320dff1 [build] Don't define feature variables in Makefile.win32.features
This is not the right place to do that as one also needs to adjust
cairo-features.h.  Working on a proper fix.
2008-09-22 20:11:32 -04:00
Behdad Esfahbod
eb9ce58059 [build] Don't generate Makefile conditionals for default=always features 2008-09-22 19:23:41 -04:00
Behdad Esfahbod
caa3dbd61b [build] Make Makefile.*.features files more readable
By inserting a new line before each feature entry.
2008-09-22 19:15:05 -04:00
Behdad Esfahbod
23b9767bb3 Rename Makefile.*.config to Makefile.*.features as they should not be modified
The .config naming was giving people the impression that they can modify it.
That's not the case.
2008-09-22 17:34:36 -04:00
Kai-Uwe Behrmann
20be3182ef [svg] Counteract application of object matrix to mask.
The expected behaviour for masking in Cairo is to set the mask according
to the current active matrix and apply unchanged to the masked surface.

In SVG, the mask element is bound to the masked object and thus the local
matrix from that image object applies to the nested mask as well.

Attached is a small patch for substracting the matrix of a image
surface from the matrix of the mask to comply to Cairo's behaviour.
I did not test for other stuff like vectors or text and would expect this
part is incomplete.
2008-09-22 12:01:11 +01:00
Chris Wilson
223e7b9ed0 [test] Add an exercise for masking an image using the ctm.
Quote Kai-Uwe Behrmann:
"The expected behaviour for masking in Cairo is to set the mask according
to the current active matrix and apply unchanged to a to be masked
surface.

In SVG the mask element is bound to the masked object and thus the local
matrix from that image object applies to the nested mask as well."

This is a test case to exercise applying a mask to an image under
separate transformations.

Original patch by Kai-Uwe Behrmann, altered to run the test against all
backends (where it causes poppler to crash on my machine <evil grin>).
2008-09-22 09:55:15 +01:00
Behdad Esfahbod
3a45ff0e2f Make checks happy again
Minor syntax changes and improved check regexps.
2008-09-20 18:35:10 -04:00
Behdad Esfahbod
9084f6baf6 [Makefile.win32] Fix various issues reported by Damian Frank
We now compile cairo-system.c twice when building static library, but
that's fine because cairo-systemc. includes no other code.  Indeed
that's why cairo-system.c was born in the first place.
2008-09-20 18:26:27 -04:00
Behdad Esfahbod
45609d8400 Add cairo-system.c for platform system-specific code
This is where DLL initialization/finalization should be done for example.
Moved the one for win32.  For OS/2 just left a comment as the code needs
more work.

This change simplifies building shared and static libraries in the win32
makefiles.
2008-09-20 18:26:27 -04:00
Behdad Esfahbod
9c27323959 [aclocal] In generated Makefile.win32.config, don't overwrite feature vars
When I designed this first I thought people can define make vars on the
command line to override default features.  That works.  However, it's
natural to want to define the list of features in the toplevel Makefile
and not on command line.  So, we don't override user's var now.  They
can set a make feature var to 0 to disable it.
2008-09-20 18:26:19 -04:00
Behdad Esfahbod
6d0d5e7ba0 Define cairo_public correctly for win32
I'm conditioning on _MSC_VER.  Is this accurate?
Note that we never overwrite cairo_public.  So one can define it to
something else.
2008-09-20 17:52:19 -04:00
Behdad Esfahbod
11e96487d8 [Makefile.win32] Remove a few unused macro declarations
An undefined PACKAGE_BUGREPORT is not properly handled where it's used.
The other two were not being used after build system revamp.
2008-09-20 17:51:24 -04:00
Behdad Esfahbod
fee72c26af Make sure feature macros are checked using #if, not #ifdef; add a test for it
This is more robust to cases where people want to assign 0 to those variables.
(win32/alternate build systems, etc)
2008-09-20 17:20:36 -04:00
Behdad Esfahbod
e00565fa3c [src/check-includes.sh] Check that there is no #include <cairo.*.h>
The correct syntax to include cairo headers from other cairo headers and
sources is using "...", not <...>.  Check that.
2008-09-20 15:38:29 -04:00
Behdad Esfahbod
9c36a5f3f1 [src/Makefile.am.analysis] Check that all headers can be compiled standalone
This ensures that each header includes all headers it depends on.
This is now enforced by "make check".
2008-09-19 18:51:03 -04:00
Behdad Esfahbod
2dd90a6c94 [cairo-mutex] Move semicolons out of cairo-mutex-list-private.h
Previously cairo-mutex-list-private.h assumed that every use of the file
will produce a statement for each mutex by including a semicolon after
each.  But some uses (like enumerating all static mutexes  in an array
for example, can't be implemented with the semicolon in place.  So, move
the semicolon out to the users of the header file.
2008-09-19 18:45:44 -04:00
Behdad Esfahbod
8ae8189327 [configure.ac.warnings] Add -Wp,-D_FORTIFY_SOURCE=2 to warning flags
It enables various checks in glibc and gcc preprocessor.
2008-09-19 18:43:43 -04:00
Behdad Esfahbod
54b60dadb9 [Makefile.am.common] Remove gcc precompiled headers in "make clean"
Stale gcc precompiled headers can cause bugs very tricky to pin down.
2008-09-19 18:42:54 -04:00
Behdad Esfahbod
d84752605a Make sure (and check) that all private headers include some cairo header first
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two
places: config.h and cairo.h.  On Win32 build there is no config.h.  So,
we can't rely on pulling CAIRO_BEGIN_DECLS from there.  Hence, we now:

  * Not add those declarations to config.h anymore,

  * Test that every cairo private header includes some other cairo
    header before any other includes.

These two are fairly enough to ensure that cairo.h is seen from all
private headers.  There's still the case of headers not including
any header file at all.  I'll fix that later.
2008-09-19 17:19:10 -04:00
Behdad Esfahbod
eb89bf049a Check for _MSC_VER in mutex implementation code
Previously I made the mutex implementation code to use Windows mutexes
conditional on HAVE_WINDOWS_H.  This was suppposed to be a more wine-friendly
version of checking for a Windows platform.  However, it also meant that
when compiling without config.h, one had to stuff a #define for HAVE_WINDOWS_H
somewhere.  Traditionally it was put in cairo-features-win32.h, and that
practice was carried over even after my build system rewrite.

Somewhere along the road I also decided that the mutex implementation header
does not need to include anything other than config.h.  So the hacked up
HAVE_WINDOWS_H in cairo-features-win32.h was not being seen by its lone
user.

We now condition on any of HAVE_WINDOWS_H and _MSC_VER.  So the hack can be
removed altogether.
2008-09-19 16:57:42 -04:00
Behdad Esfahbod
33b6d2b5eb [src/check-cairoint.sh] Escape dot in regexp
No why, just that it's more robust :).
2008-09-19 16:57:42 -04:00
Behdad Esfahbod
d635c941b2 [image] Check for PACKAGE_BUGREPORT availability
Building using win32, there is no config.h.  So PACKAGE_BUGREPORT may
not be defined.
2008-09-19 16:57:42 -04:00
Chris Wilson
a6c0ebee7a [tessellator] Only run sweep-line validator when debugging
The tessellator is well-proven now. However, the sweep-line validator
consumes around 50% of the total time required to draw the fractal
Pythagoras tree (the leaves are sub-pixel rectangles, so lots of edges
to sweep through). So disable the validator, but keep it available for
debugging.
2008-09-19 16:59:51 +01:00
Chris Wilson
91f0b8b1ea [fill] Construct trap using rectangle directly.
Avoid the overhead in sorting the edges within
_cairo_traps_tessellate_convex_quad() by using our prior knowledge that we
have a simple rectangle and construct the trap from the extreme points.
2008-09-19 16:59:51 +01:00
Chris Wilson
e749b58af8 [test] Add rectilinear-fill
Add a test-case to exercise pixel-aligned fills to verify the optimised
rectilinear filler.
2008-09-19 16:59:50 +01:00
Chris Wilson
d5cd7ee74f [stroke] Optimise rectilinear strokes.
Avoid the overhead of sorting the rectangle in
_cairo_traps_tessellate_convex_quad() by constructing the trap directly
from the line segment. This also has secondary effects in only passing
 the non-degenerate trap to _cairo_traps_add_trap().

For rectilinear Hilbert curves this makes the rectilinear stoker over 4x
faster.
2008-09-19 16:59:25 +01:00
Chris Wilson
9930eefbbd Simple perf tweaks for a rectilinear Hilbert curve.
Some tweaks to avoid stack copies and branches that save ~25% in
_cairo_traps_tessellate_convex_quad().
2008-09-19 14:31:33 +01:00
Chris Wilson
27ee8dd9c6 [trap] Fixup a double _cairo_traps_fini().
The rectilinear stroke finalized the cairo_traps_t passed to it - which
was then subsequently used without re-initialized. So instead of
finalizing the structure, just remove any traps that we may have added
(leaving the limits and memory intact).
2008-09-19 14:31:33 +01:00
Behdad Esfahbod
b9c432862a [Makefile.am.releasing] Make release-publish work with parallel build
Carl had this confusing problem today making the snapshot, which was
"make release-publish" erring.  This commit reworks the release-publish
machinery to enforce serialization of some of the tasks such that it
works with make -j.  Don't expect any speedup though as "make distcheck"
is inherently sequential.
2008-09-18 19:35:28 -04:00
Behdad Esfahbod
9eee0e9358 [Makefile.am] Move sticky-bit clearing to dist-hook
It's a more natural place.  It also means that we just change permissions
on the dist directory, not the user's source directory.
2008-09-18 18:33:56 -04:00
Carl Worth
bdaaf3574a Increment version number to 1.7.7
Just after the 1.7.6 snapshot went out.
2008-09-18 15:06:12 -07:00
Behdad Esfahbod
005dd8499b [src/Makefile.win32] Remove recursive cairo_headers var
The cairo_headers variable in Makefile.win32 was unused and
from before the new build system was put in place.  One can
use enabled_cairo_headers if need be.
2008-09-18 16:39:23 -04:00
Behdad Esfahbod
567be443a2 [configure.ac] Make sure version information do not end up in config.h
By introducing $(top_srcdir)/cairo-version.h I tried to make it
unnecessary to rebuild the entire library when the version changes.
That comes handy around releases and when bisecting.

However this was not working as the version info was also ending
up in config.h and hence forcing a full rebuild upon change.
I now undefine the PACKAGE_VERSION* macros that autoconf defines,
so config.h does not change when cairo-version.h changes.
2008-09-18 16:27:02 -04:00
Behdad Esfahbod
73c70488f3 [src/check-*.sh] Use computed list of source files instead of running "find"
When the lists are available use them.  They will be available to test
programs by make.
2008-09-18 15:56:53 -04:00
Behdad Esfahbod
1ee675d6a0 [src/check-doc/syntax.sh] Fix test for out-of-tree build
Now that our build system can compute a list of all cairo files,
we prefer to use that in the tests instead of running "find".
However, we were not switching to $(srcdir) so the test was not
finding source files in out-of-tree builds.  Noticed that from
the grep error in distcheck.
2008-09-18 15:56:34 -04:00
Behdad Esfahbod
dc260f1c0b [doc] Remove lcd_filter API from doc listing
Carl removed the API but not the listing in the docs.
The docs tests are passing again now.
2008-09-18 15:35:03 -04:00
Behdad Esfahbod
d02fb0fd20 [doc/public/check-doc-coverage.sh] Make doc building needed for the test faster
We used to do a full doc build to just to run the coverage test.  That's
way too slow to expect people to run regularly.  Instead now we just do the
source code scanning part of the doc build system that is just enough to
know if all symbols are documented.

A full doc build can be done as always by invoking "make doc", and indeed
will be called as part of "make dist" or "make distcheck".
2008-09-18 15:33:10 -04:00
Behdad Esfahbod
c6a7971a1e [doc/public/check-doc-coverage.sh] Fix typo in checking cairo-undeclared.txt
Copy/paste error meant we were not checking cairo-undeclared.txt there.
Indeed the test was passing even though Carl forgot to remove lcd-fitlering
API from docs.  The test fails now.
2008-09-18 15:28:43 -04:00
Carl Worth
cf80c78f0c Correct NEWS mention to talk about fontconfig setting not Xsetting.
Thanks to Behdad for helping me get the terminology right.
2008-09-18 12:12:42 -07:00
Carl Worth
7fa5e0eb3a Add user-font-rescale-ps-ref.png to REFERENCE_IMAGES.
As caught by make distcheck.
2008-09-18 12:11:55 -07:00
Carl Worth
f39c5b40c7 Increase cairo version to 1.7.6.
We're finally going to get this overdue snapshot out.
2008-09-18 11:58:22 -07:00
Carl Worth
e00d794120 NEWS: Add notes for 1.7.6 snapshot.
Note 1.7 API changes: Remove lcd_filter, cairo_has_show_glyphs, and
add cairo_text_cluster_flags_t. Also mention a few major bug fixes,
Behdad's build-system rework, and Chris's customary robustness
improvements.
2008-09-18 11:55:28 -07:00
Carl Worth
46ed92e699 Remove text-lcd-filter tests
The lcd_filter API is gone now, and these tests were all failing
anyway.
2008-09-18 07:56:43 -07:00
Carl Worth
1b42bc8033 Make the lcd_filter API private
During the cairo summit it was decided that this API is to freetype-
specific to be in the general cairo interface for now. This will
likely come back again soon as a cairo_ft-specific interface.
2008-09-18 07:56:43 -07:00
Chris Wilson
0ab14a6b21 [polygon] Reduce number of branches.
Minimise the number of conditionals taken whilst constructing the polygon.
2008-09-18 09:06:29 +01:00
Behdad Esfahbod
24c51ee177 [acinclude.m4] Add compat macros for autoconf 2.59 2008-09-18 03:12:03 -04:00
Behdad Esfahbod
61317dac18 [acinclude.m4] Define m4_foreach_w if not available
Has been missing at least as of autoconf 2.59.
2008-09-18 02:42:38 -04:00
Behdad Esfahbod
cb10dfe715 Update tests to new cairo_text_cluster_flags_t API 2008-09-18 00:30:57 -04:00