Commit graph

3541 commits

Author SHA1 Message Date
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
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
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
1fe7088a11 [show_text_glyphs] Replace the bool backward with cairo_text_cluster_flags
Chris rightfully complained that having a boolean function argument is
new in cairo_show_text_glyphs, and indeed avoiding them has been one
of the API design criteria for cairo.  Trying to come up with alternatives,
Owen suggested using a flag type which nicely solves the problem AND
future-proofs such a complex API.

Please welcome _flags_t APIs to cairo.h
2008-09-18 00:26:07 -04:00
Chris Wilson
e55d5a76d7 [ps] Silence compiler warning. 2008-09-17 22:25:16 +01:00
Chris Wilson
d83a4d9905 [svg] Emit user-fonts.
Iterate over the user fonts subsets and emit the scaled glyphs.
2008-09-17 21:19:48 +01:00
Chris Wilson
eb39151fdc [scaled-fonts] Correct the order of scaled/user arguments. 2008-09-17 21:19:13 +01:00
Søren Sandmann Pedersen
86485e76b7 [xlib] Use _cairo_matrix_to_pixman_matrix() to compute the XTransform
The adjustments done to the pixman matrix also need to be done for
XTransform. Since an XTransform is just a pixman_transform_t with
another name, we can reuse the conversion function.
2008-09-17 15:18:55 -04:00
Chris Wilson
dbb692325b [ps] Consume dictionary after where.
where either pushes 'dict true' or 'false' so the true procedure needs to
consume the dictionary as well - for our purposes we just pop it off the
operand stack.
2008-09-17 19:09:16 +01:00
Behdad Esfahbod
1de35c04e0 Revert "[Makefile.am] Add CAIRO_LIBS to check-link."
This reverts commit a341cb5a98.
The change introduced in that commit should not be needed and libtool
should just do the right thing.  I cannot reproduce the problem
Chris was having no matter how hard I tried.
2008-09-17 02:11:38 -04:00
Chris Wilson
a341cb5a98 [Makefile.am] Add CAIRO_LIBS to check-link.
With --enable-gcov, make check aborts with gcov errors on check-link - it
appears that -lgcov is magic and requires explicit invovation on the
command-line.
2008-09-16 23:06:53 +01:00
Behdad Esfahbod
840218e0a0 [src/Makefile.am.analysis] Fix typos and improve scripts 2008-09-16 03:58:22 -04:00
Behdad Esfahbod
49c8c62040 [src/Makefile.am.analysis] Split off from src/Makefile.am 2008-09-16 03:58:21 -04:00
Behdad Esfahbod
eb749d7563 [.gitignore] Update 2008-09-16 03:58:21 -04:00
Behdad Esfahbod
a908fc04a7 [boilerplate/Makefile.am] Distribute Makefile.win32.config 2008-09-16 03:58:21 -04:00
Behdad Esfahbod
8151c50670 [*/Makefile.win32] Use Makefile.win32.config 2008-09-16 03:58:21 -04:00
Behdad Esfahbod
6892daf77c Create cairo-features-win32.h 2008-09-16 03:58:20 -04:00
Chris Wilson
60ab0f79f8 [pdf] Kill a compiler warning.
Older versions of gcc complain about the use of a guard variable, and warn
that solid_color may be used uninitialized. As it happens the guard
variable is redundant and we can just use solid_color directly.
2008-09-16 02:08:47 +01:00
Chris Wilson
87094e8c78 [Makefile] Amend checks for horrible msys environment.
automake-1.8 requires $(EXEEXT) for TESTS and feeds lt-check-*.c to
check-cairoint.h. Workaround both misfeatures.
2008-09-16 01:50:29 +01:00
Adrian Johnson
7880ddd101 Fix scaling of glyphs in type3 subset glyphs 2008-09-16 10:04:34 +09:30
Behdad Esfahbod
4619c76d2f [scaled_font] Improve readability 2008-09-15 18:51:50 -04:00
Behdad Esfahbod
e079ec03cb [scaled-font] Fix bug unlocking the wrong mutex (#16819) 2008-09-15 18:51:24 -04:00
Behdad Esfahbod
096408d80e [scaled-font] Improve comment 2008-09-15 18:51:04 -04:00
Behdad Esfahbod
e4753c82ff [src/README] s/Source.mk/Makefile.sources/ 2008-09-15 14:50:29 -04:00
Behdad Esfahbod
50f45d7768 [src/Makefile.am] Add comment referring to Makefile.sources 2008-09-15 14:50:07 -04:00
Chris Wilson
34f2506432 [surface] Trivial rejection of fill/stroke if clip extents is zero
Avoid tessellating the path if we know that the target extents is zero.
Besides the rare occurrence when everything is clipped out, a zero-sized
surface is often intended as a no-op surface for benchmarking.
2008-09-15 16:28:59 +01:00
Behdad Esfahbod
93325a3f08 [configure.ac.enable] Cleanup Makefile.*.config generation 2008-09-11 19:12:31 -04:00
Behdad Esfahbod
66d6cb642c [Makefile.am.common] Unify more common rules 2008-09-11 18:06:57 -04:00
Behdad Esfahbod
de5b8bce37 Makefile.am cleanup
Use a common build/Makefile.am.common file.
2008-09-11 15:49:09 -04:00
Adrian Johnson
1cf1b723c7 Return correct status 2008-09-11 18:36:55 +09:30
Adrian Johnson
15dd80c894 Don't overwrite previous status 2008-09-11 18:26:04 +09:30
Behdad Esfahbod
d1560bd687 Mark private symbol so 2008-09-11 04:23:05 -04:00
Behdad Esfahbod
4a01b1d9c9 Build -uninstalled.pc files 2008-09-11 00:38:30 -04:00
Adrian Johnson
d878924cf8 PS: execute type3 glyphs in their own dictionary
The PS emulation of the PDF text operators stores some data on the
user dict between calls to operators. When using the PDF text
operators in type 3 glyphs, the PDF operators were overwriting the
same data as the PDF operators in the page. Fix this by creating a new
dictionary to execute each type 3 glyph in.
2008-09-11 08:46:55 +09:30
Adrian Johnson
b56075ee51 Enable show_glyphs inside of in user-font glyphs 2008-09-11 08:41:39 +09:30
Adrian Johnson
c3663324fd Add _cairo_type3_glyph_surface_analyze_glyph()
This function emits the glyph to a null stream with the side effect
that other glyphs referenced by this user-font glyph will be added to
the font subsets.
2008-09-11 08:38:39 +09:30
Adrian Johnson
b74533b5a5 Add null output stream 2008-09-11 08:37:30 +09:30
Adrian Johnson
6772efcdf6 Put user fonts in a separate subset 2008-09-11 08:37:02 +09:30
Carl Worth
e0b4f8dc8f Avoid missing enum warnings with pixman 0.11.9 2008-09-10 14:54:18 -07:00
Carl Worth
bdcdc8400e Rename _init_pattern_with_snapshot to _cairo_pattern_init_snapshot 2008-09-10 14:54:18 -07:00
Chris Wilson
bf62798b12 [cairo-compiler-private.h] Divert popen to _popen for MSVC
Microsoft uses _popen instead of popen - required to build the
boilerplate but not actually used on Windows (by default)!
2008-09-10 18:21:50 +01:00
Behdad Esfahbod
5e5a2b9da7 More fixes for pkgconfig files
Should all work now.
2008-09-10 12:41:57 -04:00
Behdad Esfahbod
9dd9289c4a Rename cairo-backend.pc.in to cairo-features.pc.in 2008-09-10 12:18:27 -04:00
Behdad Esfahbod
87dfceb9ec [Makefile.am] Rename INCLUDES to AM_CPPFLAGS
Fixes automake warnings
2008-09-08 15:13:07 -04:00