Commit graph

5064 commits

Author SHA1 Message Date
Chris Wilson
e30a50746d [Makefile] Hide cpp files from automake
Prevent automake from including a CPP file with the SOURCE as that breaks
linking.
2008-12-05 15:18:48 +00:00
Chris Wilson
e13586b6b7 [configure] Fixup breakage with recent autoconf
To avoid these warnings:
configure.in:29: error: possibly undefined macro: LT_CURRENT
      If this token and others are legitimate, please use
m4_pattern_allow.
      See the Autoconf documentation.
configure.in:33: error: possibly undefined macro: LT_REVISION
configure.in:38: error: possibly undefined macro: LT_AGE

we simply use an m4_define for those variables instead.
2008-12-05 15:06:10 +00:00
Chris Wilson
90e0b7685f [test] Add test case for a leaky dashed rectangle.
Franz Schmid reported on the mailing list,
http://lists.cairographics.org/archives/cairo/2008-April/013912.html,
an issue with drawing a dashed rubber band in Scribus. The problem
appears when segments of the dashed rectangle are outside the image,
with the errant dash connecting the ends of the visible segments.
2008-06-19 17:28:25 -07:00
Vladimir Vukicevic
05a8e30311 [quartz] Fix CGFont leaks when creating quartz fonts
The toy font constructor and the _with_atsu_font_id constructor were
not properly managing the refcount of the CGFontRef.
2008-04-27 15:21:19 -07:00
Carl Worth
44e6cdd9b1 Increment version to 1.6.5 after the 1.6.4 release 2008-04-11 14:48:18 -07:00
Carl Worth
08a8048063 Increment version to 1.6.4 2008-04-11 14:33:12 -07:00
Carl Worth
a96176e12f NEWS: Add notes for cairo 1.6.4 2008-04-11 14:32:37 -07:00
Carl Worth
32e576382b Prevent cairo from being linked unnecessarilly with g++
The beos backend involves a source file written in C++.
Apparently, automake sees the conditional inclusion of
that source file and insists on doing the final link of
cairo with g++ even though that file isn't being compiled
at all.

We definitely don't want that as it makes libcairo link
and depend on libstdc++ unnecessarily, (which can break
distribution packaging when not expecting it, etc.).
2008-04-11 14:13:03 -07:00
Carl Worth
8f1c8d4b26 Revert "[xlib] Add locking around GC cache."
This reverts commit 9cfd82e87b.

