mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-29 04:20:37 +02:00
Merge branch 'backport-fixes' into '1.16'
Cherry-pick fixes from master into 1.16 See merge request cairo/cairo!20
This commit is contained in:
commit
2a48955a33
50 changed files with 152 additions and 128 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -35,3 +35,4 @@ stamp-h.in
|
|||
*.rej
|
||||
*-uninstalled.pc
|
||||
.vimrc
|
||||
gtk-doc.m4
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
variables:
|
||||
# Docker images for various distros and architectures
|
||||
|
||||
AMD64_FEDORA_LATEST: "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/fedora:latest"
|
||||
AMD64_OPENSUSE_TUMBLEWEED: "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/opensuse:tumbleweed"
|
||||
AMD64_DEBIAN_TESTING: "registry.gitlab.com/alatiera/librsvg-oci-images/amd64/debian:testing"
|
||||
AMD64_FEDORA_LATEST: "registry.gitlab.gnome.org/gnome/librsvg-oci-images/amd64/fedora:latest"
|
||||
AMD64_OPENSUSE_TUMBLEWEED: "registry.gitlab.gnome.org/gnome/librsvg-oci-images/amd64/opensuse:tumbleweed"
|
||||
AMD64_DEBIAN_TESTING: "registry.gitlab.gnome.org/gnome/librsvg-oci-images/amd64/debian:testing"
|
||||
|
||||
I386_DEBIAN_TESTING: "registry.gitlab.com/alatiera/librsvg-oci-images/i386/debian:testing"
|
||||
I386_DEBIAN_TESTING: "registry.gitlab.gnome.org/gnome/librsvg-oci-images/i386/debian:testing"
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
|
@ -22,7 +22,7 @@ stages:
|
|||
|
||||
script:
|
||||
- ./autogen.sh
|
||||
- make check TARGETS=image NUM_THREADS=8
|
||||
- make check TARGETS=image VERBOSE=1
|
||||
|
||||
artifacts:
|
||||
when: on_failure
|
||||
|
|
|
|||
8
AUTHORS
8
AUTHORS
|
|
@ -29,7 +29,7 @@ Larry Ewing <lewing@novell.com> Test case for group-clip
|
|||
Brian Ewins <Brian.Ewins@gmail.com> ATSUI maintenance (first success at making it really work)
|
||||
Bertram Felgenhauer <int-e@gmx.de> Fixes for subtle arithmetic errors
|
||||
Damian Frank <damian.frank@gmail.com> Build system improvements for win32
|
||||
Bdale Garbee <bdale@gag.com> Provided essential support for cairo achitecture sessions
|
||||
Bdale Garbee <bdale@gag.com> Provided essential support for cairo architecture sessions
|
||||
Jens Granseuer <jensgr@gmx.net> Fixes to generate proper compiler flags
|
||||
Laxmi Harikumar <laxmi.harikumar@digital.com> Build fix
|
||||
J. Ali Harlow <ali@avrc.city.ac.uk> win32 backend updates
|
||||
|
|
@ -42,7 +42,7 @@ Thomas Hunger <info@teh-web.de> Initial version of cairo_in_stroke/fill
|
|||
Thomas Jaeger <ThJaeger@gmail.com> Extended repeat modes for X
|
||||
Björn Lindqvist <bjourne@gmail.com> Performance test cases
|
||||
Kristian Høgsberg <krh@redhat.com> PDF backend, PS backend with meta-surfaces
|
||||
Amaury Jacquot <sxpert@esitcom.org> Documentation review, appplication testing
|
||||
Amaury Jacquot <sxpert@esitcom.org> Documentation review, application testing
|
||||
Adrian Johnson <ajohnson@redneon.com> PDF backend improvement
|
||||
Michael Johnson <ahze@ahze.net> Bug fix for pre-C99 compilers
|
||||
Jonathon Jongsma <jonathon.jongsma@gmail.com> Fix documentation typos
|
||||
|
|
@ -61,7 +61,7 @@ Jordi Mas <jordi@ximian.com> Bug fix for cairo_show_text
|
|||
Nicholas Miell <nmiell@gmail.com> Fixes for linking bugs on AMD64
|
||||
Eugeniy Meshcheryakov <eugen@debian.org> PS/PDF font subsetting improvements
|
||||
Zakharov Mikhail <zmey20000@yahoo.com> Build fix for HP-UX
|
||||
Christopher (Monty) Montgomery <xiphmont@gmail.com> Performnace fix (subimage_copy), multi-thread testing
|
||||
Christopher (Monty) Montgomery <xiphmont@gmail.com> Performance fix (subimage_copy), multi-thread testing
|
||||
Tim Mooney <enchanter@users.sourceforge.net> Fix test suite to compile with Solaris compiler
|
||||
Jeff Muizelaar <jeff@infidigm.net> Patient, painful, pixman code merge. Many fixes for intricacies of dashing.
|
||||
Yevgen Muntyan <muntyan@tamu.edu> win32 build fix
|
||||
|
|
@ -105,7 +105,7 @@ Sasha Vasko <sasha@aftercode.net> Build fix to compile without xlib backend
|
|||
Vladimir Vukicevic <vladimir@pobox.com> Quartz backend rewrite, win32/quartz maintenance
|
||||
Jonathan Watt <jwatt@jwatt.org> win32 fixes
|
||||
Peter Weilbacher <pmw@avila.aip.de> OS/2 backend
|
||||
Dan Williams <dcbw@redhat.com> Implemnt MMX function to help OLPC
|
||||
Dan Williams <dcbw@redhat.com> Implement MMX function to help OLPC
|
||||
Chris Wilson <chris@chris-wilson.co.uk> Large-scale robustness improvements, (warn_unsed_result and malloc failure injection)
|
||||
Carl Worth <cworth@isi.edu> Original library, support for paths, images
|
||||
Richard D. Worth <richard@theworths.org> Build fixes for cygwin
|
||||
|
|
|
|||
20
NEWS
20
NEWS
|
|
@ -257,7 +257,7 @@ Bug Fixes
|
|||
(Bug #105084)
|
||||
* Fix multi-monitor virtual desktop with negative coords on Win32
|
||||
(Bug #100793)
|
||||
* Fix issues occuring with older FreeType versions.
|
||||
* Fix issues occurring with older FreeType versions.
|
||||
|
||||
|
||||
Release 1.15.10 (2017-12-07 Bryce Harrington <bryce@osg.samsung.com>)
|
||||
|
|
@ -552,7 +552,7 @@ Bug Fixes
|
|||
* Fix build issue when using non-GNU strings utility. (Bug #88639)
|
||||
|
||||
* Fix build of cairo modules as regular modules, not as versioned shared
|
||||
libaries. (Bug #29319)
|
||||
libraries. (Bug #29319)
|
||||
|
||||
* Fix build on win32 using gcc 5.4.
|
||||
|
||||
|
|
@ -1275,7 +1275,7 @@ reduction in rendering latency by reducing the number of copies
|
|||
required to upload image data - given hardware and driver support,
|
||||
cairo-xlib can now perform zero copy uploads onto the GPU. And as usual
|
||||
Adrian Johnson has been very busy fixing many different corner cases in
|
||||
cairo-pdf, impoving opacity groups and font subsetting. Last, but not
|
||||
cairo-pdf, improving opacity groups and font subsetting. Last, but not
|
||||
least, for cairo-image Søren Sandmann Pedersen added support for
|
||||
rendering glyphs to pixman and using that from within cairo. The new
|
||||
glyph rendering facility reduces the overhead for setting up the
|
||||
|
|
@ -1290,7 +1290,7 @@ Bug fixes
|
|||
---------
|
||||
|
||||
Interior boxes were being dropped when amalgamating regions during
|
||||
tesselation.
|
||||
tessellation.
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=49446
|
||||
|
||||
Allow building without gtk-doc installed
|
||||
|
|
@ -1310,7 +1310,7 @@ Bug fixes
|
|||
Upload the whole source for a repeating pattern.
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=51910
|
||||
|
||||
Fix damage tracking to handle continuation chunks corectly and so
|
||||
Fix damage tracking to handle continuation chunks correctly and so
|
||||
prevent crashes on win32.
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=53384
|
||||
|
||||
|
|
@ -1375,7 +1375,7 @@ Bug fixes
|
|||
Release 1.12.0 (2012-03-23 Chris Wilson <chris@chris-wilson.co.uk>)
|
||||
===================================================================
|
||||
It's taken over 18 months, but the wait is finally over. A new cairo release!
|
||||
We are pleased to annouce a new stable release of Cairo that brings many
|
||||
We are pleased to announce a new stable release of Cairo that brings many
|
||||
new features and performance improvements, all whilst maintaining
|
||||
compatibility with cairo-1.0 and all releases since. We recommend anyone
|
||||
using a previous release of Cairo to upgrade to 1.12.0.
|
||||
|
|
@ -2105,7 +2105,7 @@ Long standing bugs fixed:
|
|||
tessellator has been overhauled and tune, which handles the fallback
|
||||
for when we are unable to use the new span rasteriser on the stroke
|
||||
(e.g. when using the current RENDER protocol). The large number of
|
||||
pixel artefacts that implementing self-intersection elimination
|
||||
pixel artifacts that implementing self-intersection elimination
|
||||
removes is ample justification for the potential performance
|
||||
regression. If you unfortunately do suffer a substantial performance
|
||||
regression in your application, please consider obtaining a
|
||||
|
|
@ -5789,7 +5789,7 @@ Release 1.2.6 (2006-11-02 Behdad Esfahbod <behdad@behdad.org>)
|
|||
This is the third bug fix release in the 1.2 series, coming less than
|
||||
two months after the 1.2.4 release made on August 18.
|
||||
|
||||
The 1.2.4 release turned out to be a pretty solid one, except for a crasher
|
||||
The 1.2.4 release turned out to be a pretty solid one, except for a crash
|
||||
bug when forwarding an X connection where the client and the server have
|
||||
varying byte orders, eg. from a PPC to an i686. Other than that, various
|
||||
other small bugs have been fixed.
|
||||
|
|
@ -6099,7 +6099,7 @@ And at least the following bugs have been fixed:
|
|||
* Do device offset before float->fixed conversion
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=332266
|
||||
* PS: Fix source surfaces with transformations
|
||||
* PS: Fix to not draw BUTT-capped degnerate sub-paths
|
||||
* PS: Fix to not draw BUTT-capped degenerate sub-paths
|
||||
* PS: Don't walk off end of array when printing "~>"
|
||||
* Fix some memory leaks in the test suite rig
|
||||
* SVG: Fix memory leak when using cairo_mask
|
||||
|
|
@ -6692,7 +6692,7 @@ Bug fixes
|
|||
|
||||
* Negative dash offsets have been fixed to work correctly.
|
||||
|
||||
* The stroking of paths with mutiple subpaths has now been fixed to
|
||||
* The stroking of paths with multiple subpaths has now been fixed to
|
||||
apply caps to all subpaths rather than just the last one.
|
||||
|
||||
* Many build fixes for better portability on various systems.
|
||||
|
|
|
|||
20
RELEASING
20
RELEASING
|
|
@ -161,7 +161,13 @@ Here are the steps to follow to create a new cairo release:
|
|||
If for some reason you lost this message, "make release-publish-message"
|
||||
prints it for you.
|
||||
|
||||
Upload the incremental ChangeLog generated by the above:
|
||||
Upload the incremental ChangeLog generated by the above. For
|
||||
minor stable releases, this is:
|
||||
|
||||
scp ChangeLog \
|
||||
cairographics.org:/srv/cairo.freedesktop.org/www/releases/ChangeLog.cairo-${THIS_RELEASE}
|
||||
|
||||
for micro and snapshot releases, the command is:
|
||||
|
||||
scp ChangeLog.cache-${LAST_RELEASE}.. \
|
||||
cairographics.org:/srv/cairo.freedesktop.org/www/releases/ChangeLog.cairo-${THIS_RELEASE}
|
||||
|
|
@ -193,13 +199,7 @@ Here are the steps to follow to create a new cairo release:
|
|||
|
||||
git commit cairo-version.h -m "Bump version for ${DEVEL_VERSION}"
|
||||
|
||||
10) Edit the cairo bugzilla product and add the new version numbers.
|
||||
|
||||
Note that you need to add two versions. One for the
|
||||
release/snapshot (with an even micro version), another with the
|
||||
post-release version (with an odd micro version).
|
||||
|
||||
11) Send out an announcement message.
|
||||
10) Send out an announcement message.
|
||||
|
||||
Send a message to cairo-announce@cairographics.org and CC
|
||||
cairo@cairographics.org, gnome-announce-list@gnome.org and
|
||||
|
|
@ -210,8 +210,6 @@ Here are the steps to follow to create a new cairo release:
|
|||
|
||||
git shortlog ${LAST_RELEASE}...
|
||||
|
||||
12) Add the announcement to the website as a new entry in the news/
|
||||
11) Add the announcement to the website as a new entry in the news/
|
||||
dir. It will automatically get indexed onto the homepage when the
|
||||
site refreshes.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ create_printer_dc (win32_target_closure_t *ptc)
|
|||
|
||||
/* The printer device units on win32 are 1 unit == 1 dot and the
|
||||
* origin is the start of the printable area. We transform the
|
||||
* cordinate space to 1 unit is 1 point as expected by the
|
||||
* coordinate space to 1 unit is 1 point as expected by the
|
||||
* tests. As the page size is larger than the test surface, the
|
||||
* origin is translated down so that the each test is drawn at the
|
||||
* bottom left corner of the page. This is because the bottom left
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# float word ordering can be different from the byte ordering. In a
|
||||
# multi-word float context, "big-endian" implies that the word containing
|
||||
# the sign bit is found in the memory location with the lowest address.
|
||||
# This implemenation was inspired by the AC_C_BIGENDIAN macro in autoconf.
|
||||
# This implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
|
||||
# -------------------------------------------------------------------------
|
||||
AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
|
||||
[AC_CACHE_CHECK(whether float word ordering is bigendian,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ MAYBE_C_SPECIFIC_WARN="-Wold-style-definition \
|
|||
|
||||
# New -Wno options should be added here
|
||||
# gcc-4.4 and later accept every -Wno- option but may complain later that this
|
||||
# option is unknow each time another warning happen.
|
||||
# option is unknown each time another warning happens.
|
||||
# -Wunused-but-set-variable is too noisy at present
|
||||
NO_WARN="unused-but-set-variable"
|
||||
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ usage (const char *argv0)
|
|||
" -i iterations; specify the number of iterations per test case\n"
|
||||
" -l list only; just list selected test case names without executing\n"
|
||||
" -r raw; display each time measurement instead of summary statistics\n"
|
||||
" -s sync; only sum the elapsed time of the indiviual operations\n"
|
||||
" -s sync; only sum the elapsed time of the individual operations\n"
|
||||
" -t tile size; draw to tiled surfaces\n"
|
||||
" -v verbose; in raw mode also show the summaries\n"
|
||||
" -x exclude; specify a file to read a list of traces to exclude\n"
|
||||
|
|
|
|||
|
|
@ -777,8 +777,8 @@ _cairo_analysis_surface_tag (void *abstract_surface,
|
|||
ctm,
|
||||
ctm_inverse,
|
||||
clip);
|
||||
if (_cairo_int_status_is_error (backend_status))
|
||||
return backend_status;
|
||||
if (backend_status == CAIRO_INT_STATUS_SUCCESS)
|
||||
surface->has_supported = TRUE;
|
||||
}
|
||||
|
||||
return backend_status;
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ _cairo_array_append_multiple (cairo_array_t *array,
|
|||
*
|
||||
* Allocate space at the end of the array for @num_elements additional
|
||||
* elements, providing the address of the new memory chunk in
|
||||
* @elements. This memory will be unitialized, but will be accounted
|
||||
* @elements. This memory will be uninitialized, but will be accounted
|
||||
* for in the return value of _cairo_array_num_elements().
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS if successful or
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ typedef struct _cairo_cogl_path_fill_meta {
|
|||
/* A cached path tessellation should be re-usable with different rotations
|
||||
* and translations but not for different scales.
|
||||
*
|
||||
* one idea is to track the diagonal lenghts of a unit rectangle
|
||||
* one idea is to track the diagonal lengths of a unit rectangle
|
||||
* transformed through the original ctm use to tessellate the geometry
|
||||
* so we can check what the lengths are for any new ctm to know if
|
||||
* this geometry is compatible.
|
||||
|
|
@ -166,7 +166,7 @@ typedef struct _cairo_cogl_path_stroke_meta {
|
|||
/* A cached path tessellation should be re-usable with different rotations
|
||||
* and translations but not for different scales.
|
||||
*
|
||||
* one idea is to track the diagonal lenghts of a unit rectangle
|
||||
* one idea is to track the diagonal lengths of a unit rectangle
|
||||
* transformed through the original ctm use to tessellate the geometry
|
||||
* so we can check what the lengths are for any new ctm to know if
|
||||
* this geometry is compatible.
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ _cairo_default_context_get_tolerance (void *abstract_cr)
|
|||
}
|
||||
|
||||
|
||||
/* Current tranformation matrix */
|
||||
/* Current transformation matrix */
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_default_context_translate (void *abstract_cr,
|
||||
|
|
|
|||
|
|
@ -976,10 +976,12 @@ _compute_xrender_bitmap_size(FT_Bitmap *target,
|
|||
pitch = width * 4;
|
||||
break;
|
||||
|
||||
#ifdef FT_PIXEL_MODE_BGRA
|
||||
case FT_PIXEL_MODE_BGRA:
|
||||
/* each pixel is replicated into a 32-bit ARGB value */
|
||||
pitch = width * 4;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default: /* unsupported source format */
|
||||
return -1;
|
||||
|
|
@ -1177,10 +1179,12 @@ _fill_xrender_bitmap(FT_Bitmap *target,
|
|||
}
|
||||
break;
|
||||
|
||||
#ifdef FT_PIXEL_MODE_BGRA
|
||||
case FT_PIXEL_MODE_BGRA:
|
||||
for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch)
|
||||
memcpy (dstLine, srcLine, width * 4);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
assert (0);
|
||||
|
|
@ -1289,6 +1293,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
|
|||
component_alpha = TRUE;
|
||||
}
|
||||
break;
|
||||
#ifdef FT_PIXEL_MODE_BGRA
|
||||
case FT_PIXEL_MODE_BGRA:
|
||||
stride = width * 4;
|
||||
if (own_buffer) {
|
||||
|
|
@ -1311,6 +1316,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap,
|
|||
}
|
||||
format = CAIRO_FORMAT_ARGB32;
|
||||
break;
|
||||
#endif
|
||||
case FT_PIXEL_MODE_GRAY2:
|
||||
case FT_PIXEL_MODE_GRAY4:
|
||||
convert:
|
||||
|
|
@ -2393,7 +2399,11 @@ skip:
|
|||
done:
|
||||
free (coords);
|
||||
free (current_coords);
|
||||
#if HAVE_FT_DONE_MM_VAR
|
||||
FT_Done_MM_Var (face->glyph->library, ft_mm_var);
|
||||
#else
|
||||
free (ft_mm_var);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2487,7 +2497,9 @@ _cairo_ft_scaled_glyph_init (void *abstract_font,
|
|||
vertical_layout = TRUE;
|
||||
}
|
||||
|
||||
#ifdef FT_LOAD_COLOR
|
||||
load_flags |= FT_LOAD_COLOR;
|
||||
#endif
|
||||
|
||||
|
||||
if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
|
||||
|
|
@ -2656,7 +2668,9 @@ LOAD:
|
|||
*/
|
||||
scaled_glyph_loaded = FALSE;
|
||||
info &= ~CAIRO_SCALED_GLYPH_INFO_METRICS;
|
||||
#ifdef FT_LOAD_COLOR
|
||||
load_flags &= ~FT_LOAD_COLOR;
|
||||
#endif
|
||||
goto LOAD;
|
||||
}
|
||||
|
||||
|
|
@ -2881,7 +2895,7 @@ _cairo_index_to_glyph_name (void *abstract_font,
|
|||
cairo_ft_scaled_font_t *scaled_font = abstract_font;
|
||||
cairo_ft_unscaled_font_t *unscaled = scaled_font->unscaled;
|
||||
FT_Face face;
|
||||
char buffer[256]; /* PLRM spcifies max name length of 127 */
|
||||
char buffer[256]; /* PLRM specifies max name length of 127 */
|
||||
FT_Error error;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
|
|
@ -606,7 +606,7 @@ _cairo_gl_ensure_stencil (cairo_gl_context_t *ctx,
|
|||
* glLoadIdentity()
|
||||
* gluOrtho2D()
|
||||
*
|
||||
* The calculation for the ortho tranformation was taken from the
|
||||
* The calculation for the ortho transformation was taken from the
|
||||
* mesa source code.
|
||||
*/
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,7 @@ _cairo_gl_surface_map_to_image (void *abstract_surface,
|
|||
return _cairo_image_surface_create_in_error (status);
|
||||
}
|
||||
|
||||
/* We must invert the image manualy if we lack GL_MESA_pack_invert */
|
||||
/* We must invert the image manually if we lack GL_MESA_pack_invert */
|
||||
if (flipped && ! mesa_invert) {
|
||||
uint8_t stack[1024], *row = stack;
|
||||
uint8_t *top = image->data;
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ _cairo_hash_table_create (cairo_hash_keys_equal_func_t keys_equal)
|
|||
* _cairo_hash_table_destroy is called. It is a fatal error otherwise,
|
||||
* and this function will halt. The rationale for this behavior is to
|
||||
* avoid memory leaks and to avoid needless complication of the API
|
||||
* with destroy notifiy callbacks.
|
||||
* with destroy notify callbacks.
|
||||
*
|
||||
* WARNING: The hash_table must have no running iterators in it when
|
||||
* _cairo_hash_table_destroy is called. It is a fatal error otherwise,
|
||||
|
|
|
|||
|
|
@ -959,7 +959,7 @@ _cairo_fopen (const char *filename, const char *mode, FILE **file_out)
|
|||
/* tmpfile() replacement for Windows.
|
||||
*
|
||||
* On Windows tmpfile() creates the file in the root directory. This
|
||||
* may fail due to unsufficient privileges. However, this isn't a
|
||||
* may fail due to insufficient privileges. However, this isn't a
|
||||
* problem on Windows CE so we don't use it there.
|
||||
*/
|
||||
FILE *
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ struct _cairo_paginated_surface_backend {
|
|||
(*supports_fine_grained_fallbacks) (void *surface);
|
||||
|
||||
/* Optional. Indicates whether the page requires a thumbnail image to be
|
||||
* supplied. If a thumbnail is required, set width, heigh to size required
|
||||
* supplied. If a thumbnail is required, set width, height to size required
|
||||
* and return TRUE.
|
||||
*/
|
||||
cairo_bool_t
|
||||
|
|
|
|||
|
|
@ -780,7 +780,7 @@ static const cairo_surface_backend_t cairo_paginated_surface_backend = {
|
|||
_cairo_paginated_context_create,
|
||||
|
||||
_cairo_paginated_surface_create_similar,
|
||||
NULL, /* create simlar image */
|
||||
NULL, /* create similar image */
|
||||
NULL, /* map to image */
|
||||
NULL, /* unmap image */
|
||||
|
||||
|
|
|
|||
|
|
@ -2331,7 +2331,7 @@ _cairo_radial_pattern_box_to_parameter (const cairo_radial_pattern_t *radial,
|
|||
maxx = x1 + DBL_EPSILON;
|
||||
maxy = y1 + DBL_EPSILON;
|
||||
|
||||
/* we dont' allow negative radiuses, so we will be checking that
|
||||
/* we don't allow negative radiuses, so we will be checking that
|
||||
* t*dr >= mindr to consider t valid */
|
||||
mindr = -(cr + DBL_EPSILON);
|
||||
|
||||
|
|
@ -3022,8 +3022,8 @@ _cairo_pattern_alpha_range (const cairo_pattern_t *pattern,
|
|||
*
|
||||
* This function cannot be used while the mesh is being constructed.
|
||||
*
|
||||
* The function returns TRUE and sets the output parametes to define
|
||||
* the coodrinate range if the mesh pattern contains at least one
|
||||
* The function returns TRUE and sets the output parameters to define
|
||||
* the coordinate range if the mesh pattern contains at least one
|
||||
* patch, otherwise it returns FALSE.
|
||||
**/
|
||||
cairo_bool_t
|
||||
|
|
@ -4760,7 +4760,7 @@ _cairo_debug_print_pattern (FILE *file, const cairo_pattern_t *pattern)
|
|||
case CAIRO_FILTER_BEST: s = "best"; break;
|
||||
case CAIRO_FILTER_NEAREST: s = "nearest"; break;
|
||||
case CAIRO_FILTER_BILINEAR: s = "bilinear"; break;
|
||||
case CAIRO_FILTER_GAUSSIAN: s = "guassian"; break;
|
||||
case CAIRO_FILTER_GAUSSIAN: s = "gaussian"; break;
|
||||
default: s = "invalid"; ASSERT_NOT_REACHED; break;
|
||||
}
|
||||
fprintf (file, " filter: %s\n", s);
|
||||
|
|
|
|||
|
|
@ -798,7 +798,7 @@ _cairo_pdf_operators_emit_stroke (cairo_pdf_operators_t *pdf_operators,
|
|||
}
|
||||
|
||||
/* The PDF CTM is transformed to the user space CTM when stroking
|
||||
* so the corect pen shape will be used. This also requires that
|
||||
* so the correct pen shape will be used. This also requires that
|
||||
* the path be transformed to user space when emitted. The
|
||||
* conversion of path coordinates to user space may cause rounding
|
||||
* errors. For example the device space point (1.234, 3.142) when
|
||||
|
|
@ -1326,7 +1326,7 @@ _cairo_pdf_operators_emit_glyph (cairo_pdf_operators_t *pdf_operator
|
|||
* current position to the next glyph. We also use the Td
|
||||
* operator to move the current position if the horizontal
|
||||
* position changes by more than 10 (in text space
|
||||
* units). This is becauses the horizontal glyph positioning
|
||||
* units). This is because the horizontal glyph positioning
|
||||
* in the TJ operator is intended for kerning and there may be
|
||||
* PDF consumers that do not handle very large position
|
||||
* adjustments in TJ.
|
||||
|
|
|
|||
|
|
@ -7711,6 +7711,11 @@ _cairo_pdf_surface_mask (void *abstract_surface,
|
|||
* and most common, case to handle. */
|
||||
if (_cairo_pattern_is_constant_alpha (mask, &extents.bounded, &alpha) &&
|
||||
_can_paint_pattern (source)) {
|
||||
|
||||
status = _cairo_pdf_operators_flush (&surface->pdf_operators);
|
||||
if (unlikely (status))
|
||||
goto cleanup;
|
||||
|
||||
_cairo_output_stream_printf (surface->output, "q\n");
|
||||
status = _cairo_pdf_surface_paint_pattern (surface,
|
||||
op,
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ typedef struct _cairo_ps_form {
|
|||
cairo_bool_t is_image;
|
||||
int id;
|
||||
cairo_surface_t *src_surface;
|
||||
cairo_rectangle_int_t src_surface_extents;
|
||||
cairo_bool_t src_surface_bounded;
|
||||
cairo_filter_t filter;
|
||||
|
||||
/* Union of source extents required for all operations using this form */
|
||||
|
|
|
|||
|
|
@ -3481,7 +3481,7 @@ _cairo_ps_surface_emit_solid_pattern (cairo_ps_surface_t *surface,
|
|||
* @source: [in] the source for the form
|
||||
* @params: [in] source parameters
|
||||
* @test: [in] if TRUE, test if form will be used (excludes size check)
|
||||
* @ps_form [out] the new or exisiting entry int the hash table.
|
||||
* @ps_form [out] the new or existing entry int the hash table.
|
||||
* image or recording.
|
||||
*/
|
||||
static cairo_int_status_t
|
||||
|
|
@ -3548,6 +3548,8 @@ _cairo_ps_surface_use_form (cairo_ps_surface_t *surface,
|
|||
source_entry->unique_id = unique_id;
|
||||
source_entry->id = surface->num_forms++;
|
||||
source_entry->src_surface = cairo_surface_reference (params->src_surface);
|
||||
source_entry->src_surface_extents = *params->src_surface_extents;
|
||||
source_entry->src_surface_bounded = params->src_surface_bounded;
|
||||
source_entry->required_extents = *params->src_op_extents;
|
||||
source_entry->filter = params->filter;
|
||||
source_entry->is_image = params->is_image;
|
||||
|
|
@ -3726,11 +3728,14 @@ _cairo_ps_form_emit (void *entry, void *closure)
|
|||
|
||||
params.src_surface = form->src_surface;
|
||||
params.op = CAIRO_OPERATOR_OVER;
|
||||
params.src_surface_extents = &form->src_surface_extents;
|
||||
params.src_surface_bounded = form->src_surface_bounded;
|
||||
params.src_op_extents = &form->required_extents;
|
||||
params.filter = form->filter;
|
||||
params.stencil_mask = FALSE;
|
||||
params.is_image = form->is_image;
|
||||
params.approx_size = 0;
|
||||
params.eod_count = 0;
|
||||
|
||||
_cairo_output_stream_printf (surface->final_stream,
|
||||
"%%%%BeginResource: form cairoform-%d\n",
|
||||
|
|
|
|||
|
|
@ -625,19 +625,14 @@ _cairo_sub_font_map_glyph (cairo_sub_font_t *sub_font,
|
|||
}
|
||||
|
||||
/* If glyph is in the winansi encoding and font is not a user
|
||||
* font, put glyph in the latin subset. If glyph is .notdef
|
||||
* the latin subset is preferred but only if the latin subset
|
||||
* already contains at least one glyph. We don't want to
|
||||
* create a separate subset just for the .notdef glyph.
|
||||
*/
|
||||
* font, put glyph in the latin subset. */
|
||||
is_latin = FALSE;
|
||||
latin_character = -1;
|
||||
if (sub_font->use_latin_subset &&
|
||||
(! _cairo_font_face_is_user (sub_font->scaled_font->font_face)))
|
||||
{
|
||||
latin_character = _cairo_unicode_to_winansi (font_unicode);
|
||||
if (latin_character > 0 ||
|
||||
(latin_character == 0 && sub_font->num_glyphs_in_latin_subset > 0))
|
||||
if (latin_character > 0)
|
||||
{
|
||||
if (!sub_font->latin_char_map[latin_character]) {
|
||||
sub_font->latin_char_map[latin_character] = TRUE;
|
||||
|
|
|
|||
|
|
@ -3805,7 +3805,7 @@ cairo_script_create_for_stream (cairo_write_func_t write_func,
|
|||
* cairo_script_write_comment:
|
||||
* @script: the script (output device)
|
||||
* @comment: the string to emit
|
||||
* @len:the length of the sting to write, or -1 to use strlen()
|
||||
* @len:the length of the string to write, or -1 to use strlen()
|
||||
*
|
||||
* Emit a string verbatim into the script.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2952,6 +2952,7 @@ _cairo_surface_tag (cairo_surface_t *surface,
|
|||
status = surface->backend->tag (surface, begin, tag_name, attributes,
|
||||
source, stroke_style,
|
||||
ctm, ctm_inverse, clip);
|
||||
surface->is_clear = FALSE;
|
||||
|
||||
return _cairo_surface_set_error (surface, status);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ static attribute_spec_t _ccitt_params_spec[] =
|
|||
* lly - lower left y xoordinate
|
||||
* urx - upper right x xoordinate
|
||||
* ury - upper right y xoordinate
|
||||
* all cordinates are in PostScript coordinates.
|
||||
* all coordinates are in PostScript coordinates.
|
||||
*/
|
||||
static attribute_spec_t _eps_params_spec[] =
|
||||
{
|
||||
|
|
@ -217,9 +217,28 @@ static const char *
|
|||
parse_float (const char *p, double *d)
|
||||
{
|
||||
int n;
|
||||
const char *start = p;
|
||||
cairo_bool_t has_decimal_point = FALSE;
|
||||
|
||||
if (sscanf(p, "%lf%n", d, &n) > 0)
|
||||
return p + n;
|
||||
while (*p) {
|
||||
if (*p == '.' || *p == ']' || _cairo_isspace (*p))
|
||||
break;
|
||||
p++;
|
||||
}
|
||||
|
||||
if (*p == '.')
|
||||
has_decimal_point = TRUE;
|
||||
|
||||
if (has_decimal_point) {
|
||||
char *end;
|
||||
*d = _cairo_strtod (start, &end);
|
||||
if (end)
|
||||
return end;
|
||||
|
||||
} else {
|
||||
if (sscanf(start, "%lf%n", d, &n) > 0)
|
||||
return start + n;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ static void
|
|||
_cairo_toy_font_face_fini (cairo_toy_font_face_t *font_face)
|
||||
{
|
||||
/* We assert here that we own font_face->family before casting
|
||||
* away the const qualifer. */
|
||||
* away the const qualifier. */
|
||||
assert (font_face->owns_family);
|
||||
free ((char*) font_face->family);
|
||||
|
||||
|
|
@ -420,7 +420,7 @@ _cairo_font_face_is_toy (cairo_font_face_t *font_face)
|
|||
* cairo_toy_font_face_get_family:
|
||||
* @font_face: A toy font face
|
||||
*
|
||||
* Gets the familly name of a toy font.
|
||||
* Gets the family name of a toy font.
|
||||
*
|
||||
* Return value: The family name. This string is owned by the font face
|
||||
* and remains valid as long as the font face is alive (referenced).
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ _cairo_traps_tessellate_convex_quad (cairo_traps_t *traps,
|
|||
* cases to tessellate.
|
||||
*
|
||||
* First, we have to determine the Y-axis sort of the four
|
||||
* vertices, (either abcd or abdc). After that we need to detemine
|
||||
* vertices, (either abcd or abdc). After that we need to determine
|
||||
* which edges will be "left" and which will be "right" in the
|
||||
* resulting trapezoids. This can be determined by computing a
|
||||
* slope comparison of ab and ad to determine if b is left of d or
|
||||
|
|
|
|||
|
|
@ -388,6 +388,11 @@ cairo_type1_font_subset_get_bbox (cairo_type1_font_subset_t *font)
|
|||
/* Freetype uses 1/yy to get units per EM */
|
||||
font->base.units_per_em = 1.0/yy;
|
||||
|
||||
/* If the FontMatrix is not a uniform scale the metrics we extract
|
||||
* from the font won't match what FreeType returns */
|
||||
if (xx != yy || yx != 0.0 || xy != 0.0)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
font->base.x_min = x_min / font->base.units_per_em;
|
||||
font->base.y_min = y_min / font->base.units_per_em;
|
||||
font->base.x_max = x_max / font->base.units_per_em;
|
||||
|
|
|
|||
33
src/cairo.c
33
src/cairo.c
|
|
@ -144,35 +144,34 @@
|
|||
*
|
||||
* An example of creating a link with user specified clickable region:
|
||||
* <informalexample><programlisting>
|
||||
* cairo_font_extents_t font_extents;
|
||||
* struct text {
|
||||
* const char *s;
|
||||
* double x, y;
|
||||
* };
|
||||
* const struct text text1 = { "This link is split", 450, 70 };
|
||||
* const struct text text2 = { "across two lines", 50, 70 };
|
||||
* cairo_text_extents_t text1_extents;
|
||||
* cairo_text_extents_t text2_extents;
|
||||
* char attribs[100];
|
||||
* const char *text1 = "This link is split";
|
||||
* const char *text2 = "across two lines";
|
||||
*
|
||||
* cairo_font_extents (cr, &font_extents);
|
||||
* cairo_move_to (cr, 450, 50);
|
||||
* cairo_text_extents (cr, text1, &text1_extents);
|
||||
* cairo_move_to (cr, 50, 70);
|
||||
* cairo_text_extents (cr, text2, &text2_extents);
|
||||
* cairo_text_extents (cr, text1.s, &text1_extents);
|
||||
* cairo_text_extents (cr, text2.s, &text2_extents);
|
||||
* sprintf (attribs,
|
||||
* "rect=[%f %f %f %f %f %f %f %f] uri='https://cairographics.org'",
|
||||
* text1_extents.x_bearing,
|
||||
* text1_extents.y_bearing,
|
||||
* text1_extents.x_bearing + text1.x,
|
||||
* text1_extents.y_bearing + text1.y,
|
||||
* text1_extents.width,
|
||||
* text1_extents.height,
|
||||
* text2_extents.x_bearing,
|
||||
* text2_extents.y_bearing,
|
||||
* text2_extents.x_bearing + text2.x,
|
||||
* text2_extents.y_bearing + text2.y,
|
||||
* text2_extents.width,
|
||||
* text2_extents.height);
|
||||
*
|
||||
* cairo_tag_begin (cr, CAIRO_TAG_LINK, attribs);
|
||||
* cairo_show_text (cr, "This is a link to the cairo website");
|
||||
* cairo_move_to (cr, 450, 50);
|
||||
* cairo_show_text (cr, text1);
|
||||
* cairo_move_to (cr, 50, 70);
|
||||
* cairo_show_text (cr, text2);
|
||||
* cairo_move_to (cr, text1.x, text1.y);
|
||||
* cairo_show_text (cr, text1.s);
|
||||
* cairo_move_to (cr, text2.x, text2.y);
|
||||
* cairo_show_text (cr, text2.s);
|
||||
* cairo_tag_end (cr, CAIRO_TAG_LINK);
|
||||
* </programlisting></informalexample>
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1522,7 +1522,7 @@ _cairo_surface_release_device_reference (cairo_surface_t *surface);
|
|||
* visuals. This time we invented #cairo_internal_format_t instead,
|
||||
* (see it for more discussion).
|
||||
*
|
||||
* The punchline is that %CAIRO_FORMAT_VALID must not conside any
|
||||
* The punchline is that %CAIRO_FORMAT_VALID must not consider any
|
||||
* internal format to be valid. Also we need to decide if the
|
||||
* RGB16_565 should be moved to instead be an internal format. If so,
|
||||
* this macro need not change for it. (We probably will need to leave
|
||||
|
|
|
|||
|
|
@ -2041,7 +2041,7 @@ _cairo_win32_printing_surface_start_page (void *abstract_surface)
|
|||
* coordinates.
|
||||
*
|
||||
* If the device context is an EMF file, using an identity
|
||||
* transform often provides insufficent resolution. The workaround
|
||||
* transform often provides insufficient resolution. The workaround
|
||||
* is to set the GDI CTM to a scale < 1 eg [1.0/16 0 0 1/0/16 0 0]
|
||||
* and scale the cairo CTM by [16 0 0 16 0 0]. The
|
||||
* SetWorldTransform function call to scale the GDI CTM by 1.0/16
|
||||
|
|
|
|||
|
|
@ -295,13 +295,12 @@ EXTRA_PROGRAMS += $(TESTS)
|
|||
TARGETS = $(CAIRO_TEST_TARGET)
|
||||
TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE)
|
||||
FORMAT = $(CAIRO_TEST_TARGET_FORMAT)
|
||||
NUM_THREADS = $(CAIRO_TEST_NUM_THREADS)
|
||||
MODE = $(CAIRO_TEST_MODE)
|
||||
|
||||
# Same about ENV vs CAIRO_TEST_ENV. ENV is used with "make run" only
|
||||
ENV = $(CAIRO_TEST_ENV)
|
||||
|
||||
TESTS_ENVIRONMENT = CAIRO_TEST_MODE="$(MODE)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_FORMAT="$(FORMAT)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" CAIRO_TEST_NUM_THREADS="$(NUM_THREADS)" $(ENV)
|
||||
TESTS_ENVIRONMENT = CAIRO_TEST_MODE="$(MODE)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_FORMAT="$(FORMAT)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)" $(ENV)
|
||||
|
||||
EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
|
||||
VALGRIND_FLAGS = \
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@ _rsvg_render_page (const char *filename,
|
|||
if (handle == NULL)
|
||||
return error->message; /* XXX g_error_free */
|
||||
|
||||
rsvg_handle_set_dpi (handle, 72.0);
|
||||
rsvg_handle_get_dimensions (handle, &dimensions);
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
dimensions.width,
|
||||
|
|
@ -873,10 +874,6 @@ main (int argc, char **argv)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if CAIRO_CAN_TEST_SVG_SURFACE
|
||||
rsvg_set_default_dpi (72.0);
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined (__CYGWIN__)
|
||||
_setmode (1, _O_BINARY);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1470,7 +1470,7 @@ UNWIND_STRINGS:
|
|||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
/* Used to catch crashes in a test, so that we report it as such and
|
||||
* continue testing, although one crasher may already have corrupted memory in
|
||||
* continue testing, although one crash may already have corrupted memory in
|
||||
* an nonrecoverable fashion. */
|
||||
static jmp_buf jmpbuf;
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ preamble (cairo_test_context_t *ctx)
|
|||
return cairo_test_status_from_status (ctx, status);
|
||||
}
|
||||
|
||||
/* And test the degnerate case */
|
||||
/* And test the degenerate case */
|
||||
CAIRO_CREATE ();
|
||||
path.num_data = 0;
|
||||
cairo_append_path (cr, &path);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,6 @@ draw (cairo_t *cr, int width, int height)
|
|||
CAIRO_TEST (degenerate_dash,
|
||||
"Tests the behaviour of dashed segments that end on a off-on transition",
|
||||
"dash, degenerate", /* keywords */
|
||||
NULL, /* requirementts */
|
||||
NULL, /* requirements */
|
||||
210 + 2*PAD, 210 + 2*PAD,
|
||||
NULL, draw)
|
||||
|
|
|
|||
|
|
@ -137,19 +137,19 @@ fill (cairo_t *cr, int width, int height)
|
|||
}
|
||||
|
||||
CAIRO_TEST (map_all_to_image,
|
||||
"Test maping a surface to an image and modifying it externally",
|
||||
"Test mapping a surface to an image and modifying it externally",
|
||||
"image", /* keywords */
|
||||
"target=raster", /* requirements */
|
||||
WIDTH, HEIGHT,
|
||||
NULL, all)
|
||||
CAIRO_TEST (map_bit_to_image,
|
||||
"Test maping a surface to an image and modifying it externally",
|
||||
"Test mapping a surface to an image and modifying it externally",
|
||||
"image", /* keywords */
|
||||
"target=raster", /* requirements */
|
||||
WIDTH, HEIGHT,
|
||||
NULL, bit)
|
||||
CAIRO_TEST (map_to_image_fill,
|
||||
"Test maping a surface to an image and modifying it externally",
|
||||
"Test mapping a surface to an image and modifying it externally",
|
||||
"image", /* keywords */
|
||||
"target=raster", /* requirements */
|
||||
WIDTH, HEIGHT,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ draw (cairo_t *cr, int width, int height)
|
|||
!CAIRO_TEST_DOUBLE_EQUALS(g,0.3) ||
|
||||
!CAIRO_TEST_DOUBLE_EQUALS(b,0.4) ||
|
||||
!CAIRO_TEST_DOUBLE_EQUALS(a,0.5)) {
|
||||
cairo_test_log (ctx, "Error: cairo_pattern_get_rgba returned unexepcted results: %g, %g, %g, %g\n",
|
||||
cairo_test_log (ctx, "Error: cairo_pattern_get_rgba returned unexpected results: %g, %g, %g, %g\n",
|
||||
r, g, b, a);
|
||||
cairo_pattern_destroy (pat);
|
||||
return CAIRO_TEST_FAILURE;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Comapre Args
|
||||
Compare Args
|
||||
Copyright (C) 2006 Yangli Hector Yee
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
Comapre Args
|
||||
Compare Args
|
||||
Copyright (C) 2006 Yangli Hector Yee
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ test_clip (cairo_t *cr, double width, double height)
|
|||
cairo_stroke (cr2);
|
||||
|
||||
/* Using the first context, draw another black vertical line.
|
||||
* This line should be clipped agaist the bezier clipping path set
|
||||
* This line should be clipped against the bezier clipping path set
|
||||
* earlier. */
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
cairo_move_to (cr, 400, 0);
|
||||
|
|
|
|||
|
|
@ -52,12 +52,11 @@ int main (int argc, char *argv[])
|
|||
|
||||
error = NULL;
|
||||
|
||||
rsvg_set_default_dpi (72.0);
|
||||
|
||||
handle = rsvg_handle_new_from_file (filename, &error);
|
||||
if (!handle)
|
||||
FAIL (error->message);
|
||||
|
||||
rsvg_handle_set_dpi (handle, 72.0);
|
||||
rsvg_handle_get_dimensions (handle, &dimensions);
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
*
|
||||
* 2004-11-04 Carl Worth <cworth@cworth.org>
|
||||
*
|
||||
* I trimmed down Ned's example to the folllowing test while still
|
||||
* I trimmed down Ned's example to the following test while still
|
||||
* maintaining the assertion.
|
||||
*
|
||||
* Oh, actually, it looks like I may have triggered something
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ set -e
|
|||
|
||||
if [ $# -lt 1 ]; then
|
||||
argv0=`basename $0`
|
||||
echo "$argv0: Update source code to the lastest Cairo API" >&2
|
||||
echo "$argv0: Update source code to the latest Cairo API" >&2
|
||||
echo "" >&2
|
||||
echo "Usage: $argv0 file [...]" >&2
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ _csi_hash_table_init (csi_hash_table_t *hash_table,
|
|||
* _csi_hash_table_destroy is called. It is a fatal error otherwise,
|
||||
* and this function will halt. The rationale for this behavior is to
|
||||
* avoid memory leaks and to avoid needless complication of the API
|
||||
* with destroy notifiy callbacks.
|
||||
* with destroy notify callbacks.
|
||||
*
|
||||
* WARNING: The hash_table must have no running iterators in it when
|
||||
* _csi_hash_table_destroy is called. It is a fatal error otherwise,
|
||||
|
|
|
|||
|
|
@ -1680,24 +1680,6 @@ _emit_image (cairo_surface_t *image,
|
|||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
switch (format) {
|
||||
case CAIRO_FORMAT_A1:
|
||||
for (row = height; row--; ) {
|
||||
_write_data (&stream, data, (width+7)/8);
|
||||
data += stride;
|
||||
}
|
||||
break;
|
||||
case CAIRO_FORMAT_A8:
|
||||
for (row = height; row--; ) {
|
||||
_write_data (&stream, data, width);
|
||||
data += stride;
|
||||
}
|
||||
break;
|
||||
case CAIRO_FORMAT_RGB16_565:
|
||||
for (row = height; row--; ) {
|
||||
_write_data (&stream, data, 2*width);
|
||||
data += stride;
|
||||
}
|
||||
break;
|
||||
case CAIRO_FORMAT_RGB24:
|
||||
for (row = height; row--; ) {
|
||||
int col;
|
||||
|
|
@ -1709,10 +1691,13 @@ _emit_image (cairo_surface_t *image,
|
|||
data += stride;
|
||||
}
|
||||
break;
|
||||
case CAIRO_FORMAT_A1:
|
||||
case CAIRO_FORMAT_A8:
|
||||
case CAIRO_FORMAT_RGB16_565:
|
||||
case CAIRO_FORMAT_RGB30:
|
||||
case CAIRO_FORMAT_ARGB32:
|
||||
for (row = height; row--; ) {
|
||||
_write_data (&stream, data, 4*width);
|
||||
_write_data (&stream, data, len);
|
||||
data += stride;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1777,7 +1762,7 @@ _emit_image (cairo_surface_t *image,
|
|||
int col;
|
||||
for (col = 0; col < width; col++)
|
||||
dst[col] = bswap_32 (src[col]);
|
||||
_write_data (&stream, rowdata, 4*width);
|
||||
_write_data (&stream, rowdata, len);
|
||||
data += stride;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue