[cairo-commit] src/cairo-quartz-image-surface.c src/cairo-quartz-private.h

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Thu Apr 21 14:28:43 PDT 2011


 src/cairo-quartz-image-surface.c |   15 ++++++++++-----
 src/cairo-quartz-private.h       |    2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 9f92901b0910563f2523ebe7289abd9094271c98
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Thu Apr 21 15:23:14 2011 -0400

    Remove quartz-image extents.
    
    We never used the x,y portion of the extents so we might as well take it out.

diff --git a/src/cairo-quartz-image-surface.c b/src/cairo-quartz-image-surface.c
index 9751ae1..81ed5fe 100644
--- a/src/cairo-quartz-image-surface.c
+++ b/src/cairo-quartz-image-surface.c
@@ -105,7 +105,10 @@ _cairo_quartz_image_surface_acquire_dest_image (void *asurface,
     cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface;
 
     *image_out = surface->imageSurface;
-    *image_rect = surface->extents;
+    image_rect->x = 0;
+    image_rect->y = 0;
+    image_rect->width = surface->width;
+    image_rect->height = surface->height;
     *image_extra = NULL;
 
     return CAIRO_STATUS_SUCCESS;
@@ -117,7 +120,10 @@ _cairo_quartz_image_surface_get_extents (void *asurface,
 {
     cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t *) asurface;
 
-    *extents = surface->extents;
+    extents->x = 0;
+    extents->y = 0;
+    extents->width = surface->width;
+    extents->height = surface->height;
     return TRUE;
 }
 
@@ -263,9 +269,8 @@ cairo_quartz_image_surface_create (cairo_surface_t *surface)
 			 NULL, /* device */
 			 _cairo_content_from_format (format));
 
-    qisurf->extents.x = qisurf->extents.y = 0;
-    qisurf->extents.width = width;
-    qisurf->extents.height = height;
+    qisurf->width = width;
+    qisurf->height = height;
 
     qisurf->image = image;
     qisurf->imageSurface = image_surface;
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h
index beac884..7edc742 100644
--- a/src/cairo-quartz-private.h
+++ b/src/cairo-quartz-private.h
@@ -74,7 +74,7 @@ typedef struct cairo_quartz_surface {
 typedef struct cairo_quartz_image_surface {
     cairo_surface_t base;
 
-    cairo_rectangle_int_t extents;
+    int width, height;
 
     CGImageRef image;
     cairo_image_surface_t *imageSurface;


More information about the cairo-commit mailing list