The fix was broken as it introduced crashes by calling
XSetClipMask with a NULL GC, (basically a reintroduction
of the bug originally fixed here:

	7802de6d5edaf998c98b141870dc2c6b4c0f3e91

Let's revert for sake of the release, and fix this correctly
on master.
2008-04-11 14:09:15 -07:00
Carl Worth
a5770c3335 Increment version to 1.6.3 after the 1.6.2 release 2008-04-11 10:05:18 -07:00
Carl Worth
5bc6fd7139 Increment version to 1.6.2 2008-04-11 09:52:28 -07:00
Carl Worth
0c32497c34 NEWS: Add notes for 1.6.2 release 2008-04-11 09:50:53 -07:00
Chris Wilson
9cfd82e87b [xlib] Add locking around GC cache.
The per-screen cached of most-recently freed GCs lacks suitable locking
for it to be threadsafe.
(cherry picked from commit dc714106e1)
2008-04-11 09:07:24 -07:00
Adrian Johnson
cf057c1e86 PS: Fix inefficient implementation of Tm/Td operators that was crashing printers
The Td and Tm operator emulation were setting the font matrix like this:

  /some_font [xx yx xy yy x0 y0] selectfont

where [xx yx xy yy] is the font matrix and [x0 y0] is the position of
the first glyph to be drawn. This seemed to be the easiest way to
emulate the Tm operator since the six arguments to Tm required by PDF
are xx,yx,xy,yy,x0,y0.

Before the switch to pdf-operators the font matrix was set like this:

  /somefont [xx yx xy yy 0 0] selectfont x0 y0 moveto

The selectfont operator is equivalent to calling findfont, makefont,
and setfont. The makefont operator creates a new font dictionary for
specified font that contains the specified font matrix. The
description of the makefont operator in the PostScript Language
Reference Manual states:

  "The interpreter keeps track of font dictionaries recently created
   by makefont. Calling makefont multiple times with the same font and
   matrix will usually return the same font rather than create a new
   one."

So the emulation of Tm and Td was creating a new font dictionary every
time a text string was displayed due to the change in the translation
components of the font matrix. Previously the font dictionary was
re-used as with the translation components of the matrix set to zero,
the font matrix did not change frequently.

Some printers did not handle well the frequent creation a font
dictionary every time a few glyphs were displayed.

Fix this by ensuring the translation components of the font matrix
used in the emulation of Tm and Td operators is always set to
zero. Use moveto instead for the translation components.
(cherry picked from commit c5814d2aa3)
2008-04-11 09:03:49 -07:00
Carl Worth
eac9251d9a Increment version to 1.6.1 after 1.6.0 release 2008-04-10 18:02:59 -07:00
Carl Worth
d6263bec89 Increment cairo version to 1.6.0 2008-04-10 17:34:41 -07:00
Carl Worth
709805c26f NEWS: Add notes for 1.6.0 release 2008-04-10 17:33:51 -07:00
Carl Worth
aadbaf7d99 Increment version to 1.5.20 2008-04-08 02:45:56 -07:00
Carl Worth
8f123d035a NEWS: Add notes for 1.5.20 snapshot 2008-04-08 02:45:31 -07:00
Carl Worth
f7dea9a8d3 Fix distcheck by renaming large-source-ref.c to large-source-ref.png (oops!) 2008-04-08 02:29:05 -07:00
Carl Worth
c26a7de970 Prevent potentially infinite wandering through memeory in _cairo_hull_prev_valid
It is possible for _cairo_hull_prev_valid to be called just once
right before the calling loop is going to terminate. In this
case we really don't want to walk off the beginning of the
array and start wandering.

Thanks to Jonathan Watt for noticing this problem:

	https://bugzilla.mozilla.org/show_bug.cgi?id=306649#c21
2008-04-08 01:54:27 -07:00
Carl Worth
c19133eb9a Revert "[test] Repeat tests using cairo_push_group()."
This reverts commit 07122e64fa.

The extra testing did find a pdf bug, and that should be fixed,
but the extra maintenance burden of running another iteration
of all tests does not seem justfied at all---particularly since
it looks like dozens of new reference images would be needed
for the svg backend.

Also, the new "failures" of the image backend with this new
testing look like a misunderstanding of exactly what the new
testing is actually drawing.
2008-04-08 01:34:37 -07:00
Carl Worth
c1f7655f2f Check surface->status and finished in cairo_surface_write_to_png
Without these checks, a user could hit an assertion failure
by passing a finished surface to cairo_surface_write_to_png.
Now we return a nice CAIRO_STATUS_SURFACE_FINISHED error in
that case instead.
2008-04-08 00:41:09 -07:00
Chris Wilson
33c54ed240 [test] Add large-source to exercise handling of massive images.
This test exercises https://bugzilla.mozilla.org/show_bug.cgi?id=424333.

The test is expected to fail due to issues with pixman, but cairo
should fail gracefully and neither crash nor cause XErrors.
2008-04-08 07:52:47 +01:00
Chris Wilson
4924d4d928 [cairo-xlib] Do not create surface with mismatching Visual and PictFormat.
As identified by Vladimir Vukicevic,
_cairo_xlib_surface_create_similar_with_format() was erroneously passing
down the source Visual when creating a surface with a different
XRenderPictFormat.
2008-04-08 07:52:47 +01:00
Chris Wilson
9aac5916bc [test/xlib-surface] Check for mismatching Visuals and XRenderPictFormats
Vladimir Vukicevic reported that surfaces were being created with
mismatching Visuals and XRenderPictFormats - and demonstated here.
2008-04-08 07:52:47 +01:00
Chris Wilson
f6afba8f54 [cairo-xlib] Create Pixmap using depth from xrender_format.
Use the depth as specified by the xrender_format when creating the
pixmap (as opposed to a guess based on the cairo_format_t).
2008-04-08 07:52:47 +01:00
Chris Wilson
922fefdde4 [cairo-xlib] Handle missing RENDER during similar surface creation
If the xserver doesn't support the RENDER extension or simply doesn't
have the matching PictFormat then xrender_format might be NULL. Check
and fallback in this case.
2008-04-08 07:52:46 +01:00
Chris Wilson
07122e64fa [test] Repeat tests using cairo_push_group().
Test surfaces using similar surfaces with both CONTENT_COLOR and
CONTENT_COLOR_ALPHA, if applicable. This seems justified by the apparent
bugs in the pdf backend when going from an ARGB32 similar surface to
a destination RGB24 surface as well as isolated bugs in the image
backend.

The original goal was to try and trick the test suite into producing
a xlib surface with mismatching Visual/XRenderPictFormat. This succeeds,
although with a little bit of brute force in the xlib backend, but the
search to reproduce a BadMatch error fruitless.
2008-04-08 07:52:46 +01:00
Chris Wilson
e04e426238 [test/get-xrender-format] Free static data on exit.
Free the internal caches so that valgrind reports zero leaks.
2008-04-08 07:52:46 +01:00
Chris Wilson
e57ef66fab [test/xlib-surface] Zero pixel buffers before use.
As we only use RGB24 surface data the alpha channel is undefined, so
zero it to prevent valgrind warnings.
2008-04-08 07:52:46 +01:00
Chris Wilson
d0672e85ef [test/surface-source] Skip tests if we cannot create the source surface.
Check that the test environment supports the desired source and avoid
triggering asserts in the test routines.
2008-04-08 07:52:46 +01:00
Chris Wilson
056d3c853e [test/stroke-image] Fix memleak.
Release the temporary image surface after setting it as the source.
2008-04-08 07:52:46 +01:00
Carl Worth
e460e586d7 Update several pdf-specific reference images
I don't know if we made minor changes to the pdf backend, or
if this was due to a poppler change, (we recently bumped the
poppler required for testing up to 0.8.0), but any way around
it these test results look just as good as the reference images
they are replacing.
2008-04-07 22:02:44 -07:00
Carl Worth
fdcd144584 Add filter-bilinear-extents to the XFAIL list
This test case does show a bug, and we have lots of ideas on how
to fix the bug, but we want to wait until after the 1.6 release
before we fix it. See:

	http://bugs.freedesktop.org/show_bug.cgi?id=15349
2008-04-07 16:09:08 -07:00
Carl Worth
36246c51ba Revert "_cairo_pattern_get_extents: Fix to allow for expansion based on filter"
This reverts commit 731e121c80.

This commit introduced various problems, (some likely noticeable
in the test suite, and others perhaps not). For some details, see
the latest comments in the original bug report leading to the
fix now being reverted:

	http://bugs.freedesktop.org/show_bug.cgi?id=15349
2008-04-07 16:09:06 -07:00
Carl Worth
c88adb6aee Add svg-specific reference images for smask and smask-mask
The most recent change for the mask_id allocation fixes these
two test, (it fixes mask-image-mask as well, but it didn't need
a new reference image).
2008-04-07 16:09:03 -07:00
Carl Worth
164e9c195c SVG: Fix generation of mask_id identifiers
In tests such as smask-mask (and others) the cairo_mask operation
is used in the construction of a mask. In this case, the single
document->mask_id value was being incremented at inappropriate
times.

We fix this by adding a new _cairo_svg_document_allocate_mask_id
that returns the current value and increments it. That way,
callers can hold onto this reliable value for the desired lifetime
that the code needs the identifier.
2008-04-07 15:56:26 -07:00
Carl Worth
8aa306ec08 Add svg-specific reference images for smask-fill, smask-paint, and smask-text tests 2008-04-07 15:56:26 -07:00
Carl Worth
3d86023281 Add ps-specific reference images for smask and smask-text tests 2008-04-07 15:56:26 -07:00
Carl Worth
f2a94c84a1 Add underscore prefix to private _cairo_pdf_surface_set_size_internal 2008-04-07 13:03:58 -07:00
Adrian Johnson
3d22902fa3 Add PDF ref images for the smask tests
These tests render correctly in acroread 8.1.
2008-04-06 20:38:41 +09:30
Adrian Johnson
688fbc24c3 PDF: Add a function for changing the surface size
The smask-fill test was failing for PDF output because in some places
where the surface size is changed (eg when emitting patterns or
smasks) the cairo_to_pdf matrix was not updated.

Fix this by adding a function to handle the surface size change and
replace all the duplicated code for changing surface size with a call
to this function.
2008-04-06 20:24:40 +09:30
Carl Worth
6e5e852f73 Increment cairo version to 1.5.19 after the 1.5.18 snapshot 2008-04-06 03:25:58 -07:00
Carl Worth
6d6c8aa643 Increment cairo version to 1.5.18 and library versioning to 19:1:17 2008-04-06 03:11:04 -07:00
Carl Worth
44cd51ada6 NEWS: Add notes for 1.5.18 snapshot 2008-04-06 03:10:07 -07:00
Carl Worth
3f5ce00e99 Add missing parens() to function name in gtk-doc comment 2008-04-06 03:09:45 -07:00
Carl Worth
c08e2ba974 Document default opaque black source pattern. 2008-04-06 02:56:19 -07:00
Carl Worth
e07e1b7bbb Document many more defaults
Including: fallback_resolution, fill_rule, line_cap, line_join,
miter_limit, font_face, font_size, and operator.
2008-04-06 02:47:32 -07:00
Carl Worth
a55669c325 Document toy nature of cairo_select_font_face 2008-04-06 02:17:33 -07:00