Commit graph

3373 commits

Author SHA1 Message Date
Behdad Esfahbod
174ebc43fe [pixman] Make sure all source files include config.h
as their first include.
2007-04-03 20:02:48 -04:00
Behdad Esfahbod
208c32b245 [cairoint.h] Remove inline definition for MS compilers
Such things should go to config.h.  For one thing, cairoint.h is not
included in pixman.
2007-04-03 20:02:40 -04:00
Behdad Esfahbod
313a6f7321 [pixman] Cleanup inline mess (#10150)
Simply use "inline" instead of "INLINE" or "__inline__" and let
configure figure out what to use.
2007-04-03 20:02:10 -04:00
Behdad Esfahbod
88dc0c5f19 Make sure all nil objects start with _cairo_
Previously, the convention was that static ones started with cairo_, but
renamed to start with _cairo_ when they were needed from other files and
became cairo_private instead of static...

This is error prune indeed, and two symbols were already violating.  Now
all nil objects start with _cairo_.
2007-04-03 19:26:18 -04:00
Behdad Esfahbod
114be945db [test] Add svg2pdf 2007-04-03 16:47:39 -04:00
Behdad Esfahbod
b121468f14 [configure.in] Bump version up to 1.4.3, oops!
Supposed to be done after 1.4.2 was out, but apparently didn't happen.
2007-04-03 16:27:50 -04:00
Behdad Esfahbod
9710c48df3 [doc] Update Headers.mk 2007-04-03 16:26:48 -04:00
Behdad Esfahbod
040c68cb2c [test] Make pdf2svg build (and distributed) 2007-04-03 16:23:35 -04:00
Behdad Esfahbod
17f5706d17 [pdiff] Make stdint.h inclusion portable (#10441)
by copying magic bits from cairo-wideint-private.h.
2007-04-03 16:04:04 -04:00
Benjamin Berg
c2b1908f9b Fix typo in cairo_arc_negative() docs (#10497) 2007-04-03 15:46:51 -04:00
Behdad Esfahbod
814295f5fa [autogen.sh] Add --enable-test-surfaces to configure flags
Also remove --enable-maintainer-mode since we removed AM_MAINTAINER_MODE
from configure.in in b0d05f7421.
2007-04-03 15:37:40 -04:00
Chris Wilson
38c9909e29 [autogen.sh] Borrow version comparison from GNOME autogen.sh (#9566)
Our previous version check code was thinking that 1.10 is older than 1.7
2007-04-03 15:34:30 -04:00
Brian Ewins
00cc443737 [test/degenerate-path] remove quartz reference image
The reference image is no longer the correct size, so isn't
providing a comparison at all. In the absence of a better
replacement, removing it at least gives us diffs.
2007-03-26 21:44:33 +01:00
Chris Wilson
256f3e09a8 Destroy the current pattern before replacing with cairo_set_source().
Frequently cairo_set_source_rgb[a]() is used to replace the current
solid-pattern source with a new one of a different colour. The current
pattern is very likely to be unshared and unmodified and so it is likely
just to be immediately freed [or rather simply moved to recently freed
cache]. However as the last active pattern it is likely to cache-warm and
suitable to satisfy the forthcoming allocation. So by setting the current
pattern to 'none' we can move the pattern to the freed list before we
create the new pattern and hopefully immediately reuse it.
2007-03-26 20:58:14 +01:00
Chris Wilson
38442d4948 Back out the solid-pattern-cache from 9b53bc7c65.
Unfortunately one cannot cache live patterns and return a fresh reference
instead of creating new ones as patterns can be modified by the user and
so cannot be transparently shared between different users. However,
solid colour allocation is still a frequent operation, so we maintain a
small cache of recently freed patterns to reduce the malloc pressure.
2007-03-26 20:57:53 +01:00
Brian Ewins
c8e37af4b0 [quartz] fix order of fields in matrix conversion
There was a typo flipping the xy and yx fields when a 
cairo matrix was converted to a quartz matrix.
2007-03-25 23:31:40 +01:00
Brian Ewins
d2cdd5eba8 [atsui] fix scaling of glyph surfaces (#9568)
Atsui glyph surface were clipped incorrectly when the text is scaled,
visible in the text-pattern test.
2007-03-24 13:25:03 +00:00
Adrian Johnson
25ddc08004 PS: Remove unused variable 2007-03-23 23:19:30 +10:30
Adrian Johnson
e9a2696648 PDF: Use the TJ operator to show glyphs 2007-03-23 23:08:46 +10:30
Behdad Esfahbod
820341b4c5 [test/nil-surface] Test that cairo_get_target() returns non-NULL 2007-03-21 15:44:18 -04:00
Behdad Esfahbod
ef8515b4a6 cairo_push/pop_group(), bail out if cairo_t is in error status
Fixes the new test added to test/nil-surface to not crash
2007-03-21 15:29:18 -04:00
Behdad Esfahbod
52341f7e85 [test/nil-surface] Test cairo_create(NULL). Crashing in cairo_push_group! 2007-03-21 15:21:05 -04:00
Behdad Esfahbod
9cea8a4bb2 [cairo.c] Don't access gstate members directly 2007-03-21 15:12:58 -04:00
Behdad Esfahbod
39ae64ff03 [cairo-path] Don't access gstate members directly 2007-03-21 14:56:34 -04:00
Behdad Esfahbod
bd275c1978 [cairo-pattern] Make sure cached solid patterns are not put in error status 2007-03-21 12:34:37 -04:00
Behdad Esfahbod
e76d3cfa4f [cairo-gstate] Make sure gstate->next is initialized 2007-03-21 12:33:31 -04:00
Behdad Esfahbod
1469ea22ba [cairo-gstate] Move save/restore logic into gstate instead of cairo_t
by adding _cairo_gstate_save/restore().  This is in preparation for
adding copy-on-write behavior to gstate.
2007-03-21 11:22:33 -04:00
Jeff Smith
5f83a1b542 [cairo-output-stream] Remove use of strtol 2007-03-21 10:41:03 -04:00
Behdad Esfahbod
bba7169805 Fix file permissions again
Where do these a+x attributes coming from every once in a while?
2007-03-20 22:55:02 -04:00
Behdad Esfahbod
ad51ee5aa0 Define and use ARRAY_LEN 2007-03-20 18:59:19 -04:00
Chris Wilson
1de12714a9 [cairo-surface] Use a stack buffer for small numbers of rectangles 2007-03-20 18:48:15 -04:00
Chris Wilson
9b53bc7c65 Cache solid patterns
We use a small cache of size 16 for patterns created from solid colors,
e.g. cairo_set_source_rgb(). This helps with toolkits that draw many
widgets using the same colour scheme.

The cache uses a static index variable, which itself acts like a cache
of size 1, remembering the most recently used colour. So repeated
lookups for the same colour hit immediately. If that fails, the cache
is searched linearly, and if that fails too, a new pattern is created
and a random member of the cache is evicted.
2007-03-20 18:21:53 -04:00
Behdad Esfahbod
39679b1b21 [cairo-path-fixed] Fix "comparison between signed and unsigned" warnings 2007-03-20 18:01:41 -04:00
Behdad Esfahbod
c939421e16 Oops. Remove cairo-mutex-private.h include from test surfaces
as that file is included from cairoint.h now.
2007-03-20 08:54:01 -04:00
Behdad Esfahbod
0d3e886b18 Include cairo-mutex-private.h in test backends 2007-03-20 08:50:38 -04:00
Behdad Esfahbod
0263f18f84 [configure.in] Define PIXMAN_CFLAGS, to pass -fno-strict-aliasing to pixman 2007-03-20 08:50:38 -04:00
Mathias Hasselmann
94c367f7d7 Merge branch 'master' of git+ssh://hasselmm@git.freedesktop.org/git/cairo 2007-03-20 13:33:50 +01:00
Mathias Hasselmann
c4bd7cf6f8 Move declaration of cairo_mutex_t to cairo-mutex-private.h 2007-03-20 13:32:33 +01:00
Mathias Hasselmann
9c52a9e7d8 Remove _global_image_glyph_cache_mutex which is not used anymore. 2007-03-20 13:05:48 +01:00
Behdad Esfahbod
d3177a6875 [cairo-mutex] Rename _xlib_screen_mutex to _cairo_xlib_screen_mutex 2007-03-20 07:59:47 -04:00
Mathias Hasselmann
be52178443 Initialize mutexes at central location.
All mutex declarations have been moved to cairo-mutex-list.h.
This should avoid breaking of less frequently tested backends,
when mutexes are introduced or when existing mutexes are renamed.

Instead of initializing mutexes on library startup, mutexes are
lazily initialized within the few entry points of now by calling
CAIRO_MUTEX_INITIALIZE(). Currently only the OS/2 backend takes
care about releasing global mutexes. Therefore there is no counter
part of that macro for finalizing all global mutexes yet - but
as cairo-backend-os2.c shows such a function would be quite
easy to implement.
2007-03-20 10:11:14 +01:00
Carl Worth
aba2b299db boilerplate: Add EXTRA_LTLIBRARIES to CLEANFILES to allow make distcleancheck to pass. 2007-03-19 23:50:13 -07:00
Carl Worth
2483542b74 Add skew-extreme-ref.png to the tar file for the release. 2007-03-19 23:37:28 -07:00
Carl Worth
b91ff39214 Increment cairo version to 1.4.2 (and libtool versioning to 13:1:11) 2007-03-19 23:24:26 -07:00
Carl Worth
04b3de48f5 NEWS: Add notes for cairo 1.4.2 2007-03-19 23:22:39 -07:00
Carl Worth
1401f20eb9 Temporarily remove extend-reflect from the list of tests.
This test is known to sometimes cause an X server to enter a near-
infinite loop. That's a reall unkind thing to inflict upon our
users who are being nice enough to test cairo. Let's disable
this test for the 1.4.2 release.
2007-03-19 22:39:40 -07:00
Carl Worth
725a4de42d Propagate a nil surface out of _cairo_surface_create_similar_scratch
We detect an error in the surface before calling into private surface-modifying
functions, (such as _cairo_surface_set_font_options), that don't have the
nil-surface protection of public functions.

This should fix the problem reported (again) in this bug report:

	cairo crashes in cairo_create_simular if nil surface returned by other->backend->create_similar
	https://bugs.freedesktop.org/show_bug.cgi?id=9844

Though I haven't succeeded in replicating the bug yet, (perhaps a system
difference in allowing writes to read-only memory or not, or something
like that).
2007-03-19 16:50:55 -07:00
Carl Worth
eb472a9d9c xlib: Prefer surface->format over surface->visual for identifying masks
The original test for 'if (surface->visual)' dates back to a very old
assumption that if the xlib surface was created with an XRenderFormat
that the surface->visual field would be set to NULL. This assumption
was broken years ago with the following commit:

	0c05b23b31

This fixes the crash reported here:

	BadMatch when running gnome-terminal with the murrine-0.51 gtk engine
	https://bugs.freedesktop.org/show_bug.cgi?id=10250
2007-03-19 15:10:33 -07:00
Behdad Esfahbod
d27c42cc3f [boilerplate] Don't build in make all 2007-03-19 17:42:06 -04:00
Brian Ewins
12feb1f986 [quartz] apply ctm to text (#9568)
Applies the ctm to text output on the quartz surface. This corrects
the text-pattern test, and also corrects the size of text when the
ctm includes a scale.
2007-03-19 18:22:44 +00:00