[cairo-commit] 2 commits - src/cairo-xcb-surface.c src/cairo-xlib-surface.c

Benjamin Otte company at kemper.freedesktop.org
Mon Nov 8 11:38:45 PST 2010


 src/cairo-xcb-surface.c  |   14 +++++++-------
 src/cairo-xlib-surface.c |    6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 7ee313d7b86b8c9eeaa5bf9b42a47d3f1feaeeee
Author: Benjamin Otte <otte at redhat.com>
Date:   Mon Nov 8 14:22:38 2010 -0500

    xcb: Add more _cairo_error() calls
    
    We still don't track various error conditions...

diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 80fc19c..24e33bb 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -1165,14 +1165,14 @@ cairo_xcb_surface_create (xcb_connection_t  *xcb_connection,
     int depth;
 
     if (xcb_connection_has_error (xcb_connection))
-	return _cairo_surface_create_in_error (CAIRO_STATUS_WRITE_ERROR);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR));
 
     if (unlikely (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX))
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     xcb_screen = _cairo_xcb_screen_from_visual (xcb_connection, visual, &depth);
     if (unlikely (xcb_screen == NULL))
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_VISUAL);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_VISUAL));
 
     image_masks.alpha_mask = 0;
     image_masks.red_mask   = visual->red_mask;
@@ -1220,10 +1220,10 @@ cairo_xcb_surface_create_for_bitmap (xcb_connection_t	*xcb_connection,
     cairo_xcb_screen_t *screen;
 
     if (xcb_connection_has_error (xcb_connection))
-	return _cairo_surface_create_in_error (CAIRO_STATUS_WRITE_ERROR);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR));
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     screen = _cairo_xcb_screen_get (xcb_connection, xcb_screen);
     if (unlikely (screen == NULL))
@@ -1271,10 +1271,10 @@ cairo_xcb_surface_create_with_xrender_format (xcb_connection_t	    *xcb_connecti
     pixman_format_code_t pixman_format;
 
     if (xcb_connection_has_error (xcb_connection))
-	return _cairo_surface_create_in_error (CAIRO_STATUS_WRITE_ERROR);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_WRITE_ERROR));
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     image_masks.alpha_mask =
 	(unsigned long) format->direct.alpha_mask << format->direct.alpha_shift;
commit 78dadf11ca3d13a399b5942ab2a5c1c399689729
Author: Benjamin Otte <otte at redhat.com>
Date:   Mon Nov 8 14:17:37 2010 -0500

    xlib: Add more _cairo_error() calls
    
    We still don't track various error conditions...

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index c74f656..6d593c0 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -3371,7 +3371,7 @@ cairo_xlib_surface_create (Display     *dpy,
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX) {
 	/* you're lying, and you know it! */
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
     }
 
     scr = _cairo_xlib_screen_from_visual (dpy, visual);
@@ -3413,7 +3413,7 @@ cairo_xlib_surface_create_for_bitmap (Display  *dpy,
     cairo_status_t status;
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     status = _cairo_xlib_screen_get (dpy, scr, &screen);
     if (unlikely (status))
@@ -3459,7 +3459,7 @@ cairo_xlib_surface_create_with_xrender_format (Display		    *dpy,
     cairo_status_t status;
 
     if (width > XLIB_COORD_MAX || height > XLIB_COORD_MAX)
-	return _cairo_surface_create_in_error (CAIRO_STATUS_INVALID_SIZE);
+	return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
 
     status = _cairo_xlib_screen_get (dpy, scr, &screen);
     if (unlikely (status))


More information about the cairo-commit mailing list