[cairo-commit] 2 commits - configure.ac src/cairo-xlib-surface.c

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Wed Sep 17 12:20:32 PDT 2008


 configure.ac             |    2 +-
 src/cairo-xlib-surface.c |   19 ++++++-------------
 2 files changed, 7 insertions(+), 14 deletions(-)

New commits:
commit e6f66ef65bb347974e0ceb58351844ba63389a87
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Wed Sep 17 15:15:14 2008 -0400

    Require pixman 0.12.0

diff --git a/configure.ac b/configure.ac
index 2ffb7b0..a49bf9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,7 +419,7 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no)
 dnl ===========================================================================
 
 CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
-  pixman_REQUIRES="pixman-1 >= 0.11.2"
+  pixman_REQUIRES="pixman-1 >= 0.12.0"
   PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , [AC_MSG_RESULT(no)
   use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
   image_REQUIRES=$pixman_REQUIRES
commit 86485e76b7e9ef1621dcd516266898246711c0ca
Author: Søren Sandmann Pedersen <sandmann at redhat.com>
Date:   Wed Sep 17 15:14:16 2008 -0400

    [xlib] Use _cairo_matrix_to_pixman_matrix() to compute the XTransform
    
    The adjustments done to the pixman matrix also need to be done for
    XTransform. Since an XTransform is just a pixman_transform_t with
    another name, we can reuse the conversion function.

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index d6f4109..9da13f9 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -1267,25 +1267,18 @@ _cairo_xlib_surface_set_matrix (cairo_xlib_surface_t *surface,
 
     if (!surface->src_picture)
 	return CAIRO_STATUS_SUCCESS;
-
-    xtransform.matrix[0][0] = _cairo_fixed_16_16_from_double (matrix->xx);
-    xtransform.matrix[0][1] = _cairo_fixed_16_16_from_double (matrix->xy);
-    xtransform.matrix[0][2] = _cairo_fixed_16_16_from_double (matrix->x0);
-
-    xtransform.matrix[1][0] = _cairo_fixed_16_16_from_double (matrix->yx);
-    xtransform.matrix[1][1] = _cairo_fixed_16_16_from_double (matrix->yy);
-    xtransform.matrix[1][2] = _cairo_fixed_16_16_from_double (matrix->y0);
-
-    xtransform.matrix[2][0] = 0;
-    xtransform.matrix[2][1] = 0;
-    xtransform.matrix[2][2] = 1 << 16;
+    
+    /* Casting between pixman_transform_t and XTransform is safe because
+     * they happen to be the exact same type.
+     */
+    _cairo_matrix_to_pixman_matrix (matrix, (pixman_transform_t *)&xtransform);
 
     if (memcmp (&xtransform, &surface->xtransform, sizeof (XTransform)) == 0)
 	return CAIRO_STATUS_SUCCESS;
 
     if (!CAIRO_SURFACE_RENDER_HAS_PICTURE_TRANSFORM (surface))
 	return CAIRO_INT_STATUS_UNSUPPORTED;
-
+    
     XRenderSetPictureTransform (surface->dpy, surface->src_picture, &xtransform);
     surface->xtransform = xtransform;
 


More information about the cairo-commit mailing list