[cairo-commit] Branch '1.14' - 18 commits - boilerplate/cairo-boilerplate-glx.c build/configure.ac.warnings cairo-version.h NEWS src/cairo-gl-composite.c src/cairo-gl-operand.c src/cairo-pattern.c src/cairo-recording-surface.c src/cairo-scaled-font-subsets.c src/cairo-script-surface.c src/cairo-surface-observer-private.h src/cairo-win32.h src/cairo-xcb-surface.c src/win32 test/bitmap-font.c test/pdf-mime-data.c
Bryce Harrington
bryce at kemper.freedesktop.org
Wed Oct 28 21:56:26 PDT 2015
NEWS | 88 +++++++++++++++++++++++++++++++
boilerplate/cairo-boilerplate-glx.c | 4 -
build/configure.ac.warnings | 2
cairo-version.h | 2
src/cairo-gl-composite.c | 2
src/cairo-gl-operand.c | 8 ++
src/cairo-pattern.c | 10 +--
src/cairo-recording-surface.c | 2
src/cairo-scaled-font-subsets.c | 6 +-
src/cairo-script-surface.c | 4 -
src/cairo-surface-observer-private.h | 2
src/cairo-win32.h | 4 -
src/cairo-xcb-surface.c | 21 +++----
src/win32/cairo-win32-display-surface.c | 68 +++++------------------
src/win32/cairo-win32-printing-surface.c | 2
test/bitmap-font.c | 4 +
test/pdf-mime-data.c | 2
17 files changed, 143 insertions(+), 88 deletions(-)
New commits:
commit 0317ee7f61f1f4d154f7cb7e56d2b1080c2c644a
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Wed Oct 28 20:15:53 2015 -0700
1.14.4 release
diff --git a/cairo-version.h b/cairo-version.h
index 31168dd..515ea26 100644
--- a/cairo-version.h
+++ b/cairo-version.h
@@ -3,6 +3,6 @@
#define CAIRO_VERSION_MAJOR 1
#define CAIRO_VERSION_MINOR 14
-#define CAIRO_VERSION_MICRO 3
+#define CAIRO_VERSION_MICRO 4
#endif
commit 01fff9f2d1646f27bd6f5cefcd880028330a2f67
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Wed Oct 28 18:02:23 2015 -0700
NEWS: Update for 1.14.4 release
diff --git a/NEWS b/NEWS
index 6511af0..7bfa618 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,91 @@
+Release 1.14.4 (2015-10-28 Bryce Harrington <bryce at osg.samsung.com>)
+========================================================================
+Just in time for Halloween we see another bug-fix release for Cairo.
+This brings a few dozen straightforward bug fixes with no API changes.
+
+In addition, this includes a typical assortment of fixes to tests,
+cleanup of warnings and memory leaks, correction of misspellings,
+updates to documentation, etc.
+
+For a complete log of changes since 1.14.2, please see:
+
+ http://cairographics.org/releases/ChangeLog.1.14.4
+
+
+Features
+--------
+None
+
+API Changes
+-----------
+None
+
+Dependency Changes
+------------------
+None
+
+Performance Optimizations
+-------------------------
+None
+
+Bug Fixes
+---------
+* Avoid appending empty slots to user data arrays. Fixes a memory
+ consumption regression since commit 9341c254a.
+
+* Return a better error (file-not-found) when setting up pango on
+ devices where the font files don't have read permissions.
+
+* Fix regression in the font size of canvas text in Inkscape when
+ compiled with the Quartz backend. (Bug #84324)
+
+* Fix _cairo_gl_shader_bind_matrix() to maintain compatibility with
+ OpenGL ES 2.0. Manually transpose the matrix.
+
+* Fix incorrect font descriptor conversion when the font matrix yy is
+ negative. (Bug #90538)
+
+* Fix crash when using a complex path for clip and stroke due to
+ discarding the intersection exactly at the top edge.
+ (Bug #74779)
+
+* Fix cairo_get_locale_decimal_point() on Android
+
+* Fix compilation problem on AIX due to conflicting usage of symbol
+ 'jmpbuf'. (Bug #89339)
+
+* Fix broken rendering with XCB due to snapshotting of uploaded part of
+ surfaces. (Bug #67505)
+
+* Fix loss of alpha when copying a mask for a cairo recording surface,
+ resulting in a double copy. (Bugs #73038, #73901)
+
+* Fix incorrect recording of certain paths with script surfaces.
+ (Bug #91054)
+
+* Fix typo in definition of MAYBE_WARN in configure script.
+ (Bug #89750)
+
+* Fix use of filename variable after it's been freed.
+ (Bug #91206)
+
+* Fix out of bounds access when printing pattern.
+ (Bug #91266)
+
+* Fix incorrect size calculation in glyph cache unlocking for Cairo GL
+ compositor.
+ (Bug #91321)
+
+* Fix memory leak in _cairo_gl_pattern_texture_setup()
+ (Bug #91537)
+
+* Fix transparent images in win32-print.
+ (Bug #91835)
+
+* Fix _put_shm_image_boxes and _put_image_boxes when no SHM available
+ with XCB.
+
+
Release 1.14.2 (2014-03-09 Bryce Harrington <bryce at osg.samsung.com>)
====================================================================
This release provides collected bug fixes, along with one feature
commit 6eba71d2170443fb33e4d64261607f39b37245d6
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Wed Oct 28 17:37:41 2015 -0700
Revert "win32: Add cairo API to set up a Win32 surface for an HDC with an alpha channel."
This adds a new API call, which we generally avoid in micro releases.
This reverts commit 3d489616a2fc624dc5e94164f23a4c8536d466d0.
diff --git a/src/cairo-win32.h b/src/cairo-win32.h
index db4cac6..3d2e1c6 100644
--- a/src/cairo-win32.h
+++ b/src/cairo-win32.h
@@ -49,10 +49,6 @@ cairo_public cairo_surface_t *
cairo_win32_surface_create (HDC hdc);
cairo_public cairo_surface_t *
-cairo_win32_surface_create_with_format (HDC hdc,
- cairo_format_t format);
-
-cairo_public cairo_surface_t *
cairo_win32_printing_surface_create (HDC hdc);
cairo_public cairo_surface_t *
diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c
index 1571480..965f2c4 100644
--- a/src/win32/cairo-win32-display-surface.c
+++ b/src/win32/cairo-win32-display-surface.c
@@ -917,41 +917,31 @@ static const cairo_surface_backend_t cairo_win32_display_surface_backend = {
*/
/**
- * cairo_win32_surface_create_with_format:
+ * cairo_win32_surface_create:
* @hdc: the DC to create a surface for
- * @format: format of pixels in the surface to create
*
* Creates a cairo surface that targets the given DC. The DC will be
* queried for its initial clip extents, and this will be used as the
- * size of the cairo surface.
- *
- * Supported formats are:
- * %CAIRO_FORMAT_ARGB32
- * %CAIRO_FORMAT_RGB24
- *
- * Note: @format only tells cairo how to draw on the surface, not what
- * the format of the surface is. Namely, cairo does not (and cannot)
- * check that @hdc actually supports alpha-transparency.
+ * size of the cairo surface. The resulting surface will always be of
+ * format %CAIRO_FORMAT_RGB24; should you need another surface format,
+ * you will need to create one through
+ * cairo_win32_surface_create_with_dib().
*
- * Return value: the newly created surface, NULL on failure
+ * Return value: the newly created surface
*
- * Since: 1.14.3
+ * Since: 1.0
**/
cairo_surface_t *
-cairo_win32_surface_create_with_format (HDC hdc, cairo_format_t format)
+cairo_win32_surface_create (HDC hdc)
{
cairo_win32_display_surface_t *surface;
+ cairo_format_t format;
cairo_status_t status;
cairo_device_t *device;
- switch (format) {
- default:
- return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
- case CAIRO_FORMAT_ARGB32:
- case CAIRO_FORMAT_RGB24:
- break;
- }
+ /* Assume that everything coming in as a HDC is RGB24 */
+ format = CAIRO_FORMAT_RGB24;
surface = malloc (sizeof (*surface));
if (surface == NULL)
@@ -987,28 +977,6 @@ cairo_win32_surface_create_with_format (HDC hdc, cairo_format_t format)
}
/**
- * cairo_win32_surface_create:
- * @hdc: the DC to create a surface for
- *
- * Creates a cairo surface that targets the given DC. The DC will be
- * queried for its initial clip extents, and this will be used as the
- * size of the cairo surface. The resulting surface will always be of
- * format %CAIRO_FORMAT_RGB24; should you need another surface format,
- * you will need to create one through
- * cairo_win32_surface_create_with_format() or
- * cairo_win32_surface_create_with_dib().
- *
- * Return value: the newly created surface, NULL on failure
- *
- * Since: 1.0
- **/
-cairo_surface_t *
-cairo_win32_surface_create (HDC hdc)
-{
- return cairo_win32_surface_create_with_format (hdc, CAIRO_FORMAT_RGB24);
-}
-
-/**
* cairo_win32_surface_create_with_dib:
* @format: format of pixels in the surface to create
* @width: width of the surface, in pixels
@@ -1059,16 +1027,12 @@ cairo_win32_surface_create_with_ddb (HDC hdc,
HDC screen_dc, ddb_dc;
HBITMAP saved_dc_bitmap;
- switch (format) {
- default:
-/* XXX handle these eventually */
- case CAIRO_FORMAT_A8:
- case CAIRO_FORMAT_A1:
+ if (format != CAIRO_FORMAT_RGB24)
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_FORMAT));
- case CAIRO_FORMAT_ARGB32:
- case CAIRO_FORMAT_RGB24:
- break;
- }
+/* XXX handle these eventually
+ format != CAIRO_FORMAT_A8 ||
+ format != CAIRO_FORMAT_A1)
+*/
if (!hdc) {
screen_dc = GetDC (NULL);
commit b15e18fb9045b21d6ab2eb531ac62f3693fd302c
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Fri Jul 17 12:07:18 2015 -0700
Revert "pattern: allow for a floating one pixel rounded difference."
While this fixed a real bug, in testing this patch was found to fail a
number of tests and thus needs further work.
This reverts commit e7acf4b6dc6666c2a2c54fb08e9ad6f01a1d415f.
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 562724d..ac5d7af 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -3531,7 +3531,7 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
cairo_rectangle_int_t *extents)
{
double x1, y1, x2, y2;
- double ix1, ix2, iy1, iy2;
+ int ix1, ix2, iy1, iy2;
cairo_bool_t round_x = FALSE;
cairo_bool_t round_y = FALSE;
@@ -3725,12 +3725,12 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
if (x1 < CAIRO_RECT_INT_MIN)
ix1 = CAIRO_RECT_INT_MIN;
else
- ix1 = x1;
+ ix1 = _cairo_lround (x1);
if (x2 > CAIRO_RECT_INT_MAX)
ix2 = CAIRO_RECT_INT_MAX;
else
- ix2 = x2;
- extents->x = ix1; extents->width = _cairo_lround(ix2 - ix1);
+ ix2 = _cairo_lround (x2);
+ extents->x = ix1; extents->width = ix2 - ix1;
if (!round_y) {
y1 -= 0.5;
@@ -3744,7 +3744,7 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
iy2 = CAIRO_RECT_INT_MAX;
else
iy2 = _cairo_lround (y2);
- extents->y = iy1; extents->height = _cairo_lround(iy2 - iy1);
+ extents->y = iy1; extents->height = iy2 - iy1;
return;
commit 580a1b6c39ea2a3c5fab5f2b6764a78f80f48aa2
Author: Uli Schlachter <psychon at znc.in>
Date: Wed Oct 14 14:24:16 2015 +0200
xcb: Fix _put_image_boxes() if no SHM is available
This function tries to use _cairo_xcb_connection_put_image() to do the actual
work. However, that function can only be used for images with "native" stride.
If we only want to upload a rectangle from within an image, the function
_cairo_xcb_connection_put_subimage() has to be used. This function makes sure
that the correct information is sent to the X11 server.
No unit test for this, because we currently do not test the !SHM case
automatically. Perhaps we should?
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 2403a0d..d4d60ad 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -691,15 +691,15 @@ _put_image_boxes (cairo_xcb_surface_t *surface,
int y = _cairo_fixed_integer_part (b->p1.y);
int width = _cairo_fixed_integer_part (b->p2.x - b->p1.x);
int height = _cairo_fixed_integer_part (b->p2.y - b->p1.y);
- _cairo_xcb_connection_put_image (surface->connection,
- surface->drawable, gc,
- width, height,
- x, y,
- image->depth,
- image->stride,
- image->data +
- x * PIXMAN_FORMAT_BPP (image->pixman_format) / 8 +
- y * image->stride);
+ _cairo_xcb_connection_put_subimage (surface->connection,
+ surface->drawable, gc,
+ x, y,
+ width, height,
+ PIXMAN_FORMAT_BPP (image->pixman_format) / 8,
+ image->stride,
+ x, y,
+ image->depth,
+ image->data);
}
}
commit 853c29eed12ab5539247acb130ffef559df82b38
Author: Uli Schlachter <psychon at znc.in>
Date: Wed Oct 14 14:22:50 2015 +0200
xcb: Fix _put_shm_image_boxes if no SHM available
This function always returned CAIRO_INT_STATUS_SUCCESS, even if it didn't do
anything. This commit makes the function return CAIRO_INT_STATUS_UNSUPPORTED
instead.
No unit test for this, because we currently do not test the !SHM case
automatically. Perhaps we should?
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index d7e0d73..2403a0d 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -646,9 +646,8 @@ _put_shm_image_boxes (cairo_xcb_surface_t *surface,
shm_info->offset);
}
}
+ return CAIRO_INT_STATUS_SUCCESS;
}
-
- return CAIRO_INT_STATUS_SUCCESS;
#endif
return CAIRO_INT_STATUS_UNSUPPORTED;
commit 3fb344fefd16751d42121bf7864a9878661cabe9
Author: Rodrigo Rivas Costa <rodrigorivascosta at gmail.com>
Date: Wed Sep 30 23:53:23 2015 +0930
win32-print: fix transparent images have black background
Bug 91835
diff --git a/src/win32/cairo-win32-printing-surface.c b/src/win32/cairo-win32-printing-surface.c
index 6005cb5..cce7040 100644
--- a/src/win32/cairo-win32-printing-surface.c
+++ b/src/win32/cairo-win32-printing-surface.c
@@ -1840,7 +1840,7 @@ cairo_win32_printing_surface_create (HDC hdc)
_cairo_win32_printing_surface_clipper_intersect_clip_path);
surface->win32.format = CAIRO_FORMAT_RGB24;
- surface->win32.base.content = CAIRO_CONTENT_COLOR_ALPHA;
+ surface->content = CAIRO_CONTENT_COLOR_ALPHA;
surface->win32.dc = hdc;
commit aa458ef5367eee727a421eb97f89e8eb8643ce10
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Fri Aug 28 13:23:45 2015 -0700
Ensure null-terminated result from strncpy()
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 2121761..196fa99 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -1206,10 +1206,12 @@ _cairo_scaled_font_subset_create_glyph_names (cairo_scaled_font_subset_t *subset
if (utf16_len == 1) {
int ch = _cairo_unicode_to_winansi (utf16[0]);
- if (ch > 0 && _cairo_winansi_to_glyphname (ch))
+ if (ch > 0 && _cairo_winansi_to_glyphname (ch)) {
strncpy (buf, _cairo_winansi_to_glyphname (ch), sizeof (buf));
- else
+ buf[sizeof (buf)-1] = '\0';
+ } else {
snprintf (buf, sizeof (buf), "uni%04X", (int) utf16[0]);
+ }
_cairo_string_init_key (&key, buf);
entry = _cairo_hash_table_lookup (names, &key.base);
commit 6bde9f35df56ffaf574d098f61c60f6291f34b72
Author: Sahil Vij <sahil.vij at samsung.com>
Date: Fri Aug 7 18:01:18 2015 -0700
gl: Fix bug in _cairo_gl_pattern_texture_setup()
The memory allocated to "image" at line 298 is not freed before moving to label fail at line 305 and 314.
This patch takes care of this memory leak in above mentioned cases.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91537
Signed-off-by: Sahil Vij <sahil.vij at samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-gl-operand.c b/src/cairo-gl-operand.c
index 4015747..1d1465a 100644
--- a/src/cairo-gl-operand.c
+++ b/src/cairo-gl-operand.c
@@ -301,8 +301,10 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand,
so we need to release this device while we paint it to the image. */
if (src_is_gl_surface) {
status = _cairo_gl_context_release (ctx, status);
- if (unlikely (status))
+ if (unlikely (status)) {
+ _cairo_surface_unmap_image (&surface->base, image);
goto fail;
+ }
}
status = _cairo_surface_offset_paint (&image->base, extents->x, extents->y,
@@ -310,8 +312,10 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand,
if (src_is_gl_surface) {
status = _cairo_gl_context_acquire (dst->base.device, &ctx);
- if (unlikely (status))
+ if (unlikely (status)) {
+ _cairo_surface_unmap_image (&surface->base, image);
goto fail;
+ }
}
status = _cairo_surface_unmap_image (&surface->base, image);
commit eb56bf8a5079c87d38d5eae63064308c14fdb876
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Jul 30 17:16:53 2015 -0700
boilerplate: Fix list termination for glXChooseVisual
The attribute list is terminated by GLX_NONE (defined as 0x8000), but
the man page of 'glXChooseVisual' says it must be terminated with None
(0L).
Issue found and fix suggested by Massimo.
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91293
diff --git a/boilerplate/cairo-boilerplate-glx.c b/boilerplate/cairo-boilerplate-glx.c
index 3d58215..7701d90 100644
--- a/boilerplate/cairo-boilerplate-glx.c
+++ b/boilerplate/cairo-boilerplate-glx.c
@@ -82,13 +82,13 @@ _cairo_boilerplate_gl_create_surface (const char *name,
GLX_BLUE_SIZE, 1,
GLX_ALPHA_SIZE, 1,
GLX_DOUBLEBUFFER,
- GLX_NONE };
+ None };
int rgb_attribs[] = { GLX_RGBA,
GLX_RED_SIZE, 1,
GLX_GREEN_SIZE, 1,
GLX_BLUE_SIZE, 1,
GLX_DOUBLEBUFFER,
- GLX_NONE };
+ None };
XVisualInfo *visinfo;
GLXContext ctx;
gl_target_closure_t *gltc;
commit d18212f67d0a772737e10b862f615c3822d6d13b
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Jul 30 16:45:15 2015 -0700
test: Free the memory, not the pointer to the memory
In read_file(), we see:
*data = malloc (*len);
...
if (fread(*data, *len, 1, fp) != 1) {
free(data);
...
The free call needs to be free(*data), to match the malloc call.
Matthias Clasen found this via Coverity and proposed the fix.
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91381
diff --git a/test/pdf-mime-data.c b/test/pdf-mime-data.c
index fd5af1f..b49a1d1 100644
--- a/test/pdf-mime-data.c
+++ b/test/pdf-mime-data.c
@@ -82,7 +82,7 @@ read_file (const cairo_test_context_t *ctx,
}
if (fread(*data, *len, 1, fp) != 1) {
- free (data);
+ free (*data);
fclose(fp);
cairo_test_log (ctx, "Could not read data from file %s\n", file);
return CAIRO_TEST_FAILURE;
commit 6c41ed5b9b0bfb63d576ec378dc1ef3dd2f9b891
Author: Arpit Jain <jain.arpit at samsung.com>
Date: Mon Jul 13 11:31:48 2015 +0530
gl: Fix incorrect size of expression
The sizeof operator now applied to the correct variable "ctx->glyph_cache",
instead of its pointer address, in function "_cairo_gl_composite_flush".
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91321
Signed-off-by: Arpit Jain <jain.arpit at samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c
index b50f9a7..5b14114 100644
--- a/src/cairo-gl-composite.c
+++ b/src/cairo-gl-composite.c
@@ -861,7 +861,7 @@ _cairo_gl_composite_flush (cairo_gl_context_t *ctx)
_cairo_gl_composite_draw_triangles_with_clip_region (ctx, count);
}
- for (i = 0; i < ARRAY_LENGTH (&ctx->glyph_cache); i++)
+ for (i = 0; i < ARRAY_LENGTH (ctx->glyph_cache); i++)
_cairo_gl_glyph_cache_unlock (&ctx->glyph_cache[i]);
}
commit 776cc09016951a72fce5eb4f05d08a3fb56e3589
Author: Ashim <ashim.shah at samsung.com>
Date: Thu Jul 9 10:43:30 2015 +0530
Fix out of bound access in struct pattern->type
The pattern structure is hardcoded to hold 7 elements, yet the
pattern_names array in cairo-surface-observer.c is initialized with 8
strings. This causes a crash in print_array at line 1587 when it tries
to access the 8th member.
Hence changed the 'type' array from type[7] to type[8] to avoid out of
bound access.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91266
Signed-off-by: Ashim <ashim.shah at samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-surface-observer-private.h b/src/cairo-surface-observer-private.h
index 70c87db..6ed0c18 100644
--- a/src/cairo-surface-observer-private.h
+++ b/src/cairo-surface-observer-private.h
@@ -62,7 +62,7 @@ struct extents {
};
struct pattern {
- unsigned int type[7]; /* native/record/other surface/gradients */
+ unsigned int type[8]; /* native/record/other surface/gradients */
};
struct path {
commit da1dcfa6c6240443abe61de1694eafca88346c32
Author: Arpit Jain <jain.arpit at samsung.com>
Date: Fri Jul 3 15:31:48 2015 +0530
test/bitmap-font: Fix use of pointer after freed pointer
The pointer 'filename' is already freed and still used as a function
argument. This patch will free the pointer 'filename' only after it is
used.
Also, the patch ensures that it frees the pointer 'filename' before any
return of this function.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91206
Signed-off-by: Arpit Jain <jain.arpit at samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/test/bitmap-font.c b/test/bitmap-font.c
index 0ec9b3d..525bafb 100644
--- a/test/bitmap-font.c
+++ b/test/bitmap-font.c
@@ -94,9 +94,9 @@ draw (cairo_t *cr, int width, int height)
}
pattern = FcFreeTypeQuery ((unsigned char *)filename, 0, NULL, &face_count);
- free (filename);
if (! pattern) {
cairo_test_log (ctx, "FcFreeTypeQuery failed.\n");
+ free (filename);
return cairo_test_status_from_status (ctx, CAIRO_STATUS_NO_MEMORY);
}
@@ -108,9 +108,11 @@ draw (cairo_t *cr, int width, int height)
cairo_test_log (ctx, "Error creating font face for %s: %s\n",
filename,
cairo_status_to_string (status));
+ free (filename);
return cairo_test_status_from_status (ctx, status);
}
+ free (filename);
if (cairo_font_face_get_type (font_face) != CAIRO_FONT_TYPE_FT) {
cairo_test_log (ctx, "Unexpected value from cairo_font_face_get_type: %d (expected %d)\n",
cairo_font_face_get_type (font_face), CAIRO_FONT_TYPE_FT);
commit be9eda28616e60a082b72d884f4ab4dafba5b0db
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Sat Jun 27 00:43:04 2015 -0700
configure: Fix typo for missing line continuation character
There is an unintentional (benign) missing line continuation "\" in the
definition of MAYBE_WARN in configure. configure completes and issues a
WARNING:
configure: WARNING: cache variable cairo_cv_warn_maybe contains a
newline
Found and solved by Larry Baker.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89750
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
index 74e6634..96c7f6f 100644
--- a/build/configure.ac.warnings
+++ b/build/configure.ac.warnings
@@ -12,7 +12,7 @@ dnl MAYBE_WARN in an ignorable way (like adding whitespace)
MAYBE_WARN="-Wall -Wextra \
-Wmissing-declarations -Werror-implicit-function-declaration \
--Wpointer-arith -Wwrite-strings -Wsign-compare -Wpacked
+-Wpointer-arith -Wwrite-strings -Wsign-compare -Wpacked \
-Wswitch-enum -Wmissing-format-attribute -Wvolatile-register-var \
-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
-Wno-missing-field-initializers -Wno-unused-parameter \
commit e3635de87d6bab7ec7b53a76c53188e0b04d675a
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Fri Jun 26 16:30:06 2015 -0700
cairo-script: Return a cairo_status_t error, not FALSE
This typo results in certain paths being incorrectly recorded with
script surfaces.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91054
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index b73a145..a4cefde 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -1837,7 +1837,7 @@ _emit_path_boxes (cairo_script_surface_t *surface,
if (! _cairo_path_fixed_iter_at_end (&iter)) {
_cairo_boxes_fini (&boxes);
- return FALSE;
+ return CAIRO_STATUS_INVALID_PATH_DATA;
}
for (chunk = &boxes.chunks; chunk; chunk = chunk->next) {
commit 0f85e035e693f4cad03703ab619d299ba1ebd13e
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Jun 25 18:54:23 2015 -0700
cairo-recording-surface: Fix loss of alpha when clipping
Commit 8020e0bc introduced a regression due to a typo when copying a
mask for a cairo recording surface. It should copy the source and mask
members from the command source to the recording surface, but instead it
copies the source twice.
Fix suggested by Massimo.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73038
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73901
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index ce29b93..78e7cfa 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -1165,7 +1165,7 @@ _cairo_recording_surface_copy__mask (cairo_recording_surface_t *surface,
goto err_command;
status = _cairo_pattern_init_copy (&command->mask.base,
- &src->mask.source.base);
+ &src->mask.mask.base);
if (unlikely (status))
goto err_source;
commit 5d656f3e86cab791f80c8ddf401bb863accec36d
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Jun 25 17:41:26 2015 -0700
cairo-script: Fix sp. "directoriy"
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index b84aed9..b73a145 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -50,7 +50,7 @@
*
* The script surface provides the ability to render to a native
* script that matches the cairo drawing model. The scripts can
- * be replayed using tools under the util/cairo-script directoriy,
+ * be replayed using tools under the util/cairo-script directory,
* or with cairo-perf-trace.
**/
More information about the cairo-commit
mailing list