Commit graph

3867 commits

Author SHA1 Message Date
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
Carl Worth
a5ee983e1c Update release notes for 1.4.8 2007-06-07 15:03:43 -07:00
Carl Worth
e19c49269d Remove stale reference to cairo-xlib-test.h 2007-06-07 12:19:46 -07:00
Carl Worth
5ded4479d6 Fix return value of cairo_surface_write_to_png for unsupported formats
For some reason this was returning CAIRO_STATUS_NULL_POINTER.
Now fixed to return CAIRO_STATUS_INVALID_FORMAT.
2007-06-07 10:45:40 -07:00
Carl Worth
ec63a78394 Add CAIRO_INTERNAL_FORMAT_RGB16_565 and prefer it over deprecated CAIRO_FORMAT_RGB16_565
Also clarify the documentation for cairo_internal_format_t
2007-06-07 10:45:40 -07:00
Behdad Esfahbod
b6ee6c531c [NEWS] Add par about Chris 'ickle' Wilson's error-handling improvements work 2007-06-07 12:24:21 -04:00
Chris Wilson
2399f923d5 [cairo-bentley-ottmann] Malloc reduction.
Attempt to allocate the edges during tessellate_polygon() from the stack,
if the polygon size is sufficiently small and amalgamate the separate
allocations for the list of events and their sorted index into a single
block.
2007-06-06 08:35:50 +01:00
Chris Wilson
ecf6f7f514 [cairo-scaled-font] Skip the mask composition onto the surface on error.
If we fail to composite the glyph onto the mask, skip compositing the
mask onto the surface.
2007-06-06 08:35:38 +01:00
Chris Wilson
2e60029392 [cairo-ft-font] Markup error paths with _cairo_error().
Behdad Esfahbod noted that in ff5af0f540 I had introduce new error
paths without the appropriate _cairo_error(). So review cairo-ft-font
to ensure that _cairo_error() is called at the start of every error path,
as close to the originating error as possible.
2007-06-05 12:23:03 +01:00
Behdad Esfahbod
a5e12cd9f2 [ROADMAP] Add link for a8mask patch 2007-05-31 19:21:30 -04:00
Chris Wilson
ff5af0f540 [cairo-ft-font] Propagate error rather than asserting.
FT_Set_Char_Size can fail due to an out-of-memory condition, so
propagate the error status instead of asserting that it never fails.
2007-05-30 15:57:29 +01:00
Chris Wilson
de4dd4263c [cairo] Propagate surface->status on cairo_t creation.
Set the cairo_t status to be the surface->status when the context is
created, and special case the NO_MEMORY status in order to avoid a
redundant allocation.
2007-05-30 14:11:04 +01:00
Chris Wilson
9f4efa8a3a [cairo-ps-surface] Check status of glyph_lookup.
Check for failure of _cairo_scaled_glyph_lookup() before preceeding to
access the glyph and propagate the failure up the callstack as far as
possible.
2007-05-30 13:51:24 +01:00
Chris Wilson
8010d46de4 [cairo-gstate] Check scaled font status.
After using the public API to access the scaled font, which only sets
the status field in the font, check the scaled font status. This will
then correctly propagate errors during glyph loading to the context.
2007-05-30 08:47:14 +01:00
Chris Wilson
faf986bb25 [cairo-gstate] Check status on existing fonts.
Add an initial guard in _cairo_gstate_ensure_scaled_font() and
_cairo_gstate_ensure_font_face() to check that there is no prior
error status on the objects.
2007-05-30 08:46:32 +01:00
Vladimir Vukicevic
ac4b20082d [misc] make _cairo_image_surface_nil_invalid static const 2007-05-29 20:50:02 -07:00
Vladimir Vukicevic
0b34e958f1 [test] add XFAIL test surface-pattern-big-scale down
Add test for image downscaling with large images severely limiting
the destination coordinate space.  See the test for more information.
2007-05-29 17:14:41 -07:00
Kouhei Sutou
0898411d0a [doc] Minor documentation fixes 2007-05-28 17:05:40 -04:00
Luo jinghua
4da50dfa02 [cairo-xlib-surface]: flush work queue before sending glyphs to X server.
After introducing a work queue for deferred destruction of X resource
my firefox crashes over and over again because XRenderFreeGlyphs is trying
to free a non-exist glyph (already freed). The problematic call sequence is
something like below:
  XRenderAddGlyphs (20990204, 20069)
  XRenderAddGlyphs (20990204, 20069)
  XRenderFreeGlyphs (20990204, 20069)
  XRenderFreeGlyphs (20990204, 20069)
