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

罗晶华 Jinghua Luo jinghua at kemper.freedesktop.org
Mon May 7 22:25:11 PDT 2007


 src/cairo-glitz-surface.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

New commits:
diff-tree 936c965777c867bd4de7fd2278335837cc24eb22 (from 413705872e321288bff1368c62eacad11805c2fc)
Author: Jinghua Luo <sunmoon1997 at gmail.com>
Date:   Tue May 8 13:24:40 2007 +0800

    glitz: kill some compiler warnings.

diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index b212a69..031c081 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -668,7 +668,7 @@ _cairo_glitz_pattern_acquire_surface (ca
 	}
 
 	glitz_set_pixels (src->surface, 0, 0, gradient->n_stops, 1,
-			  &format, buffer);
+			  (glitz_pixel_format_t *)&format, buffer);
 
 	glitz_buffer_destroy (buffer);
 
@@ -1292,7 +1292,14 @@ _cairo_glitz_surface_set_clip_region (vo
             surface->has_clip = TRUE;
         }
 
-	pixman_region_copy (&surface->clip, region);
+	if (pixman_region_copy (&surface->clip, region) !=
+            PIXMAN_REGION_STATUS_SUCCESS)
+        {
+	    pixman_region_fini (&surface->clip);
+	    surface->has_clip = FALSE;
+            return CAIRO_STATUS_NO_MEMORY;
+        }
+
 	box = (glitz_box_t *) pixman_region_rects (&surface->clip);
 	n = pixman_region_num_rects (&surface->clip);
 
diff-tree 413705872e321288bff1368c62eacad11805c2fc (from d81907734e18fb9302e78eccb1e25a838223b726)
Author: Jinghua Luo <sunmoon1997 at gmail.com>
Date:   Tue May 8 13:19:35 2007 +0800

    glitz: fix a typo preventing build glitz backend from succeeding.

diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 5c8cc6b..b212a69 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -2233,7 +2233,7 @@ static const cairo_surface_backend_t cai
     NULL, /* show_glyphs */
 
     NULL, /* snapshot */
-    _cairo_glitz_surface_is_compatible,
+    _cairo_glitz_surface_is_similar,
 
     _cairo_glitz_surface_reset
 };


More information about the cairo-commit mailing list