Commit graph

3953 commits

Author SHA1 Message Date
Behdad Esfahbod
003dc9edab [configure.in] Make PS backend require zlib too (#12210)
The PS backend uses zlib these days.  Make it depend on zlib being available
like PDF has been doing.
(cherry picked from commit 114b07881e)
2007-11-26 21:24:40 -08:00
Vladimir Vukicevic
e544c75f6a Fix previous create_similar fallback patch
We can't use composite, as some backends don't implement it.
Use paint() instead.
(cherry picked from commit 93aee43690)
2007-11-26 21:24:39 -08:00
Vladimir Vukicevic
23278efcdb [win32] call free() and not scaled_font_destroy() if scaled init fails
If scaled_font_destroy() is called, a deadlock can result; there's no
reason to call destroy since the initialization failed (and, indeed,
it might not be valid to do so anyway).
(cherry picked from commit 6525d4debb)
2007-11-26 21:24:39 -08:00
Vladimir Vukicevic
1432c9232f Implement fallback for clone_similar
(cherry picked from commit 69dae7ee4a)
2007-11-26 21:24:39 -08:00
Vladimir Vukicevic
ce3744f796 [win32] check correct surface for BitBlt support in get_subimage
(cherry picked from commit f4a8633fce)
2007-11-26 21:24:39 -08:00
Carl Worth
c8aff910c4 Ensure the Render extension is initialized before calling XESetCloseDisplay
This avoids a potential crash from the Render extension being cleaned
up during XCloseDisplay before the cairo CloseDisplay hook goes on to
call into XRenderFreePicture.
(cherry picked from commit 9f4e643649)
2007-11-26 21:24:38 -08:00
Chris Wilson
578e38eaa7 [cairo-ft-font] Decrement lock count on error.
As noted in http://bugs.freedesktop.org/show_bug.cgi?id=12026 the error
path of _cairo_ft_unscaled_font_lock_face() failed to reset the
unscaled->lock_count before releasing the mutex and returning NULL.
(cherry picked from commit bc635da45a)
2007-11-26 21:24:38 -08:00
Adrian Johnson
849f402b85 PDF: Fix regression in pdf_surface_set_size()
(cherry picked from commit 8881265cca)
2007-11-26 21:24:38 -08:00
Carl Worth
afda117972 Ensure that a copied pattern gets its own user_data array
This fixes the bug reported here:

	Segfault with cairo_pattern_set_user_data
	https://bugs.freedesktop.org/show_bug.cgi?id=11855
(cherry picked from commit 13cae8b5e6)
2007-11-26 21:24:37 -08:00
Adrian Johnson
a76f8653d6 CFF Subsetting: fix integer encoding bug
Bug report at https://bugzilla.mozilla.org/show_bug.cgi?id=368668
(cherry picked from commit f52aa4c13e)
2007-11-21 10:43:34 -08:00
Chris Wilson
553d8a9319 [Makefile.am] Add missing headers and reference images.
Andrew Jorgensen spotted that make dist was missing a few headers needed
for compilation and running make distcheck had spurious failures. Add
the missing files to the distribution and a silly one-liner to check for
missing reference images.
(cherry picked from commit e5b01e6797)

[With some edits after cherry-picking to elide files that don't exist
in the 1.4 branch.]
2007-11-21 10:43:34 -08:00
Carl Worth
33b1e9ad8b Add missing definition of INT32_MAX
Some win32 builds were broken without this.
2007-11-21 10:43:21 -08:00
Vladimir Vukicevic
1786c05f6e [fix] Avoid int overflow when allocating large buffers
This patch introduces three macros: _cairo_malloc_ab,
_cairo_malloc_abc, _cairo_malloc_ab_plus_c and replaces various calls
to malloc(a*b), malloc(a*b*c), and malloc(a*b+c) with them.  The macros
return NULL if int overflow would occur during the allocation.  See
CODING_STYLE for more information.
(cherry picked from commit 5c7d2d14d7)
2007-11-20 19:43:11 -08:00
Carl Worth
cf0e1b8e89 Update version to 1.4.11 after the 1.4.10 release 2007-11-20 19:41:31 -08:00
Carl Worth
107a74885a Increment cairo version to 1.4.10 (and libtool versioning to 13:5:11) 2007-06-27 14:05:56 -07:00
Carl Worth
f595ad2348 Add notes to NEWS for 1.4.10 2007-06-27 14:04:27 -07:00
Carl Worth
2bf3e31da9 Prefer local dpy variable instead of display->display
This was a tiny piece of cleanup that had been erroneously included
with some earlier functional changes, (so it went through a cycle
of being applied and reverted). It's back now in its own commit.
2007-06-27 11:11:36 -07:00
Carl Worth
eebb0df512 Revert "[cairo-xlib-display] Hide XErrors during processing of the work queue."
This reverts commit 285b702ef6.

The recent commit of 0791f342b9 fixes
the same bug that 285b702e was fixing, but without introducing any
performance-killing calls to XSync. So we can drop those now.
2007-06-27 11:08:53 -07:00
Carl Worth
b019cb8a7a Revert "[cairo-xlib-surface] Check for errors before installing a NOOP error handler."
This reverts commit 7016614dd9.

We want to avoid any negative performance impacts due to extra calls
to XSync. The fact that X errors can be missed with this appraoch is
undesirable of course---a proper fix will likely involve moving to
XCB which will hopefully allow us to do the error-checking the way
we want without any performance penalty.
2007-06-27 11:07:07 -07:00
Carl Worth
6d021eb4b6 Merge branch 'ooo-fix' into cairo 2007-06-27 11:01:00 -07:00
Chris Wilson
0791f342b9 Avoid deferring resource cleanup for application drawables
This eliminates X errors propagated from cairo due to cleaning up
Render Pictures after the application had already destroyed the
Drawable they reference. (It would be nice if the X server wouldn't
complain that some cleanup work is already done, but there you
have it.)

This fix has been verified to fix the bug causing OpenOffice.org to
crash as described here:

	XError on right click menus in OOo.
	https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243811

And unlike other proposed fixes for this bug, this fix does not
introduce any new calls to XSync, (and thereby avoids performance
concerns from those).
2007-06-27 10:53:29 -07:00
Chris Wilson
9109946a1a [cairo-directfb] Correct minor typo.
Correct the reference to _cairo_directfb_surface_is_similar.
2007-06-21 15:40:23 +01:00
Nis Martensen
1e76aa66b2 Update INSTALL about status of backends 2007-06-19 11:48:43 -07:00
Carl Worth
02f753c23a Fix cairo-perf-diff to compile cairo-perf explicitly 2007-06-18 18:24:09 -07:00
Vladimir Vukicevic
2477e57de5 [perf] Add pixman_region_init_rects and use in extract_region
Avoid O(N*N) loop in traps_extract_region by letting us hand pixman
an array of rects all at once.
2007-06-18 14:02:41 -07:00
Chris Wilson
285b702ef6 [cairo-xlib-display] Hide XErrors during processing of the work queue.
It is possible for the resources that we defer freeing to be already
destroyed and trigger an XError whilst processing the work queue. For
example, the application renders to a Window and then destroys the
Drawable before proceeding with more rendering. This will trigger an
invalid Picture from RenderFreePicture whilst attempting to free the
resources.

By ignoring the possibility that the application could allocate a fresh
resource with the same ID, we can simply hide the XErrors...

Fixes: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243811
2007-06-15 21:16:49 +01:00
Chris Wilson
7016614dd9 [cairo-xlib-surface] Check for errors before installing a NOOP error handler.
Call XSync before ignoring errors from XGetImage to avoid hiding
unassociated errors. Similarly, call XSync before reinstalling the old
error handler to ensure no errors creep out of the ignored section.
2007-06-15 21:00:50 +01:00
Ryan Lortie
0c5d28a4e5 [xlib] Create source xrender Picture with IncludeInferiors
When an xlib surface is used as the source of a draw operation this
will cause the contents of child windows to be included in the source
data.  The semantics of drawing to xlib surfaces are unchanged (ie:
draws are still clipped by child windows overlapping the destination
window).
2007-06-13 18:59:22 -04:00
Brian Ewins
817d4b0c9a [atsui] Document ATSUI
Add cairo_atsui_font_face_create_for_atsu_font_id
and ATSUI to the documentation. Don't enable it yet,
since this is still unsupported.
2007-06-13 01:27:37 +01:00
Brian Ewins
fd1edaa5d3 [quartz] remove unused code
clean up warnings about unused code: removing 
_cairo_quartz_cairo_path_to_quartz_path and the functions
it calls.
2007-06-13 01:27:36 +01:00
Brian Ewins
d7a0816ec3 [quartz] move glyph array declarations
Move declarations causing a warning. A separate patch from
the other warning cleanups because it moves where the allocation
happens.
2007-06-13 01:27:36 +01:00
Brian Ewins
bf39b28b77 commit 75be87b4093aaa7f477d587d5a68308cade1b29c
[quartz] move glyph array declarations

    Move declarations causing a warning. A separate patch from
    the other warning cleanups because it moves where the allocation
    happens.
2007-06-13 01:27:36 +01:00
Brian Ewins
2034d1dbd5 [quartz] pass quartz_stroke_t not CGContextRef
Fix a typo where an incompatible pointer was being passed.
2007-06-13 01:27:36 +01:00
Behdad Esfahbod
54bbe44b08 [TODO] Add link to Adrian's finer-grain fallback thread 2007-06-11 17:51:37 -04:00
Vladimir Vukicevic
ef3c64fd13 [misc] Blow away last remaining $Id$ directives in sources 2007-06-11 09:27:11 -07:00
Behdad Esfahbod
853f23e18c [test] Use check_PROGRAMS instead of custom made SUPPORT_PROGS
It better handles $(EXEEXT) and is exactly made for this purpose.
2007-06-11 02:42:04 -04:00
Behdad Esfahbod
1d86c7fa88 [perf] Link to librt if available
This is needed on Solaris, but also works on Linux.
2007-06-09 13:48:32 -04:00
Carl Worth
85d045f267 Update version to 1.4.9 after the 1.4.8 release. 2007-06-08 16:08:44 -07:00
Carl Worth
fea4f344c4 Update version to 1.4.8 (and libtool info to 13:4:11) 2007-06-08 15:49:12 -07:00
Carl Worth
0b19ff1d3f Add include of X11/Xlib.h to cairo-xlib-xrender.h
This makes this header file self-sufficient. Thanks to
Sam Sirlin <samuel.w.sirlin@jpl.nasa.gov> for pointing
this out.
2007-06-08 15:36:05 -07:00
Brian Ewins
8223c976d5 [NEWS] add note about quartz fixes
We've got 11 less failures in the quartz tests this time around,
worth a mention.
2007-06-08 01:56:10 +01:00
Vladimir Vukicevic
00063a65f7 [quartz] fix DO_IMAGE
The implementation of DO_IMAGE leaks memory via a referenced surface,
and wasn't applied for strokes and glyphs. This patch corrects those
issues.
2007-06-08 01:46:27 +01:00
Brian Ewins
39e6a0090f [quartz] fall back on extended gradients
A temporary fix for mozilla bug 379321, use an image fallback for
gradients that use EXTEND_REPEAT or EXTEND_REFLECT.
2007-06-08 01:46:27 +01:00
Brian Ewins
7c1afdcd59 [quartz] fixes the offsets in the font-matrix test
Apply the font matrix offset to text on the quartz surface, if necessary.
2007-06-08 01:46:26 +01:00
Brian Ewins
55f1dbd0fb [quartz] ensure that line widths are scaled.
cairo-gstate applies the ctm to the coordinates used in paths,
but not to the line width. In quartz this ends up drawing unscaled
lines. This is a minimal fix - it undoes the scaling applied to the
points and then draws the path scaled correctly.
2007-06-08 01:46:25 +01:00
Brian Ewins
5a9de1b5c9 [atsui] remove unused code
Remove CGAffineTransformMakeWithCairoFontScale.
2007-06-08 01:46:25 +01:00
Brian Ewins
807c5ab613 [atsui] clean up warnings
Refactor code to get rid of compiler warnings.
2007-06-08 01:46:24 +01:00
Brian Ewins
b210b09e2d [quartz] implement CAIRO_EXTEND_REFLECT
Implement extend-reflect by tiling a larger 2x2 grid of reflected
images.
2007-06-08 01:46:24 +01:00
Brian Ewins
fa5dd548b0 [quartz] implement CAIRO_EXTEND_NONE
Implement extend-none for surface patterns, by using a single
DrawImage where possible. There is some code duplication in this
patch, to make it easier to edit this patch series without conflicts.
A patch to remove duplicate code will be required later..
2007-06-08 01:46:23 +01:00
Brian Ewins
147288864c [quartz] Refactor code to create a CGImageRef from a pattern
In order to implement CAIRO_EXTEND_NONE we will need to create
a CGImageRef without also creating a CGPattern. Separate the two
pieces of code.
2007-06-08 01:46:23 +01:00