[cairo-commit] 2 commits - src/cairo-analysis-surface.c src/cairo-quartz-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Feb 10 01:22:31 PST 2012


 src/cairo-analysis-surface.c |   13 +++----------
 src/cairo-quartz-surface.c   |    1 +
 2 files changed, 4 insertions(+), 10 deletions(-)

New commits:
commit 154e6b052bca4189ef067dc9385b224803e6f053
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 10 09:20:21 2012 +0000

    quartz: Add missing source hook
    
    Regression from 2061cd81f2.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45866
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 4a9b851..cdd5865 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -2214,6 +2214,7 @@ static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
     _cairo_quartz_surface_map_to_image,
     _cairo_quartz_surface_unmap_image,
 
+    _cairo_surface_default_source,
     _cairo_quartz_surface_acquire_source_image,
     _cairo_quartz_surface_release_source_image,
     _cairo_quartz_surface_snapshot,
commit 8960a5d0d0ca3f92b9e727d5e35caaefd68ecd59
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Feb 10 00:03:51 2012 +0000

    analysis: replace open-coded _cairo_box_add_box()
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index 895d82b..b8abe02 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -37,6 +37,7 @@
 #include "cairoint.h"
 
 #include "cairo-analysis-surface-private.h"
+#include "cairo-box-private.h"
 #include "cairo-default-context-private.h"
 #include "cairo-error-private.h"
 #include "cairo-paginated-private.h"
@@ -247,16 +248,8 @@ _add_operation (cairo_analysis_surface_t *surface,
     if (surface->first_op) {
 	surface->first_op = FALSE;
 	surface->page_bbox = bbox;
-    } else {
-	if (bbox.p1.x < surface->page_bbox.p1.x)
-	    surface->page_bbox.p1.x = bbox.p1.x;
-	if (bbox.p1.y < surface->page_bbox.p1.y)
-	    surface->page_bbox.p1.y = bbox.p1.y;
-	if (bbox.p2.x > surface->page_bbox.p2.x)
-	    surface->page_bbox.p2.x = bbox.p2.x;
-	if (bbox.p2.y > surface->page_bbox.p2.y)
-	    surface->page_bbox.p2.y = bbox.p2.y;
-    }
+    } else
+	_cairo_box_add_box(&surface->page_bbox, &bbox);
 
     /* If the operation is completely enclosed within the fallback
      * region there is no benefit in emitting a native operation as


More information about the cairo-commit mailing list