Commit graph

6246 commits

Author SHA1 Message Date
Julien Danjou
97b5240bee [xcb] check for render extension presence
Otherwise this may leads to an invalid memory access to r.

Fixes: Bug 18588 - XCB backend fails with missing render.
https://bugs.freedesktop.org/show_bug.cgi?id=18588

Signed-off-by: Julien Danjou <julien@danjou.info>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 834f1d7b70)
2008-12-14 11:01:41 +00:00
Chris Wilson
6fed98c0d3 [gstate] Remove culled glyphs from clusters.
Sascha Steinbiss reported a bug where the PDF backend was reading beyond
the end of the glyph array:
http://lists.cairographics.org/archives/cairo/2008-December/015976.html.

It transpires that in the early glyph culling in the gstate we were
not updating the clusters to skip culled glyphs.
2008-12-14 10:54:42 +00:00
Jeff Muizelaar
d93bf10edc [quartz] Create a copy of the pattern so that the reference counts are balanced
The pattern could be stack allocated so we can't take a reference to it;
instead make a copy.

Based on a patch by Paolo Bonzini.
2008-12-10 17:41:45 -05:00
Jeff Muizelaar
673640a3b3 [win32] Use MOD instead of the '%' operator
Repeat should be handled using MOD instead of '%' so that negative numbers
are handled as expected. E.g. -1 mod 600 = 599, not 495 as the '%' operator
gives. This was causing https://bugzilla.mozilla.org/show_bug.cgi?id=466258

Patch from Robert O'Callahan
2008-12-08 11:37:38 -05:00
Chris Wilson
540de34453 [matrix] Optimise invert for simple scaling|translation matrices.
Peter Hercek reported, and provided a very useful test case for, a bug
that caused his applications to crash with Cairo detecting an
non-invertible pattern matrix and thus asserting the impossible happened.
Bisecting revealed that the bug first appeared with 3c18d95 and
disappeared with 0d0c6a1. Since neither of these explain the crash,
further investigation revealed a compiler bug (gcc 4.3.3 20081130,
earlier versions have different bugs!) that caused the matrix inversion
to be invalid iff _cairo_matrix_scalar_multiply() was inlined (i.e. -O0,
or an explicit noinline atttribute on that function prevented the bug, as
did -msse.) So we apply this workaround to hide the bug in the stable
series...

