[cairo-commit] src/cairo-gl-surface.c src/cairo-image-surface.c src/cairo-script-surface.c src/cairo-xcb-surface.c src/cairo-xlib-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Apr 27 14:15:38 PDT 2012


 src/cairo-gl-surface.c     |    8 +++++---
 src/cairo-image-surface.c  |    8 +++++---
 src/cairo-script-surface.c |    8 +++++---
 src/cairo-xcb-surface.c    |    8 +++++---
 src/cairo-xlib-surface.c   |    8 +++++---
 5 files changed, 25 insertions(+), 15 deletions(-)

New commits:
commit a18506acf0ca4a5b6f56cc9a8e0ffb3dd0eaabab
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Apr 27 22:13:01 2012 +0100

    Update the remaining backends to handle a NULL extents for _cairo_surface_get_source
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index 32ecf63..f480260 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -1118,9 +1118,11 @@ _cairo_gl_surface_source (void		       *abstract_surface,
 {
     cairo_gl_surface_t *surface = abstract_surface;
 
-    extents->x = extents->y = 0;
-    extents->width  = surface->width;
-    extents->height = surface->height;
+    if (extents) {
+	extents->x = extents->y = 0;
+	extents->width  = surface->width;
+	extents->height = surface->height;
+    }
 
     return &surface->base;
 }
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 56914b0..98f70c5 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -859,9 +859,11 @@ _cairo_image_surface_source (void			*abstract_surface,
 {
     cairo_image_surface_t *surface = abstract_surface;
 
-    extents->x = extents->y = 0;
-    extents->width = surface->width;
-    extents->height = surface->height;
+    if (extents) {
+	extents->x = extents->y = 0;
+	extents->width = surface->width;
+	extents->height = surface->height;
+    }
 
     return &surface->base;
 }
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index ab4dcd6..2149e7e 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -2097,9 +2097,11 @@ _cairo_script_surface_source (void                    *abstract_surface,
 {
     cairo_script_surface_t *surface = abstract_surface;
 
-    extents->x = extents->y = 0;
-    extents->width  = surface->width;
-    extents->height = surface->height;
+    if (extents) {
+	extents->x = extents->y = 0;
+	extents->width  = surface->width;
+	extents->height = surface->height;
+    }
 
     return &surface->base;
 }
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 4b1b906..c6a1d29 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -466,9 +466,11 @@ _cairo_xcb_surface_source (void *abstract_surface,
 {
     cairo_xcb_surface_t *surface = abstract_surface;
 
-    extents->x = extents->y = 0;
-    extents->width  = surface->width;
-    extents->height = surface->height;
+    if (extents) {
+	extents->x = extents->y = 0;
+	extents->width  = surface->width;
+	extents->height = surface->height;
+    }
 
     return &surface->base;
 }
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index ac0cf7c..ae2153b 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1230,9 +1230,11 @@ _cairo_xlib_surface_source(void                    *abstract_surface,
 {
     cairo_xlib_surface_t *surface = abstract_surface;
 
-    extents->x = extents->y = 0;
-    extents->width  = surface->width;
-    extents->height = surface->height;
+    if (extents) {
+	extents->x = extents->y = 0;
+	extents->width  = surface->width;
+	extents->height = surface->height;
+    }
 
     return &surface->base;
 }


More information about the cairo-commit mailing list