Commit graph

4369 commits

Author SHA1 Message Date
Chris Wilson
d4d3873bcc [cairo] Correct the documentation for cairo_get_group_target().
cairo_get_group_target() can never return NULL, but will always
return the current destination surface.
2007-12-20 21:21:46 +00:00
Chris Wilson
3bf06c3366 [test/*] Create new surfaces using the group target.
cairo_get_target() returns the original surface passed to
cairo_create(), and not the current destination as required when
testing drawing to the same surface using multiple contexts.

For completeness we also use the group target when creating similar
surfaces within the tests (to check that similar surfaces of similar
surfaces also work).
2007-12-20 21:21:32 +00:00
Chris Wilson
643834e7aa [cairo-surface] Return UNSUPPORTED for acquire_(dest|source)_image.
If the backend does not support fallbacks ie backend->acquire_dest_image
or backend->acquire_source_image is NULL, then return
CAIRO_INT_STATUS_UNSUPPORTED rather than attempt to jump to the NULL
hooks.
2007-12-20 17:51:56 +00:00
Chris Wilson
14454e12d8 [cairo-test] Wrap test function with cairo_save/restore().
Restore the context to the original state before blitting the
group surface in order to remove any residual state such as a clip path.
2007-12-20 17:51:56 +00:00
Behdad Esfahbod
d0119a5aa2 [cairo-unicode] Don't compile _cairo_utf8_to_utf16 on Linux
The _cairo_utf8_to_utf16() is only used in win32 and atsui font backends.
Don't build it if none of those two are available.
2007-12-20 12:30:35 -05:00
Chris Wilson
281b11aef1 [cairo-test] Use CAIRO_OPERATOR_SOURCE when painting the group surface.
To correctly copy a surface onto the destination irrespective of its
content requires the SOURCE operator. Forgetting to do so here causes
uninitialized pixels to be mixed into the result and the failure of
many tests for the similar surface. Oops...
2007-12-20 17:12:08 +00:00
Chris Wilson
ed3fccec01 [pdiff] Avoid the memleak for small surfaces.
Allocate the arrays after the guard against small surfaces to avoid
leaking them.
2007-12-20 14:13:12 +00:00
Chris Wilson
df938a515b [cairo-path-bounds] Check for the empty path.
Avoid returning uninitialized variables if we're asked to find the
bounds of an empty path - in which case we just return a rectangle
of zero width and height similar to the empty clip region.
2007-12-20 14:13:12 +00:00
Jim Meyering
c2adfb4052 Don't leak memory upon failed realloc.
* cairo-glitz-surface.c (_cairo_glitz_surface_composite_trapezoids):

Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-12-19 11:09:47 -08:00
Behdad Esfahbod
4595134598 [directfb] Fix header include order to include cairoint.h first 2007-12-18 16:00:21 -05:00
Nis Martensen
18f4f02f72 [src/check-cairoint.sh] Fix typo in shell script 2007-12-18 15:59:19 -05:00
Chris Wilson
8343d6cc2a Replace various uses of CAIRO_STACK_BUF_SIZE with a single macro.
In http://bugs.freedesktop.org/show_bug.cgi?id=13699, Pavel Vozenilek
reports a duplicate define for computing the appropriate length for an
on-stack array. The macro in question, and a few other places, was
performing CAIRO_STACK_BUF_SIZE/sizeof(stack[0]) so we can simplify
them slightly by using a common macro.
2007-12-17 13:45:01 +00:00
Benjamin Otte
627a8b4a2f [directfb] replace u32 with uint32_t
This fix makes it compile for me again
2007-12-17 12:42:14 +01:00
Behdad Esfahbod
9637ffc62f [cairo-xlib] Minor cleanup and add comment 2007-12-17 01:55:15 -05:00
Behdad Esfahbod
83963d2a9e [cairo-ft] Revert "Force non-AA text when using a bitmap strike with only scaling transform." (#13479)
The reasoning for that commit was that fonts with bitmap strikes should be
rendered with antialiasing off for those (hopefully) few glyphs that don't
have a bitmap.

However, it turns out, there are fonts that have some, but very few, bitmaps,
and this changed forces non-AA rendering on them.  We now support multiple
glyph formats per font in the Xlib backend, so backing this out to let every
glyph render as is.  Fontconfig rules can be used to force AA off on a per-font
basis.

This reverts commit 06af5c2891.
2007-12-17 01:19:53 -05:00
Behdad Esfahbod
805b668260 [cairo-xlib] Support scale fonts with glyphs of multiple formats (#13479)
We maintain three Xrender glyphsets per scaled font, one for each of A1, A8,
and ARGB32.  This is required to correctly support fonts with bitmaps for
some glyphs but not all.
2007-12-17 01:14:45 -05:00
Carl Worth
f6dd037cf3 Remove rasterization when a paginated surace is used as a source
This was an old workaround for a bug that seems to no longer
exist. Thanks to Donn Ingle for pointing out the problem.
2007-12-14 14:04:13 -08:00
Adrian Johnson
9b3ce8b17a PS: Use the correct bounding box in Type 3 fonts
Previously this was a fixed size.
2007-12-12 23:41:53 +10:30
Adrian Johnson
afdd53d35f PS: Return the status for emit_image and gradients 2007-12-12 23:35:56 +10:30
Boying Lu
55f5c4ffda Remove cairo_private from static declaration 2007-12-12 21:05:57 +10:30
Claudio Ciccani
942e3d5308 [cairo-directfb] Support some environment variables
Added a couple of (boolean) env. vars affecting the backend:
CAIRO_DIRECTFB_NO_ACCEL, disables acceleration
CAIRO_DIRECTFB_ARGB_FONT, enables using ARGB fonts instead of A8
2007-12-11 15:50:05 +01:00
Claudio Ciccani
f3cec9d1c2 Merge branch 'master' of git+ssh://klan@git.freedesktop.org/git/cairo 2007-12-10 22:58:06 +01:00
Behdad Esfahbod
c26084a45f Pass $(MAKE) to test shell scripts (#13591) 2007-12-10 14:38:48 -05:00
Behdad Esfahbod
78dac47399 [util/malloc-stats.c] Add a public function malloc_stats()
Apparently glibc already provides the function:

  void malloc_stats (void);

So, like we do for backtrace_symbols(), override the public symbol.
It still is defined as __destructor__ and runs at program finalization.
2007-12-10 14:38:48 -05:00
Claudio Ciccani
08516d97a1 [cairo-directfb] Merging from directfb.org
- Improved performance in case of surface conversion: allocate a shadow buffer that can only grow
- Fixed support for small surfaces (less than 8x8)
- Optimize the blending function according to the surface format
- Added _directfb_categorize_operation(): selects the blitting function according to the transform matrix
- Avoid inverting the matrix when doing a simple StretchBlit()
- Use TextureTriangles() instead of StretchBlit() when scale factors are negative
- Added support for ARGB32 fonts (converted to A8 internally)
- Removed unused functions (flush() and mark_dirty_rectangle())
- Code cosmetics
2007-12-10 18:54:01 +01:00
Benjamin Otte
dd71ac910c typo 2007-12-10 13:17:09 +01:00
Emmanuel Pacaud
1f1f96d645 [SVG] Fix a minor issue when emitting a radial gradient with r1 == r2.
Minor because I don't know how the output is supposed to look in this case.
2007-12-08 22:32:16 +01:00
Brian Ewins
19680f545a [quartz] fix gradient-zero-stops crash (moz#407104)
Fixes failure in gradient-zero-stops test, reported
by Boris Zbarsky (thanks!) as Mozill a bug#407104.
2007-12-06 21:31:15 +00:00
Brian Ewins
e6c34bb691 [quartz] refactor gradient handling
Avoid checking the gradient type twice. This refactor
also makes it easier to check when the gradient has no stops,
and will make it easier to separate out the different
implementations of EXTEND_REPEAT, REFLECT for linear and
radial gradients.
2007-12-06 21:31:14 +00:00
Brian Ewins
b81c8473bd [test] add test for gradient with no stops
Boris Zbarsky reported a bug where having zero stops in a
gradient pattern would crash in the quartz surface. This
test checks for that case. Mozilla bug#407104.

This also crashes testing pdf; and the ps, svg surfaces
look suspicious (they reference stops[0]) but I havent
been able to test them yet.
2007-12-06 21:31:10 +00:00
Peter Weilbacher
a7ae9c45d9 [os2] add memory allocation wrappers for pixel buffers
Add ability to use OS/2 APIs instead of C library functions to manage
pixel buffer allocations. This is to work around heap fragmentation.
This implements two wrapper functions which replace _cairo_alloc_abc and
free and when compiled with OS2_USE_PLATFORM_ALLOC the OS/2 functions
DosAllocMem and DosFreeMem will be used for allocation/deallocation.

Also try to minimize the heap when shutting down the cairo library.
2007-12-06 16:46:28 +01:00
Carl Worth
be79779331 Restrict initial buggy version to X.Org 6.7 rather than 6.0
Also add some comments describing the test.
2007-12-05 09:24:17 -08:00
Bernardo Innocenti
d4138d1161 Fix version check for buggy_repeat on modular Xserver 1.x
The versioning of the X server has restarted from 1.0 in the
modular build.  So we adjust the text to avoid considering
the new servers buggy.
2007-12-05 09:19:22 -08:00
Carl Worth
946b8fedb5 Fix misspellings 2007-12-05 02:30:58 -08:00
Carl Worth
94a35c7b71 Fix version number typo 2007-12-05 02:28:20 -08:00
Carl Worth
6f2ec12b88 Increment version to 1.5.5 after the 1.5.4 snapshot 2007-12-05 02:26:05 -08:00
Carl Worth
e0c0275e17 Increment version to 1.5.4 and to 14:1:12 2007-12-05 02:06:33 -08:00
Carl Worth
11aaf992fb NEWS: Add notes for 1.5.4 2007-12-05 01:52:03 -08:00
Vladimir Vukicevic
150564c7f8 [quartz] use rectangle_int_t, not rectangle_int16_t 2007-12-04 14:05:47 -08:00
Vladimir Vukicevic
e8574022f9 [quartz] cleanup: remove trailing whitespace 2007-12-04 13:54:32 -08:00
Vladimir Vukicevic
ee01a94726 [quartz] Use CGContextDrawTiledImage if available
Use this 10.5-only method if available, as it greatly speeds up
tiled image rendering (EXTEND_REPEAT).
2007-12-04 13:53:03 -08:00
Vladimir Vukicevic
2c25033e14 [quartz] Handle creating 0x0 surfaces
Make all 0x0 surfaces be no-ops when used in a rendering operation.
2007-12-04 13:50:49 -08:00
Chris Wilson
407ed0a6e7 [Makefile.am] Add lcov-clean to distclean.
Clean the gcov temporary files when doing a full clean - spotted in a
patch by Patrick Hulin to adapt cairo's lcov targets to glib.
2007-12-03 18:58:21 +00:00
Chris Wilson
9c73259403 [Makefile.am] Wrap lcov make targets within an AM_CONDITIONAL.
Hide 'make lcov' and friends unless the user has actually enabled lcov
supported during configure.
2007-12-02 18:46:23 +00:00
Behdad Esfahbod
5f38e215ed [README] Remove the Dependencies section as it falls out of date easily 2007-12-01 22:44:54 -05:00
Behdad Esfahbod
b46bb58e11 [configure.in] Bump freetype required version to 2.1.9 (#13482) 2007-12-01 20:42:03 -05:00
Adrian Johnson
b701b42630 win32: Implement _cairo_win32_scaled_font_init_glyph_surface()
This is required when using win32 bitmap fonts with PS/PDF surfaces.
2007-12-02 01:36:43 +10:30
Adrian Johnson
1441e165f2 Fix regression in Type1 Fallback
As a result of the changes to improve the status checking,
_cairo_type2_charstrings_init() was failing due to the failure
status returned when the font->output stream is destroyed.
This is because _cairo_type2_charstrings_init() does not
create an output stream.

Fix this by initializing font->output to NULL and only
destroy it if not NULL.
2007-12-02 00:50:28 +10:30
Behdad Esfahbod
e6166f7b44 Convert bash scripts to regular sh ones for greater portability 2007-12-01 04:19:39 -05:00
Carl Worth
0d932f43fe Explicitly call bash for bash-specific scripts
Thanks to Solaris-using Brian Cameron for pointing out that our
shell scripts are bash-specific. We'd be glad if someone cared to
rewrite them to not require bash, but for now let's have truth in
advertising at least.
2007-11-30 16:19:45 -08:00