[cairo-commit] src/cairo-image-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Sep 23 09:57:17 PDT 2009


 src/cairo-image-surface.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 03bce099eae68643979e5742b2703b2b2e835cca
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Sep 23 17:56:00 2009 +0100

    [image] Tweak coding style
    
    Whitespace spam.

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 9156349..ecc042b 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -388,12 +388,13 @@ _cairo_image_surface_create_with_pixman_format (unsigned char		*data,
 
     surface = _cairo_image_surface_create_for_pixman_image (pixman_image,
 							    pixman_format);
-    if (cairo_surface_status (surface))
+    if (unlikely (surface->status)) {
 	pixman_image_unref (pixman_image);
-    else
-        /* we can not make any assumptions by the initial state of the data */
-	((cairo_image_surface_t *)surface)->is_clear = (data != NULL);
+	return surface;
+    }
 
+    /* we can not make any assumptions about the initial state of user data */
+    ((cairo_image_surface_t *) surface)->is_clear = data != NULL;
     return surface;
 }
 


More information about the cairo-commit mailing list