[cairo-commit] 3 commits - src/cairo-xcb-private.h src/cairo-xcb-surface.c src/cairo-xlib-surface.c
Uli Schlachter
psychon at kemper.freedesktop.org
Wed Jul 27 11:02:58 PDT 2011
src/cairo-xcb-private.h | 2 +-
src/cairo-xcb-surface.c | 5 +++++
src/cairo-xlib-surface.c | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
New commits:
commit 44140e3dd692938ac3823eb6f4f295788716bb8b
Author: Uli Schlachter <psychon at znc.in>
Date: Wed Jul 27 19:54:30 2011 +0200
Make _cairo_xcb_surface_get_extents no_warn
This function never fails. However, since it's used to implement a operation for
cairo_surface_backend_t, the return value can't be void. This commit instead
uses cairo_private_no_warn to get rid of the warnings.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-private.h b/src/cairo-xcb-private.h
index d9f443c..150aab9 100644
--- a/src/cairo-xcb-private.h
+++ b/src/cairo-xcb-private.h
@@ -373,7 +373,7 @@ _cairo_xcb_surface_create_internal (cairo_xcb_screen_t *screen,
int width,
int height);
-cairo_private cairo_bool_t
+cairo_private_no_warn cairo_bool_t
_cairo_xcb_surface_get_extents (void *abstract_surface,
cairo_rectangle_int_t *extents);
commit 8877ca23f5781741669bd5a7e072840a5c6658b5
Author: Uli Schlachter <psychon at znc.in>
Date: Wed Jul 27 19:52:58 2011 +0200
xcb: Check that the extents are inside our surface
The previous commit fixed a bug in cairo-xlib found by a similar assert, so this
seems to be a good idea to have.
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index fb42306..db75d25 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -346,6 +346,11 @@ _get_image (cairo_xcb_surface_t *surface,
xcb_get_image_reply_t *reply;
cairo_int_status_t status;
+ assert (x >= 0);
+ assert (y >= 0);
+ assert (x + width <= surface->width);
+ assert (y + height <= surface->height);
+
if (surface->deferred_clear) {
image = (cairo_image_surface_t *)
_cairo_image_surface_create_with_pixman_format (NULL,
commit 73e8384ac82ef7721096a78db998d6a658a44c33
Author: Uli Schlachter <psychon at znc.in>
Date: Wed Jul 27 18:30:37 2011 +0200
xlib: Fix a typo
This was introduced in a69335a84eb9225b477cc8c75.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39581
Signed-off-by: Uli Schlachter <psychon at znc.in>
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 9c46a20..b4a084a 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1377,7 +1377,7 @@ _cairo_xlib_surface_acquire_source_image (void *abstract_surf
extents.x = extents.y = 0;
extents.width = surface->width;
- extents.height = surface->width;
+ extents.height = surface->height;
*image_extra = NULL;
*image_out = (cairo_image_surface_t*)_get_image_surface (surface, &extents);
More information about the cairo-commit
mailing list