The matrix is quite often just a simple scale and translate (or even
identity!). For this class of matrix, we can skip the full adjoint
rearrangement and determinant calculation and just compute the inverse
directly.
(cherry picked from commit 0d0c6a199c)
2008-12-02 17:31:51 +00:00
Chris Wilson
f5634818f1 [os2] Move include cairo.h before os2.h
The defines need to come first, but we specify that cairo.h is the first
header file to be included by files.
2008-11-26 20:23:05 +00:00
Behdad Esfahbod
2f0f9a1a59 [os2] Fix includes
Patch from Dave Yeo to make cairo-os2.h include os2.h directly so the
header is standalone.
2008-11-26 20:22:57 +00:00
Maarten Maathuis
77e60df32f cairo-xcb: avoid leaking memory 2008-11-21 18:31:04 +00:00
Chris Wilson
361962b7fb [directfb] Compile fix with debug enabled.
Fix a trivial compile failure reported here:
  Bug 18322 - bug in _cairo_directfb_surface_release_source_image function
  (http://bugs.freedesktop.org/show_bug.cgi?id=18322)
2008-11-21 18:29:54 +00:00
Carl Worth
ab61544b30 Increment version to 1.8.5 after the 1.8.4 release. 2008-11-14 13:17:01 +01:00
Carl Worth
66e8f142e3 Increment version to 1.8.4 2008-11-14 11:08:40 +01:00
Carl Worth
b9c1344ad8 NEWS: Add notes for cairo 1.8.4
Just a few bug fixes here.
2008-11-14 11:07:10 +01:00
Carl Worth
d654d528de Blacklist "X.Org" < 7.0 with the buggy_repeat workaround.
This is in response to a report that a 6.9 server crashes with
cairo's extend-reflect test:

https://bugs.freedesktop.org/show_bug.cgi?id=15628#c2
2008-11-13 16:54:00 +01:00
Carl Worth
35a1ba0ddc Document the buggy_repeat workaround more carefully.
It's a confusing condition, so let's be explicit about where
the various numbers come from.
2008-11-13 16:54:00 +01:00
Behdad Esfahbod
a1ab11df01 Define RepeatNone, etc if the available Render version doesn't (#18385) 2008-11-05 11:54:54 -05:00
Behdad Esfahbod
1d8ad69abb [aclocal.dolt.m4] Fix build with bash versions <= 3.0 (bug #18363) 2008-11-04 01:55:44 -05:00
Adrian Johnson
6434cddb89 type1-subset: return unsupported on FT errors
and let type1-fallback handle it. This fixes the bug reported by
Peter Weilbacher in
http://lists.cairographics.org/archives/cairo/2008-October/015569.html
2008-11-02 21:21:59 +10:30
Chris Wilson
710f7d30d3 [scaled-font] Fix typo that prevented meta_surface lookup.
test/text-glyph-range was crashing since we requested the meta_surface but
the glyph wrongly believed it already had the meta_surface but was
checking for a path instead.
2008-10-31 02:24:05 +00:00
Chris Wilson
ab15d76275 [test] Remove XFAIL from user-font-mask
user-font-mask should PASS modulo the scaling anomalies in the external
renderers, so remove it from the XFAIL list.
2008-10-30 16:54:23 +00:00
Chris Wilson
540f555840 [analysis] Only limit to mask extends if bounded by mask.
The extents of cairo_mask() is only limited to the mask if the operation
is bounded by the mask.
2008-10-30 16:19:54 +00:00
Chris Wilson
4b29988939 Review users of cairo_rectangle_int_t for incorrect unsigned promotion.
Adrian Johnson discovered cases where we mistakenly compared the result
of unsigned arithmetic where we need signed quantities. Look for similar
cases in the users of cairo_rectangle_int_t.
2008-10-30 16:19:38 +00:00
Chris Wilson
0e4156121f [rectangle] Fix unsigned promotion whilst computing intersect.
_cairo_rectangle_intersect() incorrectly allows unsigned promotion during
its arithmetic.
2008-10-30 16:19:26 +00:00
Chris Wilson
2464b8a0a9 [pattern] Allow the projected surface extents to be negative.
In order to handle projection of analysis surface with user-fonts we need
to accommodate patterns extending into negative coordinate space.
2008-10-30 16:19:11 +00:00
Chris Wilson
d5d29075bd [gstate] Allocate temporary variable for backend_to_user transform.
_cairo_gstate_backend_to_user_rectangle() requires that its input
arguments are non-NULL and describe the input rectangle to be transformed.
However, we were passing through output parameters from the public API
which were allowed to be NULL. So we need to allocate temporary variables
in which to compute the output rectangle, but only copy them as required.
2008-10-30 16:16:09 +00:00
Carl Worth
d53537e8b5 Increment version to 1.8.3 after the 1.8.2 release.
Thanks to Chris Wilson (who else?) for the last-minute bug fix.
2008-10-30 08:20:59 -07:00
Carl Worth
f7c958d972 Increment cairo version to 1.8.2.
Hurrah! We're finally there.
2008-10-30 07:36:02 -07:00
Chris Wilson
42711a5586 [xlib] Fix _draw_image_surface() with opaque images.
If the image was opaque with no alpha channel, we filled the output alpha
with 0. Typically, the destination surface for dithering is an RGB window,
so this bug went unnoticed. However, test/xlib-expose-event is an example
where we generate an intermediate alpha-only pixmap for use as a stencil
and this was failing as the mask was left completely transparent. The
simple solution is to ensure that for opaque images, the output alpha is
set to the maximum permissible value.
2008-10-30 10:00:30 +00:00
Chris Wilson
c3940d342a [xlib] whitespace
Tweak the whitespace to lose some unnecessary line wrapping, casts and
blanks.
2008-10-30 10:00:30 +00:00
Behdad Esfahbod
e51648b601 [test/xlib-expose-event] Save the output image to disk 2008-10-30 04:43:45 -04:00
Carl Worth
f534bd549e Remove test/twin-ref.png.
I missed this in a previous commit, (I think I had used a
pattern of twin-*-ref.png which of course didn't match
this file).
2008-10-29 21:30:00 -07:00
Carl Worth
cf97966c07 NEWS: Finish the entry for the 1.8.2 release.
Add some summarizing paragraphs and organize bug-fixes and optimizations
into separate sections.
2008-10-29 21:01:01 -07:00
Chris Wilson
b6741cffef [NEWS] Spot another couple of typos.
Proof-reading is difficult, even with the squiggly lines.
2008-10-30 01:15:45 +00:00
Chris Wilson
d20cc82779 [NEWS] Correct a couple of typos.
Whilst Carl's not looking, fix a couple of typos -- in particular the one
calling me a bug! ;-)
2008-10-30 01:06:08 +00:00
Carl Worth
0ceda81dfd NEWS: Add long list of bugs fixed for 1.8.2.
(Still need to add a paragraph or two summarizing the release.)
2008-10-29 17:38:36 -07:00
Carl Worth
e0046aaf41 Remove twin perf case.
This performance test relied on the recently-removed ability
to select the internal twin-based font family with a name of
"cairo".

Presumably, we'll want to bring this performance case back when
some other means of requesting that font face is added.
2008-10-29 16:26:39 -07:00
Carl Worth
2922336855 Remove twin test case.
This test relied on the recently-removed ability to select
the internal twin-based font family with a name of "cairo".

Presumably, we'll want to bring this test case back when
some other means of requesting that font face is added.
2008-10-29 16:25:00 -07:00
Carl Worth
a824d284be Remove the ability to select the internal font face with a name of "cairo".
It's not fair to steal this name from the namespace of family names.
There are definitely cairo.ttf files that exist out there, and people
may already be using these, (or may use them in the future), with
cairo_select_font_face and a family name of "cairo".

In place of this, we'll want to come up with some other new, and
documented API for selecting the internal font face.
2008-10-29 16:21:42 -07:00
Carl Worth
f039da8d91 Add doltcompile and doltlibtool to .gitignore.
These generated files were recently added to our build system.
We definitely don't want to see them in git-status output.
2008-10-29 16:19:30 -07:00
Carl Worth
81439b3bc8 Add missing files to CLEANFILES and DISTCLEANFILES.
Without these files in these lists, "make distcheck" is unhappy.
2008-10-29 16:19:30 -07:00
Carl Worth
dd0416f5d4 Add recently added reference images to REFERENCE_IMAGES list.
This is just part of the make-distcheck routine for me. I know
Behdad added a test to check for missing images in the list, but
it doesn't seem to be getting run automatically as part of
'make test' nor 'make distcheck', (or if it it, then I'm not
noticing its output).
2008-10-29 16:19:29 -07:00
Chris Wilson
9cd9644c1d [test] Add a pass-through test.
Check that colour values are correctly passed through all the backends.
Simple test of the most fundamental functionality.
2008-10-29 22:04:34 +00:00
Carl Worth
cec689eab6 RELEASING: Suggest running 'make distcheck' against Xvfb.
This avoids hitting driver-specific bugs in the X server, and is
better than doing 'DISPLAY= make distcheck' which simply disables
all xlib testing completely.
2008-10-28 17:18:34 -07:00
Carl Worth
0ca6ba18e3 Add note to test/README on running with Xvfb.
This X server has been tested to run through the test suite with
no unexpected failures, and it avoids hitting any X-driver-specific
bugs.
2008-10-28 17:15:42 -07:00
Carl Worth
eed6771764 Disable the svg12 target in boilerplate.
This target was added to the boilerplate during 1.8.1. It currently
shows many failures in the test suite. These failures likely fall
into three different classes:

	* Tests needing new svg12-specific reference images

	* Tests exercising bugs in librsvg

	* Tests exercising existing cairo bugs

We haven't gone through the effort to separate these, but even for
the tests that are exercising actual cairo bugs, these are likely
bugs that existed in the cairo 1.8.0 release and not regressions.

Because of that, in this commit I'm conditionally disabling the
testing of the svg12 target. As soon as we increment the cairo
version to 1.9.0 or higher, this target will get re-enabled
automatically and we can begin the work to separate the tests as
described above and also fix the bugs.
2008-10-28 17:12:15 -07:00
Carl Worth
a94928ddfa Add svg-specific reference images for the twin test.
A bit annoying that I have to add the same image as both -svg11
and -svg12 but that's all the support we have in the current
test suite. I suppose I could avoid doing that by figuring out
why this test case cannot successfully roundtrip through librsvg
and back through cairo.
2008-10-28 15:55:38 -07:00
Carl Worth
53554ea889 Add ps2-specific reference images for trap-clip test.
These are quite similar to the existing ps3-specific reference images.
I definitely don't see any reason why this output should be considered
a failure.
2008-10-28 15:50:44 -07:00
Carl Worth
10fd16a05d Mark user-font-mask as XFAIL.
This test is expected to fail due to a couple of known bugs. Chris
has fixes for both bugs, but is holding off on them until after 1.8.2
to prevent introducing any possible new bugs with his fixes.
2008-10-28 15:41:40 -07:00
Carl Worth
655546243f Rename user-font-image test to user-font-mask.
Otherwise the reference image (user-font-image-ref.png) gets
interpreted as an image-specific reference image for the
user-font test case resulting in a bogus failure.
2008-10-28 15:35:35 -07:00
Carl Worth
42d2d1b6d3 Correct NEWS to say 'release' instead of 'snapshot' for 1.8.0
A copy-and-paste bug strikes again.
2008-10-28 12:48:03 -07:00
Chris Wilson
1327ec232c [image] Remove invalid assert.
The assert can fail for an error surface.

TODO: Decide what values should be returned from getters for error
surfaces.
2008-10-28 10:00:38 +00:00