You can see the two add/free glyphs is interlaced. And obviously, we'll crash
at the last one. To fix this bug, we must be ensure here's no pending work
to free the glyph that we want to sent.
2007-05-27 17:09:49 +08:00
Brian Ewins
69bf823db1 [atsui] use ATSGlyphGetScreenMetrics to measure glyphs.
I don't know how I managed to get glyph measurement so badly wrong
before, but tracing paths was not necessary, and 6x slower. The fix
switches to using ATSGlyphGetScreenMetrics for all metrics, and remove 
the  old measuring code.
2007-05-26 00:49:30 +01:00
Chris Wilson
5b2b008048 [cairo-scaled-font-subsets] Shortcut empty subset.
If the font_subset if empty, avoid allocating zero bytes and iterating
over the empty hash table.
2007-05-25 12:39:37 +01:00
Chris Wilson
c175cf7b83 [cairo-ft-font] Remove erroneous cached font faces.
Only return a font face from the cache if it is not in an error condition.
Otherwise unlink the bad font face from the cache and construct a new one.
2007-05-25 12:25:31 +01:00
Chris Wilson
f382c3e110 [cairo-pattern] Fully initialise the error pattern.
_cairo_pattern_fini depends on the pattern being correctly initialised,
for example when calling _cairo_user_data_array_fini(), so we need to
initialize the whole pattern and not just set the type to SOLID when
creating a pattern for a surface in error.
2007-05-25 12:15:48 +01:00
Boris Zbarsky
fcdfda8365 [quartz] implementing release_source_image (#11059)
The image surface that _cairo_quartz_surface_acquire_source_image creates never
seems to be released, probably because there is no release_source_image callback
in the quartz code.

The attached patch fixes that problem, at least insofar as the image surface
itself is no longer leaking.  I'm not sure whether any other cleanup needs to
happen here.

-Boris
2007-05-24 23:48:01 +01:00
Carl Worth
2c8598aafb Fix typo in comment. 2007-05-18 13:23:04 -07:00
Carl Worth
3cb67435f8 Document behavior of color stops added with identical offsets. 2007-05-18 13:22:36 -07:00
Carl Worth
1cf4ed9894 ROADMAP: Add bugs for 565 and 655 Visuals to the list 2007-05-18 13:16:36 -07:00
Behdad Esfahbod
7260ee23ec [Type1] #include <ctype.h> (#10989) 2007-05-18 11:55:56 -04:00
Adrian Johnson
6a42ddf0f9 TrueType Subsetting: Remove post table
The post table is not used now that TrueType fonts are embedded
in PDF as CID fonts.
2007-05-17 12:45:22 +09:30
Adrian Johnson
67e752f75f CFF Subsetting: Filter out Unique ID from subset
The subsetted font is not the same as the original font so it should not
have the same XUID and UniqueID.
2007-05-17 11:48:25 +09:30
Adrian Johnson
99a6983017 Ensure surface backend finish() is never called more than once.
Previously if the backend finish() function returned an error status,
surface->finished was not set true. This would result in the backend
finish() function being called twice which in the case of the PostScript
backend caused a seg fault.
2007-05-17 10:17:09 +09:30
Chris Wilson
c5ae0f1232 [cairo-truetype-subset] Avoid a potential 0 byte allocation.
During _cairo_truetype_subset_init skip copying the string_offsets if
the vector is empty.
2007-05-16 16:18:46 +01:00
Chris Wilson
e37bee3f52 [cairo-pdf-surface] emit_pattern_stops() array overrun.
_cairo_pdf_surface_emit_pattern_stops() tried to set the last element
to have an offset of exactly 1.0, but missed and set the next element
after the end of the array.
2007-05-16 16:06:26 +01:00
Chris Wilson
27de1869f5 [cairo-pdf-surface] Free allstops on error.
Ensure the locally allocated resources are freed on the error paths.
2007-05-16 16:06:26 +01:00
Chris Wilson
79e6c0207c [cairo-pattern] Check for the nil surface.
cairo_surface_create_similar() does not return NULL as was being checked
for, but the nil surface on error. Also ensure that the returned surface
is destroyed if we encounter an error whilst compositing.
2007-05-16 16:06:26 +01:00
Chris Wilson
32c0ef9f14 [cairo-gstate] Remove a redundant conditional.
Simplify _cairo_gstate_text_to_glyphs() with a tail call.
2007-05-16 16:06:26 +01:00
Chris Wilson
37d8c18b3f [cairo-scaled-font-subsets] Destroy the glyph if we fail to cache it.
If we fail to insert the glyph into the sub_font glyph cache then we
must destroy it before propagating the error.
2007-05-16 16:06:26 +01:00