[cairo-commit] 5 commits - configure.in Makefile.am pixman/AUTHORS pixman/autogen.sh pixman/ChangeLog pixman/ChangeLog.libic pixman/ChangeLog.libpixregion pixman/ChangeLog.slim pixman/configure.in pixman/COPYING pixman/.gitignore pixman/INSTALL pixman/libpixman.pc.in pixman/Makefile.am pixman/NEWS pixman/README pixman/RELEASING pixman/src pixman/TODO pixman/update.pl src/cairo-clip.c src/cairo-glitz-surface.c src/cairo-image-surface.c src/cairoint.h src/cairo-pattern.c src/cairo-pdf-surface.c src/cairo-ps-surface.c src/cairo-surface.c src/cairo-surface-fallback.c src/cairo-svg-surface.c src/cairo-traps.c src/cairo-xlib-surface.c src/Makefile.am test/buffer-diff.c

Søren Sandmann Pedersen sandmann at kemper.freedesktop.org
Mon Jul 2 12:26:37 PDT 2007


 Makefile.am                        |    4 
 configure.in                       |   14 
 pixman/.gitignore                  |   20 
 pixman/AUTHORS                     |   19 
 pixman/COPYING                     |   92 
 pixman/ChangeLog                   | 1534 -------------
 pixman/ChangeLog.libic             |  300 --
 pixman/ChangeLog.libpixregion      |   47 
 pixman/ChangeLog.slim              |   39 
 pixman/INSTALL                     |    9 
 pixman/Makefile.am                 |    7 
 pixman/NEWS                        |  135 -
 pixman/README                      |   47 
 pixman/RELEASING                   |   81 
 pixman/TODO                        |   10 
 pixman/autogen.sh                  |   53 
 pixman/configure.in                |   92 
 pixman/libpixman.pc.in             |   10 
 pixman/src/.gitignore              |   13 
 pixman/src/Makefile.am             |   46 
 pixman/src/Makefile.win32          |   37 
 pixman/src/check-config.sh         |   17 
 pixman/src/check-pixmanint.sh      |   17 
 pixman/src/fbcompose.c             | 4354 -------------------------------------
 pixman/src/fbedge.c                |  303 --
 pixman/src/fbedgeimp.h             |  136 -
 pixman/src/fbmmx.c                 | 2821 -----------------------
 pixman/src/fbmmx.h                 |  298 --
 pixman/src/fbpict.c                | 2181 ------------------
 pixman/src/fbpict.h                |  355 ---
 pixman/src/fbtrap.c                |  236 --
 pixman/src/icblt.c                 |  951 --------
 pixman/src/icbltone.c              |  743 ------
 pixman/src/iccolor.c               |   83 
 pixman/src/icformat.c              |  220 -
 pixman/src/icimage.c               |  744 ------
 pixman/src/icimage.h               |  384 ---
 pixman/src/icint.h                 | 1070 ---------
 pixman/src/icpixels.c              |  116 
 pixman/src/icrect.c                |  404 ---
 pixman/src/icrop.h                 |  137 -
 pixman/src/icstipple.c             |   81 
 pixman/src/ictransform.c           |   63 
 pixman/src/ictrap.c                |  200 -
 pixman/src/ictri.c                 |  293 --
 pixman/src/icutil.c                |  287 --
 pixman/src/pixman-remap.h          |   81 
 pixman/src/pixman-xserver-compat.h |  125 -
 pixman/src/pixman.h                |  553 ----
 pixman/src/pixmanint.h             | 1093 ---------
 pixman/src/pixregion.c             | 2559 ---------------------
 pixman/src/pixregionint.h          |   74 
 pixman/src/renderedge.c            |  196 -
 pixman/src/renderedge.h            |  157 -
 pixman/update.pl                   |  159 -
 src/Makefile.am                    |    6 
 src/cairo-clip.c                   |   36 
 src/cairo-glitz-surface.c          |  126 -
 src/cairo-image-surface.c          |  316 +-
 src/cairo-pattern.c                |   84 
 src/cairo-pdf-surface.c            |   40 
 src/cairo-ps-surface.c             |    2 
 src/cairo-surface-fallback.c       |    5 
 src/cairo-surface.c                |    9 
 src/cairo-svg-surface.c            |   31 
 src/cairo-traps.c                  |    4 
 src/cairo-xlib-surface.c           |   43 
 src/cairoint.h                     |   14 
 test/buffer-diff.c                 |   16 
 69 files changed, 400 insertions(+), 24432 deletions(-)

New commits:
diff-tree ef967be630dd8d0bf81ad5889d6264bebe7631d4 (from parents)
Merge: 0c42dbb1925efb8228fb5246e0715bee0a5ded28 5c7d2d14d78e4dfb1ef6d2c40f0910f177e07360
Author: Søren Sandmann Pedersen <sandmann at annarchy.freedesktop.org>
Date:   Mon Jul 2 08:33:29 2007 -0700

    Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/cairo
    
    Conflicts:
    
    	pixman/src/fbcompose.c
    	pixman/src/icimage.c
    	pixman/src/pixmanint.h
    	pixman/src/pixregionint.h
    	src/cairo-clip.c

diff --cc pixman/src/pixman-remap.h
index 237b7bf,237b7bf..0000000
deleted file mode 100644,100644
diff --cc pixman/src/pixman.h
index feaf60a,491fc89..0000000
deleted file mode 100644,100644
diff --cc pixman/src/pixregion.c
index 4cd08e5,1ed3ad7..0000000
deleted file mode 100644,100644
diff --cc src/cairo-clip.c
index 6aa264e,8394077..abc5033
@@@ -623,10 -633,14 +623,14 @@@
      if (clip->path || clip->surface)
          return (cairo_rectangle_list_t*) &_cairo_rectangles_not_representable;
  
 -    n_boxes = clip->has_region ? pixman_region_num_rects (&clip->region) : 1;
 +    n_boxes = clip->has_region ? pixman_region_n_rects (&clip->region) : 1;
-     rectangles = malloc (sizeof (cairo_rectangle_t)*n_boxes);
-     if (rectangles == NULL)
-         return (cairo_rectangle_list_t*) &_cairo_rectangles_nil;
+     if (n_boxes > 0) {
+ 	rectangles = _cairo_malloc_ab (n_boxes, sizeof (cairo_rectangle_t));
+ 	if (rectangles == NULL)
+ 	    return (cairo_rectangle_list_t*) &_cairo_rectangles_nil;
+     } else {
+ 	rectangles = NULL;
+     }
  
      if (clip->has_region) {
          pixman_box16_t *boxes;
diff --cc src/cairo-glitz-surface.c
index 573ee81,de91fc7..7135180
@@@ -235,10 -194,10 +235,10 @@@
  
      /* XXX: we should eventually return images with negative stride,
         need to verify that libpixman have no problem with this first. */
 -    pf.bytes_per_line = (((width * format.bpp) / 8) + 3) & -4;
 +    pf.bytes_per_line = (((width * masks.bpp) / 8) + 3) & -4;
      pf.scanline_order = GLITZ_PIXEL_SCANLINE_ORDER_TOP_DOWN;
  
-     pixels = malloc (height * pf.bytes_per_line);
+     pixels = _cairo_malloc_ab (height, pf.bytes_per_line);
      if (!pixels)
  	return CAIRO_STATUS_NO_MEMORY;
  
diff --cc src/cairo-xlib-surface.c
index c70d640,3e77165..4c7a699
@@@ -1786,9 -1758,9 +1789,9 @@@
  	XRectangle *rects = NULL;
  	int n_boxes, i;
  
 -	n_boxes = pixman_region_num_rects (region);
 +	n_boxes = pixman_region_n_rects (region);
  	if (n_boxes > ARRAY_LENGTH (surface->embedded_clip_rects)) {
- 	    rects = malloc (sizeof(XRectangle) * n_boxes);
+ 	    rects = _cairo_malloc_ab (n_boxes, sizeof(XRectangle));
  	    if (rects == NULL)
  		return CAIRO_STATUS_NO_MEMORY;
  	}else {
diff-tree 0c42dbb1925efb8228fb5246e0715bee0a5ded28 (from e0cff78b34558f0eed29aff5d818d1591c7bf966)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Fri Jun 15 00:39:27 2007 -0400

    pixman_image_set_transform() returns FALSE on failure

diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 4bc8351..6ac0698 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1223,7 +1223,7 @@ _cairo_pattern_acquire_surface_for_gradi
     pixman_image_set_filter (pixman_image, PIXMAN_FILTER_BILINEAR, NULL, 0);
 
     _cairo_matrix_to_pixman_matrix (&pattern->base.matrix, &pixman_transform);
-    if (pixman_image_set_transform (pixman_image, &pixman_transform)) {
+    if (!pixman_image_set_transform (pixman_image, &pixman_transform)) {
 	cairo_surface_destroy (&image->base);
 	pixman_image_unref (pixman_image);
 	return CAIRO_STATUS_NO_MEMORY;
diff-tree e0cff78b34558f0eed29aff5d818d1591c7bf966 (from ca5760a289f287a7fafe36e69c6bdf47710c17e7)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Thu Jun 14 13:42:08 2007 -0400

    Fix bug where _cairo_image_surface_composite_trapezoids() computed the wrong stride for aliased masks

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 087f9d6..e3178ff 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -914,7 +914,7 @@ _cairo_image_surface_composite_trapezoid
 	format = PIXMAN_a1;
 	ret = 1;
 	assert (ret);
-	mask_stride = (width + 31)/8;
+	mask_stride = ((width + 31) / 8) & ~0x03;
 	mask_bpp = 1;
  	break;
     case CAIRO_ANTIALIAS_GRAY:
diff-tree ca5760a289f287a7fafe36e69c6bdf47710c17e7 (from 12cc32b674d3f1b705ef1a66bbce1ef8c4488daf)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Thu Jun 14 13:12:01 2007 -0400

    Fix initialization of radial patterns

diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index db71478..4bc8351 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -273,7 +273,7 @@ _cairo_pattern_init_radial (cairo_radial
 
     pattern->c1.x = _cairo_fixed_from_double (cx0);
     pattern->c1.y = _cairo_fixed_from_double (cy0);
-    pattern->radius2 = _cairo_fixed_from_double (fabs (radius0));
+    pattern->radius1 = _cairo_fixed_from_double (fabs (radius0));
     pattern->c2.x = _cairo_fixed_from_double (cx1);
     pattern->c2.y = _cairo_fixed_from_double (cy1);
     pattern->radius2 = _cairo_fixed_from_double (fabs (radius1));
diff-tree 12cc32b674d3f1b705ef1a66bbce1ef8c4488daf (from 9109946a1a7f9341e60da7358da6535c5fac52db)
Author: Søren Sandmann <sandmann at redhat.com>
Date:   Wed Jun 13 00:15:34 2007 -0400

    [pixman] Initial port to standalone pixman library.

diff --git a/Makefile.am b/Makefile.am
index 4410c02..0ec2404 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-DIST_SUBDIRS = pixman src boilerplate test perf doc util
-SUBDIRS = pixman src doc
+DIST_SUBDIRS = src boilerplate test perf doc util
+SUBDIRS = src doc
 # libpng is required for our test programs
 if CAIRO_HAS_PNG_FUNCTIONS
 SUBDIRS += boilerplate test perf
diff --git a/configure.in b/configure.in
index bef5d55..a521cc4 100644
--- a/configure.in
+++ b/configure.in
@@ -102,6 +102,7 @@ if test "x$PKG_CONFIG" = x; then
 	AC_MSG_ERROR([pkg-config >= $PKGCONFIG_REQUIRED required but not found (http://pkgconfig.freedesktop.org/)])
 fi
 
+
 dnl ===========================================================================
 dnl
 dnl cairo_cache_version should be increased every time that the backend
@@ -232,8 +233,15 @@ CAIRO_NONPKGCONFIG_LIBS="$LIBM"
 CAIRO_LDADD=""
 CAIRO_CFLAGS=$CAIRO_NONPKGCONFIG_CFLAGS
 CAIRO_LIBS=$CAIRO_NONPKGCONFIG_LIBS
-PIXMAN_CFLAGS=""
-PIXMAN_LDADD=""
+
+dnl ===========================================================================
+
+PKG_CHECK_MODULES(PIXMAN, pixman >= 0.9.2)
+
+CAIRO_NONPKGCONFIG_CFLAGS="PIXMAN_CFLAGS $CAIRO_NONPKGCONFIG_CFLAGS"
+CAIRO_NONPKGCONFIG_LIBS="PIXMAN_LIBS $CAIRO_NONPKGCONFIG_LIBS"
+CAIRO_CFLAGS="$PIXMAN_CFLAGS $CAIRO_CFLAGS"
+CAIRO_LIBS="$PIXMAN_LIBS $CAIRO_LIBS"
 
 dnl ===========================================================================
 
@@ -919,8 +927,6 @@ _EOF
 AC_CONFIG_FILES([
 Makefile
 boilerplate/Makefile
-pixman/Makefile
-pixman/src/Makefile
 src/Makefile
 test/Makefile
 test/pdiff/Makefile
diff --git a/pixman/.gitignore b/pixman/.gitignore
deleted file mode 100644
index 55c6a04..0000000
--- a/pixman/.gitignore
+++ /dev/null
@@ -1,20 +0,0 @@
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-config.cache
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-libpixman.pc
-libtool
-ltmain.sh
-releases
-stamp-h
-stamp-h.in
-stamp-h1
-*~
diff --git a/pixman/AUTHORS b/pixman/AUTHORS
deleted file mode 100644
index d858e59..0000000
--- a/pixman/AUTHORS
+++ /dev/null
@@ -1,19 +0,0 @@
-David R Bacon <dbacon at cis.ksu.edu> Fixes to compile on x86_64.
-Billy Biggs <vektor at dumbterm.net> Fix to use stdint datatypes.
-Dave Beckett <Dave.Beckett at bristol.ac.uk> Combined libpixregion, libic, and slim.
-Jakub Bogusz <qboosh at pld-linux.org> Fixes for 64-bit machines.
-Anders Carlsson <andersca at gnome.org> Build fixes. New accessor functions.
-Richard Henderson <rth at twiddle.net> "slim" macros for better shared libraries 
-Owen Taylor <otaylor at redhat.com> Support for both transform and repeat
-Keith Packard <keithp at keithp.com> The original implementation of the compositing code.
-David Reveman <c99drn at cs.umu.se> Byte-order, clipping and format fixes.
-Vladimir Vukicevic <vladimir at pobox.com> Bug fix.
-Bryan Worth <bryan at theworths.org> Cleanups to not depend on X header files.
-Carl Worth <carl at theworths.org> General maintenance. Original port from X server code.
-Richard Worth <richard at theworths.org> Build fixes for cygwin.
-
-and the "X Window System authors" (pixregion code)
-
-(Please let us know if we have missed anyone. I would be interested in
-having more precise attribution for the pixregion code if anyone knows
-who wrote that.)
diff --git a/pixman/COPYING b/pixman/COPYING
deleted file mode 100644
index 5d8dca6..0000000
--- a/pixman/COPYING
+++ /dev/null
@@ -1,92 +0,0 @@
-libpixregion
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its 
-documentation for any purpose and without fee is hereby granted, 
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in 
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-----------------------------------------------------------------------
-libic
-
-Copyright © 2001 Keith Packard
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation, and that the name of Keith Packard not be used in
-advertising or publicity pertaining to distribution of the software without
-specific, written prior permission.  Keith Packard makes no
-representations about the suitability of this software for any purpose.  It
-is provided "as is" without express or implied warranty.
-
-KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
-TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-----------------------------------------------------------------------
-slim
-
-slim is Copyright © 2003 Richard Henderson
-
-Permission to use, copy, modify, distribute, and sell this software
-and its documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Richard Henderson not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.  Richard Henderson
-makes no representations about the suitability of this software for
-any purpose.  It is provided "as is" without express or implied
-warranty.
-
-RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
diff --git a/pixman/ChangeLog b/pixman/ChangeLog
deleted file mode 100644
index 80949bd..0000000
--- a/pixman/ChangeLog
+++ /dev/null
@@ -1,1534 +0,0 @@
-2006-01-09  Anders Carlsson  <andersca at imendio.com>
-
-        * src/icimage.c:
-        (premultiply):
-        (INTERPOLATE_PIXEL_256):
-        Use uint32_t instead of uint;
-
-2006-01-04  Carl Worth  <cworth at cworth.org>
-
-	* Originally: 2005-10-10  David Reveman  <davidr at novell.com>
-
-	* src/fbcompose.c: (SourcePictureClassify), (fbFetchSolid),
-	(fbFetch), (fbFetchSourcePict), (fbFetchTransformed),
-	(fbFetchExternalAlpha), (fbCompositeRect):
-	* src/icimage.c: (_pixman_init_gradient),
-	(_pixman_create_source_image),
-	(pixman_image_create_linear_gradient),
-	(pixman_image_create_radial_gradient):
-	* src/icimage.h:
-
-	Some major performance improvements to the general composite code
-	used for gradients and transformed images. Like fetching of mask
-	scanline before source scanline so that only the necessary pixels
-	from source needs to be computed in case of gradients or
-	transformed images as source. This patch also include some
-	gradient specific fixes and performance improvement.
-
-2006-01-04  Carl Worth  <cworth at cworth.org>
-
-	* Originally: 2005-10-10  David Reveman  <davidr at novell.com>
-
-	* src/pixman.h: Add entries for gradient support.
-
-	* src/icint.h: Add PictureGradientColor.
-
-	* src/icimage.h:
-	* src/icimage.c: Add necessary functionality for gradient support.
-
-	* src/fbcompose.c: Enable gradient support.
-
-2005-11-21  Carl Worth  <cworth at cworth.org>
-
-	* src/pixman-remap.h: Remove duplicate definitions of
-	pixman_color_to_pixel and pixman_composite.
-
-2005-11-18  Carl Worth  <cworth at cworth.org>
-
-	* src/pixman-remap.h: Remove spurios INT_ prefixes which break the
-	build with very recent binutils.
-
-2005-10-09  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/icimage.h: Make space for the new bits needed by expand.
-
-2005-10-09  Billy Biggs  <vektor at dumbterm.net>
-
-	reviewed by: davidr, cworth, otaylor
-
-	* src/pixman.h: Add extended repeat modes, copied from XRender.
-	* src/icimage.c: (pixman_image_init), (pixman_image_set_repeat),
-	(FbClipImageSrc): Cleanup to use the new repeat modes.
-	* src/icrect.c: (pixman_fill_rectangles): Be explicit about which
-	repeat mode we want.
-
-2005-09-18  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbmmx.c: Only include xmmintrin.h if USE_SSE is defined.
-
-2005-09-15  Billy Biggs  <vektor at dumbterm.net>
-
-	Bug #4414, reviewed by otaylor, cworth.
-
-	* src/fbmmx.c: Remove CPU detection code.
-	* src/fbpict.c (detectCPUFeatures), (fbHaveMMX): Move CPU
-	detection code out of the MMX file and into the generic code to
-	avoid compiling it with -mmmx and -msse.  Using these options
-	causes gcc to use MMX and SSE instructions in the CPU detection
-	code which causes SIGILLs on older processors.
-
-2005-08-28  Owen Taylor  <otaylor at redhat.com>
-
-	Bug #4260, Reviewed by B. Biggs
- 
- 	* src/fbcompose.c (fbStore_a8b8g8r8, fbStore_x8b8g8r8): Use & not
- 	&& for bitwise AND.
- 
- 	* src/fbpict.h (fbComposeGetSolid) src/fbpict.c src/fbmmx.c: Take
- 	'dest' as an argument, if pict and dest don't match for RGB, BGR,
- 	swap result.
-	
-2005-08-28  Owen Taylor  <otaylor at redhat.com>
-
-	* src/fbmmx.c (detectCPUFeatures): Use local labels rather than
-	global labels in the assembly, to be robust if the code is inlined
-	in multiple places. (#4283, Reported by Marco Manfredini)
-
-2005-08-27  Billy Biggs  <vektor at dumbterm.net>
-
-	Some fixes for warnings from sparse (Part of bug #4208,
-	Kjartan Maraas)
-
-	* src/fbcompose.c (fetchProcForPicture),
-	(fetchPixelProcForPicture), (storeProcForPicture), (fbFetchSolid),
-	(fbFetch), (fbFetchTransformed), (fbStore), (fbStoreExternalAlpha),
-	(fbCompositeRect):
-	* src/fbpict.c (pixman_composite):
-	* src/icbltone.c (fbLaneTable), (fbBltOne):
-	* src/icimage.c (pixman_image_init), (pixman_image_set_transform):
-	* src/icrect.c (pixman_fill_rectangles):
-	* src/ictrap.c (FbCreateAlphaPicture):   Use NULL not 0.
-
-2005-08-27  Owen Taylor  <otaylor at redhat.com>
-
-	* src/fbmmx.c (detectCPUFeatures): Make the code work with
-	-fomit-frame-pointer by making sure that %esp isn't modified at
-	the point where we access output operands. (#4269, Patch from
-	Ronald Wahl)
-	
-2005-08-22  Owen Taylor  <otaylor at redhat.com>
-
-	* src/pixregion.c (pixman_region_union_rect): When width/height
-	are 0, copy the src to the dest, don't just return. (#3017)
-
-2005-08-21  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/pixman-remap.h: Fix a typo in the last change.
-
-2005-08-21  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbpict.c: Remove warning about fbCompositeTrans_0888xnx0888 not
-	being tested on big-endian, it's not helpful at this point.
-
-	* src/pixman-remap.h: Only define _cairo_pixman_have_mmx for fbHaveMMX
-	when the symbol will actually exist.
-
-2005-08-21  Billy Biggs  <vektor at dumbterm.net>
-
-	Fix for bug #4140:
-
-	* src/icrect.c: (pixman_fill_rect_8bpp): Dereference the pixel value
-	correctly on big endian systems.
-
-2005-08-18  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbmmx.c: (mmxCombineMaskU), (mmxCombineOverU): Special case
-	alpha values of 0 and 0xff.
-	(fbCompositeSrc_8888x8888mmx): Add an MMX implementation for
-	a common operation when using pixman.
-
-	* src/fbmmx.h: Prototype for the new function.
-
-	* src/fbpict.c: (fbComposite): Call the new function where
-	appropriate.
-
-2005-08-18  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbcompose.c: (fbFetchTransformed): Special case projective
-	transforms so we can avoid doing the expensive 64-bit math.
-	Unroll the bilinear interpolation loops for an extra boost.
-
-2005-08-18  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbmmx.c: (fbCompositeSolidMaskSrc_nx8x8888mmx): For the source
-	operator, the output should be cleared if the mask is zero.  This
-	fixes the MMX code to match the fbcompose code.
-
-	* src/fbpict.c: (pixman_composite): Fix a logic mistake that caused
-	the MMX functions not to be used in many cases.
-
-2005-08-17  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/pixman-remap.h: Only mangle exported symbols.  This is
-	sufficient and makes debugging a lot easier.
-
-2005-08-16  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/Makefile.am: Fix a typo in the last commit.
-
-2005-08-16  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/Makefile.am: Split the MMX code into a separate libtool
-	library to avoid applying the MMX CFLAGS to all of the pixman
-	code.  Idea and code from Owen Taylor.
-
-	* src/pixman-remap.h: Update the mangling header file to include
-	the MMX symbols.
-
-2005-08-16  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbmmx.c: (shift), (negate), (pix_multiply), (pix_add),
-	(expand_alpha), (expand_alpha_rev), (invert_colors), (over),
-	(over_rev_non_pre), (in), (in_over), (load8888), (pack8888),
-	(store8888), (expand565), (expand8888), (pack565), (pix_add_mul),
-	(mmxCombineMaskU), (mmxCombineOverU), (mmxCombineOverReverseU),
-	(mmxCombineInU), (mmxCombineInReverseU), (mmxCombineOutU),
-	(mmxCombineOutReverseU), (mmxCombineAtopU),
-	(mmxCombineAtopReverseU), (mmxCombineXorU), (mmxCombineAddU),
-	(mmxCombineSaturateU), (mmxCombineSrcC), (mmxCombineOverC),
-	(mmxCombineOverReverseC), (mmxCombineInC), (mmxCombineInReverseC),
-	(mmxCombineOutC), (mmxCombineOutReverseC), (mmxCombineAtopC),
-	(mmxCombineAtopReverseC), (mmxCombineXorC), (mmxCombineAddC),
-	(fbComposeSetupMMX), (fbCompositeSolid_nx8888mmx),
-	(fbCompositeSolid_nx0565mmx),
-	(fbCompositeSolidMask_nx8888x8888Cmmx),
-	(fbCompositeSrc_8888x8x8888mmx), (fbCompositeSrc_x888x8x8888mmx),
-	(fbCompositeSolidMask_nx8x8888mmx),
-	(fbCompositeSolidMaskSrc_nx8x8888mmx),
-	(fbCompositeSolidMask_nx8x0565mmx),
-	(fbCompositeSrc_8888RevNPx0565mmx),
-	(fbCompositeSrc_8888RevNPx8888mmx),
-	(fbCompositeSolidMask_nx8888x0565Cmmx),
-	(fbCompositeSrcAdd_8000x8000mmx), (fbCompositeSrcAdd_8888x8888mmx),
-	(fbSolidFillmmx), (fbCopyAreammx), (fbCompositeCopyAreammx),
-	(detectCPUFeatures), (fbHaveMMX):
-	* src/fbmmx.h: Port MMX code from xserver to pixman.
-
-	* src/fbpict.c: (fbOver), (fbOver24), (fbIn), (fbIn24),
-	(fbCompositeSolidMask_nx8x8888),
-	(fbCompositeSolidMask_nx8888x8888C),
-	(fbCompositeSolidMask_nx8x0888), (fbCompositeSolidMask_nx8x0565),
-	(fbCompositeSolidMask_nx8888x0565),
-	(fbCompositeSolidMask_nx8888x0565C), (fbCompositeSrc_8888x8888),
-	(fbCompositeSrc_8888x0888), (fbCompositeSrc_8888x0565),
-	(fbCompositeSrcAdd_8000x8000), (fbCompositeSrcAdd_8888x8888),
-	(fbCompositeSrcAdd_1000x1000), (fbCompositeSolidMask_nx1xn),
-	(fbCompositeTrans_0565xnx0565), (fbCompositeTrans_0888xnx0888),
-	(fbCompositeSrcSrc_nxn), (pixman_composite): Add an fbpict.c ported
-	from the latest in xserver/fb, including hooks to the MMX code
-	where appropriate.  This replaces the old ic.c file.
-
-	* src/ic.c: Replaced by fbpict.c.
-
-	* src/icint.h: Move some X server macros from fbpict.c up into
-	icint.h to keep the diff small.
-
-	* src/Makefile.am: Add fbmmx and fbpict.c, remove ic.c.
-
-	* configure.in: Add a check for the MMX intrinsics.  gcc >= 3.4
-	is required.
-
-2005-08-12  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/icrect.c: (pixman_fill_rect_1bpp): Fix to be correct for
-	arbitrary xDst values.
-
-2005-08-11  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/icrect.c: (pixman_fill_rect_1bpp), (pixman_color_rects):
-	Add support for filling 1bpp images (used to clear A1 masks).
-
-2005-08-10  Billy Biggs  <vektor at dumbterm.net>
-
-	reviewed by: cworth and Jeff Muizelaar at various stages
-
-	* src/fbcompose.c: (PictureTransformPoint3d), (fbFetch_a8r8g8b8),
-	(fbFetch_x8r8g8b8), (fbFetch_a8b8g8r8), (fbFetch_x8b8g8r8),
-	(fbFetch_r8g8b8), (fbFetch_b8g8r8), (fbFetch_r5g6b5),
-	(fbFetch_b5g6r5), (fbFetch_a1r5g5b5), (fbFetch_x1r5g5b5),
-	(fbFetch_a1b5g5r5), (fbFetch_x1b5g5r5), (fbFetch_a4r4g4b4),
-	(fbFetch_x4r4g4b4), (fbFetch_a4b4g4r4), (fbFetch_x4b4g4r4),
-	(fbFetch_a8), (fbFetch_r3g3b2), (fbFetch_b2g3r3),
-	(fbFetch_a2r2g2b2), (fbFetch_a2b2g2r2), (fbFetch_c8), (fbFetch_a4),
-	(fbFetch_r1g2b1), (fbFetch_b1g2r1), (fbFetch_a1r1g1b1),
-	(fbFetch_a1b1g1r1), (fbFetch_c4), (fbFetch_a1), (fbFetch_g1),
-	(fetchProcForPicture), (fbFetchPixel_a8r8g8b8),
-	(fbFetchPixel_x8r8g8b8), (fbFetchPixel_a8b8g8r8),
-	(fbFetchPixel_x8b8g8r8), (fbFetchPixel_r8g8b8),
-	(fbFetchPixel_b8g8r8), (fbFetchPixel_r5g6b5),
-	(fbFetchPixel_b5g6r5), (fbFetchPixel_a1r5g5b5),
-	(fbFetchPixel_x1r5g5b5), (fbFetchPixel_a1b5g5r5),
-	(fbFetchPixel_x1b5g5r5), (fbFetchPixel_a4r4g4b4),
-	(fbFetchPixel_x4r4g4b4), (fbFetchPixel_a4b4g4r4),
-	(fbFetchPixel_x4b4g4r4), (fbFetchPixel_a8), (fbFetchPixel_r3g3b2),
-	(fbFetchPixel_b2g3r3), (fbFetchPixel_a2r2g2b2),
-	(fbFetchPixel_a2b2g2r2), (fbFetchPixel_c8), (fbFetchPixel_a4),
-	(fbFetchPixel_r1g2b1), (fbFetchPixel_b1g2r1),
-	(fbFetchPixel_a1r1g1b1), (fbFetchPixel_a1b1g1r1),
-	(fbFetchPixel_c4), (fbFetchPixel_a1), (fbFetchPixel_g1),
-	(fetchPixelProcForPicture), (fbStore_a8r8g8b8), (fbStore_x8r8g8b8),
-	(fbStore_a8b8g8r8), (fbStore_x8b8g8r8), (fbStore_r8g8b8),
-	(fbStore_b8g8r8), (fbStore_r5g6b5), (fbStore_b5g6r5),
-	(fbStore_a1r5g5b5), (fbStore_x1r5g5b5), (fbStore_a1b5g5r5),
-	(fbStore_x1b5g5r5), (fbStore_a4r4g4b4), (fbStore_x4r4g4b4),
-	(fbStore_a4b4g4r4), (fbStore_x4b4g4r4), (fbStore_a8),
-	(fbStore_r3g3b2), (fbStore_b2g3r3), (fbStore_a2r2g2b2),
-	(fbStore_c8), (fbStore_a4), (fbStore_r1g2b1), (fbStore_b1g2r1),
-	(fbStore_a1r1g1b1), (fbStore_a1b1g1r1), (fbStore_c4), (fbStore_a1),
-	(fbStore_g1), (storeProcForPicture), (fbCombineMaskU),
-	(fbCombineClear), (fbCombineSrcU), (fbCombineOverU),
-	(fbCombineOverReverseU), (fbCombineInU), (fbCombineInReverseU),
-	(fbCombineOutU), (fbCombineOutReverseU), (fbCombineAtopU),
-	(fbCombineAtopReverseU), (fbCombineXorU), (fbCombineAddU),
-	(fbCombineSaturateU), (fbCombineDisjointOutPart),
-	(fbCombineDisjointInPart), (fbCombineDisjointGeneralU),
-	(fbCombineDisjointOverU), (fbCombineDisjointInU),
-	(fbCombineDisjointInReverseU), (fbCombineDisjointOutU),
-	(fbCombineDisjointOutReverseU), (fbCombineDisjointAtopU),
-	(fbCombineDisjointAtopReverseU), (fbCombineDisjointXorU),
-	(fbCombineConjointOutPart), (fbCombineConjointInPart),
-	(fbCombineConjointGeneralU), (fbCombineConjointOverU),
-	(fbCombineConjointOverReverseU), (fbCombineConjointInU),
-	(fbCombineConjointInReverseU), (fbCombineConjointOutU),
-	(fbCombineConjointOutReverseU), (fbCombineConjointAtopU),
-	(fbCombineConjointAtopReverseU), (fbCombineConjointXorU),
-	(fbCombineMaskC), (fbCombineMaskValueC), (fbCombineMaskAlphaC),
-	(fbCombineClearC), (fbCombineSrcC), (fbCombineOverC),
-	(fbCombineOverReverseC), (fbCombineInC), (fbCombineInReverseC),
-	(fbCombineOutC), (fbCombineOutReverseC), (fbCombineAtopC),
-	(fbCombineAtopReverseC), (fbCombineXorC), (fbCombineAddC),
-	(fbCombineSaturateC), (fbCombineDisjointGeneralC),
-	(fbCombineDisjointOverC), (fbCombineDisjointInC),
-	(fbCombineDisjointInReverseC), (fbCombineDisjointOutC),
-	(fbCombineDisjointOutReverseC), (fbCombineDisjointAtopC),
-	(fbCombineDisjointAtopReverseC), (fbCombineDisjointXorC),
-	(fbCombineConjointGeneralC), (fbCombineConjointOverC),
-	(fbCombineConjointOverReverseC), (fbCombineConjointInC),
-	(fbCombineConjointInReverseC), (fbCombineConjointOutC),
-	(fbCombineConjointOutReverseC), (fbCombineConjointAtopC),
-	(fbCombineConjointAtopReverseC), (fbCombineConjointXorC),
-	(fbFetchSolid), (fbFetch), (gradientPixel), (fbFetchSourcePict),
-	(fbFetchTransformed), (fbFetchExternalAlpha), (fbStore),
-	(fbStoreExternalAlpha), (fbCompositeRect),
-	(pixman_compositeGeneral): Port fbcompose.c from xserver into
-	pixman.  Add #defines for gradients, convolution filters, and
-	indexed colour formats to keep the patch small.  Use pixman
-	regions instead of X server regions as appropriate.
-
-	* src/iccompose.c: Remove iccompose.c, replaced by fbcompose.c.
-
-	* src/fbpict.h: Add a slightly-trimmed version of fbpict.h from
-	xserver/fb to make the port smaller and cleaner.
-	* src/ic.c: Use the redundant fbpict.h defines and add in the
-	struct for indexed colour support.
-	* src/icimage.h: Remove defines now in fbpict.h.
-	* src/pixman-xserver-compat.h: Add some constants and types
-	required by fbcompose.c
-
-	* src/Makefile.am: Add fbcompose.c and fbpict.h, remove iccompose.c.
-
-2005-08-10  Keith Packard  <keithp at keithp.com>
-
-	* src/pixregion.c: (pixman_region_union_rect):
-	Union with empty rectangle should yield SUCCESS, not FAILURE
-
-2005-08-06  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/iccompose.c: (fbCombineMaskAlphaC), (fbCombineAtopC),
-	(fbCombineXorC), (fbCombineSaturateU), (fbCombineSaturateC),
-	(fbCombineDisjointGeneralC), (fbCombineConjointGeneralC):
-	Fix problems in render fb implementation found by rendercheck:
-	- fbCombineSaturate was pointed at fbCombineDisjointOver, instead of
-	  fbCombineDisjointOverReverse as it should.  Instead, point
-	  fbCombineDisjointOverReverse at fbCombineSaturate (which is likely
-	  to be faster).
-	- fix previously-unused fbCombineSaturate implementation.
-	- fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC.  Make
-	  it do what it's supposed to (return a cs.alpha).
-	- fbCombineAtopC didn't invert the source alpha value.
-	- fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also
-	  source alpha wasn't treated in a component fashion.
-
-	From anholt.
-
-
-2005-08-06  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/iccompose.c: (fbFetch_r8g8b8):
-	Temporarily disable the 24bpp WORKING_UNALIGNED_INT because of a crash
-	when using electric-fence when accessing hte last pixel of a drawable
-	(last pixel is 3 bytes, read it as a 4 byte word, and you're reading one
-	 extra pixel, which doesn't normally matter, but does in a few rare cases).
-	Should be easy to work around, but that will come later.
-
-	From jaymz
-
-2005-08-05  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/pixman-xserver-compat.h: Fix fbGetDrawable
-
-	Patch from Billy Biggs <vektor at dumbterm.net>.
-
-2005-08-05  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/icint.h: Fix some of the 4 bit per channel PICT definitions
-
-	Patch from Billy Biggs <vektor at dumbterm.net>.
-
-2005-08-05  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbCompositeSolidMask_nx8x8888),
-	(fbCompositeSolidMask_nx8x0888), (fbCompositeSolidMask_nx8x0565),
-	(fbCompositeSolidMask_nx8888x0565),
-	(fbCompositeSolidMask_nx8888x0565C), (fbCompositeSrc_8888x0565),
-	(fbCompositeTrans_0565xnx0565), (fbCompositeTrans_0888xnx0888),
-	(fbCompositeSrcSrc_nxn), (pixman_composite):
-	Fix up the fast-path compositing operators; those are useful
-	for sources without alpha, but can't be used for sources with
-	alpha.  Also, replaced fbCompositeSrcSrc_nxn with call to
-	fbBlt as this function must handle 1, 4, 8, 16, 24, 32 bpp
-	objects.  Would be nice to optimize fbBlt for common cases
-	involving 8, 16, 24 and 32bpp.
-
-	From Keith Packard.
-
-2005-08-01  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/fbedge.c: (clip255), (add_saturate_8),
-	(fbRasterizeEdges8):  Optimize spans where the same value is
-	being added to multiple pixels.  This improves the speed of
-	rasterizing wide trapezoids.
-
-	* src/icint.h: Add an INLINE macro that matches the one from
-	fbpict.h in xserver/fb.
-
-2005-08-01  Amaury Jacquot  <sxpert at esitcom.org>
-	
-	* NEWS: fix typo
-
-2005-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbCompositeSolidMask_nx8x0888),
-	(fbCompositeSolidMask_nx8x0565), (fbCompositeSolidMask_nx1xn),
-	(fbCompositeTrans_0565xnx0565), (fbCompositeTrans_0888xnx0888),
-	(fbCompositeSrcSrc_nxn), (pixman_composite):
-	* src/icblt.c: (fbBlt):
-	* src/iccompose.c: (fbFetch_r8g8b8):
-	Finish up merging the optimization work from jaymz.
-
-2005-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/iccompose.c: (fbCombineMaskAlphaU),
-	(fbCombineDisjointOutPart), (fbCombineDisjointInPart),
-	(fbCombineConjointOutPart), (fbCombineConjointInPart),
-	(fbStore_a8r8g8b8), (fbStore_x8r8g8b8), (fbStore_a8b8g8r8),
-	(fbStore_x8b8g8r8), (fbStore_r8g8b8), (fbStore_b8g8r8),
-	(fbStore_r5g6b5), (fbStore_b5g6r5), (fbStore_a1r5g5b5),
-	(fbStore_x1r5g5b5), (fbStore_a1b5g5r5), (fbStore_x1b5g5r5),
-	(fbStore_a4r4g4b4), (fbStore_x4r4g4b4), (fbStore_a4b4g4r4),
-	(fbStore_x4b4g4r4), (fbStore_a8), (fbStore_r3g3b2),
-	(fbStore_b2g3r3), (fbStore_a2r2g2b2), (fbStore_a4),
-	(fbStore_r1g2b1), (fbStore_b1g2r1), (fbStore_a1r1g1b1),
-	(fbStore_a1b1g1r1), (fbStore_a1), (fbFetch_external),
-	(fbStore_external), (fbFetch_transform), (fbFetcha_transform):
-	s/uint(8|16|32)_t/CARD(8|16|32)/
-
-2005-07-30  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbCompositeSolidMask_nx8x0888),
-	(fbCompositeSolidMask_nx8x0565), (fbCompositeTrans_0565xnx0565),
-	(fbCompositeTrans_0888xnx0888), (fbCompositeSrcSrc_nxn),
-	(pixman_composite):
-	Add some optimizations from jaymz. Also adds some compile warnings
-	that will hopefully go away as we continue merging.
-
-2005-07-28  Carl Worth  <cworth at cworth.org>
-
-	* configure.in: Add -head to LIBPIXMAN_VERSION after tagging with
-	SNAPSHOT_0_1_6.
-
-2005-07-28  Carl Worth  <cworth at cworth.org>
-
-	* NEWS: Add notes for snapshot 0.1.6.
-	
-	* configure.in: Increment version to 0.1.6.
-
-2005-07-27  Owen Taylor  <otaylor at redhat.com>
-
-	* src/icint.h (FbGetStipPixels): Fix units for stride return
-	to be FbStip-sized.
-
-2005-07-16  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (pixman_composite):
-	Add call to fbCompositeSrcSrc_nxn that I missed.
-
-2005-07-14  Carl Worth  <cworth at cworth.org>
-
-	* src/icimage.c: (pixman_image_set_component_alpha): Whitespace fix.
-	(pixman_image_destroy): Fix leak of the clip region associated
-	with an image. (NOTE: xserver/render doesn't have the same bug
-	since it has FreePicture that calls into both DestroyPicture and
-	DestroyPictureClip separately).
-
-2005-07-09  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbIn24), (fbCompositeTrans_0565xnx0565),
-	(fbCompositeSrcSrc_nxn), (pixman_composite):
-	Begin merging in newer fb code.
-	
-	The code comes from keithp:
-	  Initial import of Composite extension along with
-	  name change from Apportion.
-	  Added some accelerated code to fbpict to make this initial
-	  hack a bit faster.  "real" extension bits to follow.
-
-2005-07-09  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbCompositeSolidMask_nx8x8888),
-	(fbCompositeSolidMask_nx8888x8888C),
-	(fbCompositeSolidMask_nx8x0888), (fbCompositeSolidMask_nx8x0565),
-	(fbCompositeSolidMask_nx8888x0565C), (fbCompositeSrc_8888x8888),
-	(fbCompositeSrc_8888x0888), (fbCompositeSrc_8888x0565),
-	(fbCompositeSrc_0565x0565), (fbCompositeSrcAdd_8000x8000),
-	(fbCompositeSrcAdd_8888x8888), (fbCompositeSrcAdd_1000x1000),
-	(fbCompositeSolidMask_nx1xn), (pixman_composite):
-	More misc merging. Mostly s/pixman_composite/fbComposite/.
-
-2005-07-09  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbOver), (fbOver24), (fbIn),
-	(pixman_compositeSolidMask_nx8x8888),
-	(pixman_compositeSolidMask_nx8888x8888C),
-	(pixman_compositeSolidMask_nx8x0888),
-	(pixman_compositeSolidMask_nx8x0565),
-	(pixman_compositeSolidMask_nx8888x0565C),
-	(pixman_compositeSrc_8888x8888), (pixman_compositeSrc_8888x0888),
-	(pixman_compositeSrc_8888x0565), (pixman_compositeSrc_0565x0565),
-	(pixman_compositeSrcAdd_8000x8000),
-	(pixman_compositeSrcAdd_8888x8888),
-	(pixman_compositeSrcAdd_1000x1000),
-	(pixman_compositeSolidMask_nx1xn), (pixman_composite):
-	More misc merging. Mostly stuff like s/uint32_t/CARD32/.
-
-2005-06-25  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (fbOver):
-	* src/icblt.c: (fbBlt), (fbBlt24Line), (fbBlt24), (fbBltOdd),
-	(fbBltOdd24), (fbBltStip):
-	* src/icbltone.c: (fbBltOne):
-	* src/iccompose.c: (fbCombineMaskU), (fbCombineMaskC),
-	(fbCombineMaskValueC), (fbCombineMaskAlphaC), (fbCombineOverU),
-	(fbCombineOverC), (fbCombineOverReverseU), (fbCombineOverReverseC),
-	(fbCombineInU), (fbCombineInC), (fbCombineInReverseU),
-	(fbCombineInReverseC), (fbCombineOutU), (fbCombineOutC),
-	(fbCombineOutReverseU), (fbCombineOutReverseC), (fbCombineAtopU),
-	(fbCombineAtopC), (fbCombineAtopReverseU), (fbCombineAtopReverseC),
-	(fbCombineXorU), (fbCombineXorC), (fbCombineAddU), (fbCombineAddC),
-	(fbCombineDisjointGeneralU), (fbCombineDisjointGeneralC),
-	(fbCombineDisjointOverU), (fbCombineConjointGeneralU),
-	(fbCombineConjointGeneralC), (fbCombineConjointOverU),
-	(fbFetch_a8r8g8b8), (fbFetch_x8r8g8b8), (fbFetch_a8b8g8r8),
-	(fbFetch_x8b8g8r8), (fbFetch_r8g8b8), (fbFetch_b8g8r8),
-	(fbFetch_r5g6b5), (fbFetch_b5g6r5), (fbFetch_a1r5g5b5),
-	(fbFetch_x1r5g5b5), (fbFetch_a1b5g5r5), (fbFetch_x1b5g5r5),
-	(fbFetch_a4r4g4b4), (fbFetch_x4r4g4b4), (fbFetch_a4b4g4r4),
-	(fbFetch_x4b4g4r4), (fbFetch_a8), (fbFetcha_a8), (fbFetch_r3g3b2),
-	(fbFetch_b2g3r3), (fbFetch_a2r2g2b2), (fbFetch_a4), (fbFetcha_a4),
-	(fbFetch_r1g2b1), (fbFetch_b1g2r1), (fbFetch_a1r1g1b1),
-	(fbFetch_a1b1g1r1), (fbFetcha_a1), (fbFetch_a1),
-	(fbBuildCompositeOperand), (pixman_compositeGeneral):
-	* src/icint.h:
-	* src/icrop.h:
-	* src/icutil.c:
-	* src/pixman-xserver-compat.h:
-
-	Merge over most of the low-hanging renames from xserver/fb.
-
-2005-06-25  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/icint.h:
-	Fix broken build on older gcc's caused by overzealous s/IC_/FB_/g
-
-2005-06-24  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c:
-	* src/icblt.c:
-	* src/icbltone.c:
-	* src/iccolor.c:
-	* src/iccompose.c:
-	* src/icformat.c:
-	* src/icimage.c:
-	* src/icimage.h:
-	* src/icint.h:
-	* src/icpixels.c:
-	* src/icrect.c:
-	* src/icrop.h:
-	* src/icstipple.c:
-	* src/ictrap.c:
-	* src/ictri.c:
-	* src/icutil.c:
-	* src/pixman-xserver-compat.h:
-
-	s/Ic/Fb/g
-	This gets read of most of the [Ii][cC]'s the rest will probably dealt
-	with on a case by case basis.
-	
-	trimmed function list again.
-
-2005-06-24  Jeff Muizelaar <jeff at infidigm.net>
-
-	* src/ic.c:
-	* src/icblt.c:
-	* src/icbltone.c:
-	* src/iccompose.c:
-	* src/icimage.h:
-	* src/icint.h:
-	* src/icrop.h:
-	* src/icstipple.c:
-	* src/icutil.c:
-	
-	selective s/Ic/fb/g.
-
-	I took out the list of functions because it was ridiculously long.
-
-2005-06-24  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (pixman_compositeSrcAdd_1000x1000),
-	(pixman_compositeSolidMask_nx1xn):
-	* src/icblt.c: (IcBlt), (IcBlt24Line), (IcBltOdd), (IcSetBltOdd),
-	(IcBltStip):
-	* src/icbltone.c: (IcBltOne), (IcBltOne24):
-	* src/icint.h:
-	* src/icpixels.c: (IcPixelsCreate):
-	* src/icrop.h:
-	* src/icstipple.c: (IcTransparentSpan):
-	* src/icutil.c: (IcReplicatePixel):
-	* src/pixman-xserver-compat.h:
-	s/IC_/FB_/g
-	
-	* src/pixman.h:
-	add #define FB_BITS IC_BITS so that FB_BITS get defined early enough
-
-2005-06-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/iccompose.c: (fbCombineClear), (fbCombineSrcU),
-	(fbCombineSrcC), (fbCombineDst), (fbCombineOverU),
-	(fbCombineOverC), (fbCombineOverReverseU), (fbCombineOverReverseC),
-	(fbCombineInU), (fbCombineInC), (fbCombineInReverseU),
-	(fbCombineInReverseC), (fbCombineOutU), (fbCombineOutC),
-	(fbCombineOutReverseU), (fbCombineOutReverseC), (fbCombineAtopU),
-	(fbCombineAtopC), (fbCombineAtopReverseU), (fbCombineAtopReverseC),
-	(fbCombineXorU), (fbCombineXorC), (fbCombineAddU), (fbCombineAddC),
-	(fbCombineDisjointOverU), (fbCombineDisjointOverC),
-	(fbCombineDisjointOverReverseU), (fbCombineDisjointOverReverseC),
-	(fbCombineDisjointInU), (fbCombineDisjointInC),
-	(fbCombineDisjointInReverseU), (fbCombineDisjointInReverseC),
-	(fbCombineDisjointOutU), (fbCombineDisjointOutC),
-	(fbCombineDisjointOutReverseU), (fbCombineDisjointOutReverseC),
-	(fbCombineDisjointAtopU), (fbCombineDisjointAtopC),
-	(fbCombineDisjointAtopReverseU), (fbCombineDisjointAtopReverseC),
-	(fbCombineDisjointXorU), (fbCombineDisjointXorC),
-	(fbCombineConjointOverU), (fbCombineConjointOverC),
-	(fbCombineConjointOverReverseU), (fbCombineConjointOverReverseC),
-	(fbCombineConjointInU), (fbCombineConjointInC),
-	(fbCombineConjointInReverseU), (fbCombineConjointInReverseC),
-	(fbCombineConjointOutU), (fbCombineConjointOutC),
-	(fbCombineConjointOutReverseU), (fbCombineConjointOutReverseC),
-	(fbCombineConjointAtopU), (fbCombineConjointAtopC),
-	(fbCombineConjointAtopReverseU), (fbCombineConjointAtopReverseC),
-	(fbCombineConjointXorU), (fbCombineConjointXorC):
-
-	s/IcCombine/fbCombine/
-
-2005-06-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/iccompose.c: (IcCombineMaskU), (IcCombineMaskC),
-	(IcCombineMaskValueC), (IcCombineMaskAlphaU),
-	(IcCombineMaskAlphaC), (IcCombineClear), (IcCombineSrcU),
-	(IcCombineSrcC), (IcCombineDst), (IcCombineOverU),
-	(IcCombineOverC), (IcCombineOverReverseU), (IcCombineOverReverseC),
-	(IcCombineInU), (IcCombineInC), (IcCombineInReverseU),
-	(IcCombineInReverseC), (IcCombineOutU), (IcCombineOutC),
-	(IcCombineOutReverseU), (IcCombineOutReverseC), (IcCombineAtopU),
-	(IcCombineAtopC), (IcCombineAtopReverseU), (IcCombineAtopReverseC),
-	(IcCombineXorU), (IcCombineXorC), (IcCombineAddU), (IcCombineAddC),
-	(IcCombineDisjointGeneralU), (IcCombineDisjointGeneralC),
-	(IcCombineDisjointOverU), (IcCombineDisjointOverC),
-	(IcCombineDisjointOverReverseU), (IcCombineDisjointOverReverseC),
-	(IcCombineDisjointInU), (IcCombineDisjointInC),
-	(IcCombineDisjointInReverseU), (IcCombineDisjointInReverseC),
-	(IcCombineDisjointOutU), (IcCombineDisjointOutC),
-	(IcCombineDisjointOutReverseU), (IcCombineDisjointOutReverseC),
-	(IcCombineDisjointAtopU), (IcCombineDisjointAtopC),
-	(IcCombineDisjointAtopReverseU), (IcCombineDisjointAtopReverseC),
-	(IcCombineDisjointXorU), (IcCombineDisjointXorC),
-	(IcCombineConjointGeneralU), (IcCombineConjointGeneralC),
-	(IcCombineConjointOverU), (IcCombineConjointOverC),
-	(IcCombineConjointOverReverseU), (IcCombineConjointOverReverseC),
-	(IcCombineConjointInU), (IcCombineConjointInC),
-	(IcCombineConjointInReverseU), (IcCombineConjointInReverseC),
-	(IcCombineConjointOutU), (IcCombineConjointOutC),
-	(IcCombineConjointOutReverseU), (IcCombineConjointOutReverseC),
-	(IcCombineConjointAtopU), (IcCombineConjointAtopC),
-	(IcCombineConjointAtopReverseU), (IcCombineConjointAtopReverseC),
-	(IcCombineConjointXorU), (IcCombineConjointXorC),
-	(IcFetch_a8r8g8b8), (IcFetch_x8r8g8b8), (IcFetch_a8b8g8r8),
-	(IcFetch_x8b8g8r8), (IcFetch_r8g8b8), (IcFetch_b8g8r8),
-	(IcFetch_r5g6b5), (IcFetch_b5g6r5), (IcFetch_a1r5g5b5),
-	(IcFetch_x1r5g5b5), (IcFetch_a1b5g5r5), (IcFetch_x1b5g5r5),
-	(IcFetch_a4r4g4b4), (IcFetch_x4r4g4b4), (IcFetch_a4b4g4r4),
-	(IcFetch_x4b4g4r4), (IcFetch_a8), (IcFetcha_a8), (IcFetch_r3g3b2),
-	(IcFetch_b2g3r3), (IcFetch_a2r2g2b2), (IcFetch_a4), (IcFetcha_a4),
-	(IcFetch_r1g2b1), (IcFetch_b1g2r1), (IcFetch_a1r1g1b1),
-	(IcFetch_a1b1g1r1), (IcFetcha_a1), (IcFetch_a1),
-	(IcStore_a8r8g8b8), (IcStore_x8r8g8b8), (IcStore_a8b8g8r8),
-	(IcStore_x8b8g8r8), (IcStore_r8g8b8), (IcStore_b8g8r8),
-	(IcStore_r5g6b5), (IcStore_b5g6r5), (IcStore_a1r5g5b5),
-	(IcStore_x1r5g5b5), (IcStore_a1b5g5r5), (IcStore_x1b5g5r5),
-	(IcStore_a4r4g4b4), (IcStore_x4r4g4b4), (IcStore_a4b4g4r4),
-	(IcStore_x4b4g4r4), (IcStore_a8), (IcStore_r3g3b2),
-	(IcStore_b2g3r3), (IcStore_a2r2g2b2), (IcStore_a4),
-	(IcStore_r1g2b1), (IcStore_b1g2r1), (IcStore_a1r1g1b1),
-	(IcStore_a1b1g1r1), (IcStore_a1), (IcFetch_external),
-	(IcFetcha_external), (IcStore_external), (IcFetch_transform),
-	(IcFetcha_transform), (IcStepOver), (IcStepDown), (IcSet),
-	(IcStepOver_external), (IcStepDown_external), (IcSet_external),
-	(IcStepOver_transform), (IcStepDown_transform), (IcSet_transform),
-	(IcBuildCompositeOperand), (pixman_compositeGeneral):
-	* src/icimage.h:
-
-	s/pixman_compositeOperand/FbCompositeOperand/g.
-
-2005-06-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (pixman_compositeSrcAdd_1000x1000),
-	(pixman_compositeSolidMask_nx1xn):
-	* src/icblt.c: (IcBlt), (IcBlt24Line), (IcBlt24), (IcBltOdd),
-	(IcBltOdd24), (IcSetBltOdd), (IcBltStip):
-	* src/icbltone.c: (IcBltOne), (IcBltOne24):
-	* src/iccompose.c: (IcFetch_a8r8g8b8), (IcFetch_x8r8g8b8),
-	(IcFetch_a8b8g8r8), (IcFetch_x8b8g8r8), (IcFetch_r8g8b8),
-	(IcFetch_b8g8r8), (IcFetch_r5g6b5), (IcFetch_b5g6r5),
-	(IcFetch_a1r5g5b5), (IcFetch_x1r5g5b5), (IcFetch_a1b5g5r5),
-	(IcFetch_x1b5g5r5), (IcFetch_a4r4g4b4), (IcFetch_x4r4g4b4),
-	(IcFetch_a4b4g4r4), (IcFetch_x4b4g4r4), (IcFetch_a8),
-	(IcFetcha_a8), (IcFetch_r3g3b2), (IcFetch_b2g3r3),
-	(IcFetch_a2r2g2b2), (IcFetch_a4), (IcFetcha_a4), (IcFetch_r1g2b1),
-	(IcFetch_b1g2r1), (IcFetch_a1r1g1b1), (IcFetch_a1b1g1r1),
-	(IcFetcha_a1), (IcFetch_a1), (IcStore_a8r8g8b8),
-	(IcStore_x8r8g8b8), (IcStore_a8b8g8r8), (IcStore_x8b8g8r8),
-	(IcStore_r8g8b8), (IcStore_b8g8r8), (IcStore_r5g6b5),
-	(IcStore_b5g6r5), (IcStore_a1r5g5b5), (IcStore_x1r5g5b5),
-	(IcStore_a1b5g5r5), (IcStore_x1b5g5r5), (IcStore_a4r4g4b4),
-	(IcStore_x4r4g4b4), (IcStore_a4b4g4r4), (IcStore_x4b4g4r4),
-	(IcStore_a8), (IcStore_r3g3b2), (IcStore_b2g3r3),
-	(IcStore_a2r2g2b2), (IcStore_a4), (IcStore_r1g2b1),
-	(IcStore_b1g2r1), (IcStore_a1r1g1b1), (IcStore_a1b1g1r1),
-	(IcStore_a1), (IcBuildCompositeOperand):
-	* src/icimage.c: (pixman_image_create_for_data):
-	* src/icstipple.c: (IcTransparentSpan):
-
-	s/pixman_bits_t/FbBits/s
-
-2005-06-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/ic.c: (pixman_compositeSrcAdd_8000x8000),
-	(pixman_compositeSrcAdd_8888x8888):
-	more merging:
-
-	630. Fix incorrect datatype for the pixmap width in
-	fbCompositeSrcAdd_8000x8000(), and add some small optimisations
-	(#A.1423, Keith Packard).
-
-2005-06-23  Jeff Muizelaar  <jeff at infidigm.net>
-
-	* src/icint.h:
-	* src/icblt.c: (IcBlt):
-	Start the xserver/fb -> libpixman merging with a copy
-	optimization.
-
-2005-05-26  Keith Packard  <keithp at keithp.com>
-
-	* src/iccompose.c: (IcFetch_transform), (IcFetcha_transform),
-	(IcBuildCompositeOperand):
-	* src/icimage.c: (pixman_image_init), (pixman_image_destroy),
-	(pixman_image_set_clip_region), (IcClipImageSrc):
-	* src/icimage.h:
-
-	Split clipping into separate source and destination operand
-	clips.  By default, source operands are not affected by
-	any client clipping.  This matches the desired semantics
-	for cairo.  When this code is ported back to the X server,
-	that will have to select the clipping option which clip
-	source operands to the client clip.
-
-2005-05-18  Carl Worth  <cworth at cworth.org>
-
-	* configure.in: Add -head to CAIRO_VERSION after tagging with
-	SNAPSHOT_0_1_5.
-
-2005-05-18  Carl Worth  <cworth at cworth.org>
-
-	* NEWS: Add notes for snapshot 0.1.5.
-
-	* configure.in: Increment version to 0.1.5.
-
-2005-05-18  Carl Worth  <cworth at cworth.org>
-
-	* src/icimage.c (pixman_image_destroy): Clear pointers to NULL
-	after destroying/freeing them.
-
-2005-05-18  Carl Worth  <cworth at cworth.org>
-	
-	* src/pixman.h: Declare pixman_fixed16_16_t properly as int32_t
-	rather than just int. Reported by Lance Fetters.
-
-2005-05-12  Keith Packard  <keithp at keithp.com>
-
-	reviewed by: cworth
-
-	* src/ictrap.c: (pixman_composite_trapezoids):
-	libpixman creates an A8 format object and sometimes forgets to
-	destroy (when the bounds of the trapezoids are empty).
-	Avoids creating the format object in that case.
-
-2005-04-27  Owen Taylor  <otaylor at redhat.com>
-
-	* src/icimage.c (pixman_image_set_clip_region): Set
-	image->pCompositeClip here.
-	(IcComputeCompositeRegion) src/icrect.c (pixman_color_rects):
-	Remove workaround clipping to the clientClip.
-
-2005-04-27  Owen Taylor  <otaylor at redhat.com>
-
-	* src/ic.c: Don't use pixman_compositeSrc_8888x8888 when
-	the source is x8r8g8b8 or x8b8g8r8.
-
-2005-03-29  T Rowley  <tim.rowley at gmail.com>
-
-	* src/pixman.h: add AIX to the test for inttypes.h
-
-2005-03-11  Owen Taylor  <otaylor at redhat.com>
-
-	* src/icformat.c (pixman_format_init): Set format->depth
-	correctly instead of just using the bpp.
-
-2005-03-07  Carl Worth  <cworth at cworth.org>
-
-	* configure.in: Increment version to 0.1.4-head post-snapshot.
-
-	* RELEASING: Add notes on using -head suffix for PIXMAN_VERSION.
-
-	* NEWS: Add notes for snapshot 0.1.4.
-
-	* configure.in: Increment version to 0.1.4.
-
-2005-03-04  Carl Worth  <cworth at cworth.org>
-
-	* src/ictrap.c (pixman_composite_trapezoids): Intersect bounds of
-	trapezoids with the bounds of the destination surface before
-	creating an intermediate surface.
-
-2005-03-04  Carl Worth  <cworth at cworth.org>
-
-	* src/ictrap.c (pixman_composite_trapezoids): Add comment from
-	xserver's mitrap.c.
-
-2005-03-04  David Reveman  <davidr at novell.com>
-
-	* src/pixman.h: 
-	* src/ictrap.c: Add pixman_add_trapezoids.
-
-2005-03-03  Carl Worth  <cworth at cworth.org>
-
-	* src/icimage.c (miIsSolidAlpha): Port from render/mipict.c.
-
-	* src/ictrap.c (pixman_composite_trapezoids): Merge in
-	optimization from render/mitrap.c for op==ADD and solid alpha src.
-
-2005-03-03  Carl Worth  <cworth at cworth.org>
-
-	* src/pixman-xserver-compat.h (BoxRec, BoxPtr, Bool, TRUE, FALSE):
-	Add a few more things that might be helpful when moving more files
-	over from xserver.
-
-2005-03-03  Carl Worth  <cworth at cworth.org>
-
-	* src/icint.h:
-	* src/ictrap.c: Move definitions of MIN and MAX macros from
-	ictrap.c to icint.h.
-
-2005-03-03  Carl Worth  <cworth at cworth.org>
-
-	* src/ictrap.c (pixman_composite_trapezoids): Remove dead "if
-	(!format)" code which also makes things more in synch with the
-	server's mitrap.c.
-
-2005-03-03  Carl Worth  <cworth at cworth.org>
-
-	* src/ictrap.c: Restore original copyright and license which must
-	have been inadvertently changed.
-
-2005-03-02  Carl Worth  <cworth at cworth.org>
-
-	* src/pixman-xserver-compat.h: Fix comment to clarify that
-	libpixman regards the xserver repository as its canonical upstream
-	for some files.
-
-	* src/ic.c, src/icblt.c, src/icbltone.c, src/iccolor.c,
-	src/iccompose.c, src/icformat.c, src/icimage.c, src/icimage.h,
-	src/icint.h, src/icpixels.c, src/icrect.c, src/icrop.h,
-	src/icstipple.c, src/ictransform.c, src/ictrap.c, src/ictri.c,
-	src/icutil.c, src/pixman.h, src/slim_internal.h: Convert file
-	encodings from ISO-8859 to UTF-8.
-
-2005-02-21  Carl Worth  <cworth at cworth.org>
-
-	* src/renderedge.h: Add only-just-better-than-ASCII-art diagram
-	showing all macros used in locating sub-pixel sample rows/columns.
-	
-	* src/renderedge.h (RenderEdgeStepSmall, RenderEdgeStepBig): Add
-	missing protective parentheses around macro parameter usage.
-
-2005-02-21  Carl Worth  <cworth at cworth.org>
-
-	* src/ic.c: 
-	* src/icint.h: Move definition of __inline for non-gcc from ic.c
-	to icint.h so it applies to more code in the implementation.
-
-2005-02-06  Owen Taylor  <otaylor at redhat.com>
-
-	* configure.in: Add AC_PREREQ(2.54) to help the Debian 
-	auto-guess-which-configure-version hack.
-
-2005-01-26  Carl Worth  <cworth at cworth.org>
-
-	* src/pixman.h: Use 32-bits for pixman_bits_t, even on 64-bit
-	platforms. This should fix bug #2335 as well as rendering problems
-	seen on 64-bit platforms.
-
-2005-01-21  Carl Worth  <cworth at cworth.org>
-
-	* NEWS: Add notes for snapshot 0.1.3.
-
-	* configure.in: Increment version to 0.1.3
-
-	* RELEASING: Add reminder to diff pixman.h to look for API changes
-	since the last snapshot.
-
-	* src/Makefile.am (libpixman_la_SOURCES): Add missing files to
-	satisfy make distcheck.
-
-	* Makefile.am (RELEASE_UPLOAD_DIR): Update for changed www
-	directory on server.
-
-	* src/pixman-xserver-compat.h): Add pixman-xserver-compat.h, (that
-	was supposed to go in a couple of commits ago).
-
-	* src/fbedgeimp.h (rasterizeEdges): Avoid buffer ovverrun when
-	trapezoid's right edge is on a pixel boundary.
-
-	* src/ictri.c (IcRasterizeTriangle): 
-	* src/ictrap.c (pixman_composite_trapezoids): Switch to use new
-	fbRasterizeTrapezoid. Gut old IcRasterizeTrapezoid
-	implementation. Remove lots of code, (and all the bugs with it).
-
-	* src/icint.h: Replace IcRasterizeTrapezoid with
-	fbRasterizeTrapezoid. Add a couple of missing typedefs.
-
-	* src/renderedge.h: 
-	* src/renderedge.c (RenderLineFixedEdgeInit): 
-	* src/fbtrap.c: 
-
-	* src/fbedge.c: Minor changes to allow things to compile within
-	libpixman tree, (replace xserver include directives with
-	pixman-xserver-compat.h and sprinkle a few const qualifiers).
-
-	* src/Makefile.am (libpixman_la_SOURCES): Add sources for new
-	point-sampling rasterization.
-
-	* src/fbtrap.c: Merge in changes from xserver, (mostly just
-	whitespace).
-
-2005-01-18  Carl Worth  <cworth at cworth.org>
-
-	* src/fbedge.c:
-	* src/fbedgeimp.h:
-	* src/fbtrap.c:
-	* src/renderedge.c:
-	* src/renderedge.h: Add pristine files from the X server
-	containing Keith's newer point-sampling implementation of
-	trapezoid rasterization. The plan is to munge these files as
-	little as possible to make them work within libpixman, (so that it
-	will be easier to share patches between libpixman and the X
-	server).
-	
-2005-01-13  Carl Worth  <cworth at cworth.org>
-
-	* src/ictrap.c (IcRasterizeTrapezoid): Force alpha to 0 when the
-	left edge is entirely above top. (This is a workaround for some
-	bizarre edge effects in the current algorithm).
-	(IcRasterizeTrapezoid): Fix the above correction so that it
-	doesn't force 0 alpha when the left edge is positioned above but
-	slopes so as to contain some of the pixel.
-
-2005-01-07  Carl Worth  <cworth at cworth.org>
-
-	* src/icrop.h: 
-	* src/icint.h: Restore extern tag for variable declarations,
-	(accidentally removed when recently removing extern from function
-	prototypes).
-
-2005-01-04  Carl Worth  <cworth at cworth.org>
-
-	* src/ic.c (pixman_composite): Do nothing if src image has width
-	or height == 0 to avoid potential divide-by-zero.
-
-2004-12-23  Carl Worth  <cworth at cworth.org>
-
-	* src/slim_internal.h: Rename __internal_linkage to
-	pixman_private.
-
-	* src/icrop.h: 
-	* src/icint.h: 
-	* src/icimage.h: Track rename to pixman_private and move it to
-	before the function return value to quiet gcc warnings about
-	visibility attribute ignored for non-class type.
-
-	* configure.in: 
-	* src/Makefile.am (INCLUDES): Add the following warnings when
-	compiling with gcc: -Wall -Wpointer-arith -Wstrict-prototypes
-	-Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-	-fno-strict-aliasing
-
-	* src/icrect.c (pixman_color_rects): Fix to actually call
-	pixman_fill_rect_32bpp in the 32 bpp case. Thanks to
-	TOKUNAGA Hiroyuki <tkng at xem.jp>.
-	(pixman_fill_rect_8bpp, pixman_fill_rect_32bpp): Fix typo in
-	naming: bbp -> bpp.
-
-2004-12-20  Alexander Larsson  <alexl at redhat.com>
-
-	* src/icrect.c: (pixman_fill_rect_8bbp), (pixman_fill_rect_32bbp),
-	(pixman_fill_rect_general), (pixman_color_rects),
-	(pixman_fill_rectangles):
-	Special case solid color rectangle fills.
-
-2004-10-28  Carl Worth  <cworth at cworth.org>
-
-	* Makefile.am (release-verify-newer): Abort release-publish if
-	there's already a published tar file with the current version.
-	(release-publish): Add code to update the LATEST-package-version
-	file.
-
-2004-10-27  Carl Worth  <cworth at cworth.org>
-
-	* RELEASING: Put the tag command back which was accidentally
-	removed from the instructions.
-
-	* NEWS: Update date since 0.1.2 release didn't get pushed out
-	until today.
-
-	* RELEASING: Update release instructions to include new
-	release-publish target.
-	Suggest "cvs -q update -Ad" as an alternative to checkout.
-
-	* Makefile.am (release-publish): Add release-check and
-	release-publish targets to simplify the release process.
-
-2004-10-13  Carl Worth  <cworth at cworth.org>
-
-	* NEWS: Add notes for snapshot 0.1.2
-
-	* configure.in: Increment version to 0.1.2
-
-	* src/icint.h (MOD): 
-	* src/iccompose.c (IcFetch_transform): 
-	* src/ic.c (pixman_composite): Switch from two different buggy mod
-	macros to a new MOD macro which should work in C89 or C99.
-
-2004-09-12  David Reveman  <c99drn at cs.umu.se>
-
-	* src/icformat.c (pixman_format_init): pixman_format_init expects
-	that all variables not touched are zero. We need to add a memset
-	here to make that true.
-	Added pixman_format_get_masks, which allow clients to get the
-	masks from a format.
-
-	* src/icimage.c: Added the implementation of pixman_image_get_format,
-	which was missing.
-
-	* src/icint.h: slim_hidden_proto pixman_image_set_component_alpha.
-
-	* src/pixman.h: Added pixman_image_set_component_alpha, making it
-	possible to use component alpha.
-
-	* src/icimage.c (pixman_image_set_clip_region): Make a copy of
-	the client owned region.
-	(IcComputeCompositeRegion): Intersect possible client region.
-	Added pixman_image_set_component_alpha.
-
-	* src/icint.h: Include "../config.h".
-	Define IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER correctly.
-
-	* configure.in: Added AC_C_BIGENDIAN.
-
-	* src/ic.c (pixman_composite): 
-	* src/iccompose.c (IcFetch_transform, IcFetcha_transform): 
-	* src/icimage.h: Added support for both transform and repeat
-	(thanks to Owen Taylor <otaylor at redhat.com>).
-
-2004-05-06  Carl Worth  <cworth at isi.edu>
-
-	* src/icimage.c (pixman_image_set_clip_region): Leave
-	clientClipType as CT_NONE if region is NULL (thanks to Vladimir
-	Vukicevic <vladimir at pobox.com>).
-
-2004-04-16  Carl Worth  <cworth at isi.edu>
-
-	* NEWS: Add notes for snapshot 0.1.1
-
-	* configure.in: Increment LIBPIXMAN_VERSION to 0.1.1
-
-	* src/ictrap.c (IcCreateAlphaPicture): 
-	* src/icrect.c (pixman_color_rects): 
-	* src/pixregion.c (pixman_region16_print, pixman_region16_valid): 
-	* src/icint.h (IcBitsMask):
-	* src/icimage.h:
-	* src/icimage.c (pixman_image_change):
-	* src/icformat.c (pixman_format_create): 
-	* src/pixman.h: Fix bogus names such as PIXMAN_FORMAT_NAME_AR_GB32
-	that were left over from a broken search-and-replace. Normalize
-	structure defintions, (eg. struct _pixman_region16_t -> struct
-	pixman_region16). Normalize indentation.
-
-	* AUTHORS: Fix alphabetization.
-
-2004-02-24  Carl Worth  <cworth at isi.edu>
-
-	* AUTHORS: Added attribution for several authors after sifting
-	through the ChangeLog.
-	Fix email address for Anders Carlsson.
-
-2004-01-24  Carl Worth  <cworth at isi.edu>
-
-	* src/iccompose.c (IcFetch_transform): 
-	(IcFetcha_transform): Remove dead-code (useless n++).
-
-2004-01-22  Richard Worth <richard at theworths.org>
-
-	* src/Makefile.am: Add '-no-undefined' to end of
-	libpixman_la_LDFLAGS tp enable building shared libary under
-	cygwin.
-
-	* src/pixman.h: Remove all 'extern ' and ' __external_linkage'
-	(macro for __declspec(dllexport) and __declspec(dllimport))
-	from function declarations. These are no longer needed for cygwin.
-	
-2003-12-17  Carl Worth  <cworth at east.isi.edu>
-
-	* src/pixman.h: Remove trailing commas from enum, (some compilers
-	like to complain about this).
-
-2003-12-12  Dave Beckett  <Dave.Beckett at bristol.ac.uk>
-
-	* src/Makefile.am: Remove LIBPIXMAN_CFLAGS/LIBS cruft.
-	(libpixman_la_SOURCES): slim_export.h slim_import.h gone.
-
-2003-12-12  Carl Worth  <cworth at east.isi.edu>
-
-	* src/pixman.h: Fold contents of slim_export/import.h directly
-	into this file to avoid dependence on external slim package.
-
-	* src/icint.h:
-	* src/pixregionint.h: Use quote-based include now that
-	slim_internal is an internal file.
-	
-	* src/icint.h: Follow convention of other files for
-	multi-inclusion guard (_IC_INT_H_)
-	
-
-	* configure.in: Remove cruft.
-
-2003-12-10  Dave Beckett  <Dave.Beckett at bristol.ac.uk>
-
-	* update.pl: fixes for wrong order of renames
-
-	* src/pixregion.c, src/pixman.h, src/ictri.c, src/ictrap.c, src/icimage.c, src/icformat.c, src/ic.c:
-	Correct some more renames where the order of the renaming
-	caused later renames to fail due to earlier prefixes failing.
-
-	* update.pl: Add rename fixes
-
-	* src/pixregionint.h, src/pixregion.c, src/pixman.h, src/ictri.c, src/ictrap.c, src/ictransform.c, src/icrect.c, src/icpixels.c, src/icint.h, src/icimage.h, src/icimage.c, src/icformat.c, src/iccompose.c, src/iccolor.c:
-	Correct over-eager renames of the form pixman_thing_tName into
-	pixman_thing_name.  It was inevitable really this would happen!
-
-	* update.pl: Added helper script for updating names in source.
-
-	* src/pixregionint.h, src/pixregion.c, src/pixman.h, src/icutil.c, src/ictri.c, src/ictrap.c, src/ictransform.c, src/icstipple.c, src/icrop.h, src/icrect.c, src/icpixels.c, src/icint.h, src/icimage.h, src/icimage.c, src/icformat.c, src/iccompose.c, src/iccolor.c, src/icbltone.c, src/icblt.c, src/ic.c:
-	Rename exported Ic* and PixRegion* functions, types, enums
-	to be prefixed pixman (or PIXMAN for enum values)
-
-	* libpixman.pc.in, README: libpixman is the pixel manipulation library
-
-	* src/pixregionint.h, src/icint.h:
-	Change ic.h/pixregion.h headers inclusions to be pixman.h
-
-	* src/ic.h: Removed ic.h, merged into pixman.h
-
-	* src/pixman.h:
-	Merged pixregion.h (former name and CVS history of this file)
-	and ic.h (now CVS deleted here).
-
-	* src/Makefile.am:
-	Updated for libpixregion,libic to libpixman source merges.
-	Added -I$(srcdir) so we get internal headers from here even
-	when srcdir != builddir.
-
-	* libpixman.pc.in, configure.in, Makefile.am:
-	Updated for libpixregion,libic to libpixman package name, dependencies.
-
-	* README, COPYING, AUTHORS:
-	Merge of libic, slim AUTHORS, COPYING, README
-
-	* Initial repository copy of libpixregion, libic, slim CVS.
-
-	* Constructed a merged ChangeLog below via emacs VC mode (which rocks!)
-
-2003-12-09  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libpixregion, autogen.sh, ChangeLog.libic:
-	        * autogen.sh: Allow names of all autofoo programs to be
-	        overridden via environment variables.
-
-2003-11-25  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/icutil.c:
-	        * configure.in: Bump version to 0.1.5 for new 64-bit fixes.
-
-	        * src/icutil.c (icStipple8Bits): One more fix needed for 64-bit
-	        machine (alpha in this case). Thanks to Jakub Bogusz
-	        <qboosh at pld-linux.org>.
-
-2003-11-17  Carl Worth  <cworth at isi.edu>
-
-	* src/icrop.h, src/icutil.c, ChangeLog.libic:
-	        * src/icutil.c (icStipple1Bits):
-	        * src/icrop.h (IcStipple16Bits): Fixes needed to compile libic on
-	        x86_64. Many thanks to David R Bacon <dbacon at cis.ksu.edu>.
-
-2003-11-06  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.h: Removed stale version from ic.h.
-	Better to have no version listed than the wrong one.
-
-2003-11-01  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.h, src/icimage.c:
-	Add IcImageGetDepth. Bump version to 0.1.3
-
-2003-10-29  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libpixregion, configure.in, ChangeLog.libic:
-	Drop AC_CONFIG_AUX_DIR(config) as it was confusing "make distcheck"
-
-	* ChangeLog.libic, src/icimage.c, src/icimage.h:
-	Fix memory leak of image->transform.
-	Remove currently unused DevUnion type and IcImageChange function.
-
-	* ChangeLog.libic:
-	Bumped version to 0.1.2 to indicate new IcOperator type.
-
-	* ChangeLog.libic, src/ic.c, src/ic.h, src/icblt.c, src/icbltone.c, src/iccolor.c, src/iccompose.c, src/icimage.c, src/icimage.h, src/icint.h, src/icrect.c, src/ictransform.c, src/ictrap.c, src/ictri.c:
-	Patch from Bryan Worth <bryan at theworths.org> to eliminate lots of leftover,
-	undesired dependencies on X header files.
-
-2003-09-24  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.slim:
-	Require __GNUC__ >= 3 before defining slim_hidden_def macro
-
-2003-09-23  Carl Worth  <cworth at isi.edu>
-
-	* src/slim_internal.h:
-	Require __GNUC__ >= 3 before defining slim_hidden_def macro
-
-2003-09-10  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.c, src/iccolor.c, src/icformat.c, src/icimage.c, src/icrect.c, ChangeLog.libic, ChangeLog.libpixregion, configure.in, src/pixregion.c:
-	Updated calls to slim_hidden_def to track cahnges in slim 0.2.0
-
-	* ChangeLog.slim: Bump version number to 0.2.0
-
-	* ChangeLog.slim, src/slim_internal.h:
-	Remove ';' from slim_hidden_def. Bump version to 0.1.1
-
-2003-09-05  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.c, src/ic.h, src/icblt.c, src/icbltone.c, src/iccolor.c, src/iccompose.c, src/icformat.c, src/icimage.c, src/icimage.h, src/icint.h, src/icpixels.c, src/icrect.c, src/icrop.h, src/icstipple.c, src/ictransform.c, src/ictrap.c, src/ictri.c, src/icutil.c:
-	Expose functions for creating IcFormat based on IcFormatName or masks.
-	The actual IcFormat struct is no longer exposed.
-	Bump version number to 0.1.1
-
-	* ChangeLog.libic: Portability fix for OpenBSD (from Michael Schubert)
-
-2003-09-02  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h: Portability fix for OpenBSD (from Michael Schubert)
-
-2003-08-19  Carl Worth  <cworth at isi.edu>
-
-	* autogen.sh: Add --enable-maintainer-mode to autogen.sh
-
-	* autogen.sh:
-	Fixed to give a better warning if pkg-config is not installed
-
-2003-08-01  Richard Henderson  <rth at twiddle.net>
-
-	* ChangeLog.libic, src/iccolor.c:
-		* src/iccolor.c (Ones): Define as __builtin_popcount when available.
-
-2003-07-31  Richard Henderson  <rth at twiddle.net>
-
-	* src/ic.c, src/ic.h, src/iccolor.c, src/iccompose.c, src/icformat.c, src/icimage.c, src/icimage.h, src/icint.h, src/icrect.c, src/icrop.h, src/ictri.c, ChangeLog.libic:
-	        * configure.in: Check for slim revision.
-	        * libic.pc.in: Depend on slim.
-
-	        * src/ic.c, src/iccompose.c: Don't include icimage.h.
-	        * src/icimage.h: Don't include ic.h.
-
-	        * src/ic.h: Include slim_{export,import}.h as appropriate.  Mark all
-	        symbols __external_linkage.
-	        * src/icint.h: Include slim_import.h; mark symbols __internal_linkage;
-	        add slim hidden_proto declarations.
-	        * src/icimage.h: Mark all symbols __internal_linkage.
-	        * src/icrop.h: Likewise.
-
-	        * src/ic.c (IcComposite): Provide hidden definition.
-	        * src/iccolor.c (IcColorToPixel): Likewise.
-	        * src/icformat.c (IcFormatInit): Likewise.
-	        * src/icimage.c (IcImageCreate, IcImageDestroy): Likewise.
-	        (IcImageSetRepeat): Likewise.
-	        * src/icrect.c (IcFillRectangles): Likewise.
-	        * src/tri.c (IcRasterizeTriangle): Make static.
-
-	* ChangeLog.slim, src/slim_internal.h:
-	        * src/slim_internal.h (__internal_linkage): Attribute visibility
-	        not present until gcc 3.3.
-
-	* src/icimage.h, src/icrop.h, src/icutil.c, ChangeLog.libic, src/ic.c, src/icbltone.c, src/iccompose.c:
-	        * src/ic.c: Make everything but IcComposite static.
-	        * src/iccompose.c: Make everything except IcBuildCompositeOperand
-	        and IcCompositeGeneral static.
-	        * src/icbltone.c (Ic8Lane, Ic16Lane, Ic32Lane): Make static.
-	        (IcLaneTable): Turn into a function.
-	        (IcBltOne): Make IcLane const.
-	        (icStipple24Bits): Make static.
-	        * src/icimage.h: Remove lots of now static declarations.
-	        * src/icrop.h: Likewise.
-	        * src/icutil.c (icStipple8Bits, icStipple4Bits): Make static.
-	        (icStipple2Bits, icStipple1Bits): Make static.
-	        (IcStippleTable): Turn into a function.
-
-2003-07-30  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.h: Committing missed ChangeLog entry
-
-	* ChangeLog.libic, src/ic.h:
-	Fixed IcRectangle to be compatible with XRectangle.
-
-	* ChangeLog.libpixregion, configure.in, src/pixman.h:
-	Removed false dependency on X.
-
-2003-07-30  Richard Henderson  <rth at twiddle.net>
-
-	* ChangeLog.slim:
-	        * Makefile.am (EXTRA_DIST, pkgconfigdir, pkgconfig_DATA): New.
-	        * configure.in (AC_OUTPUT): Add slim.pc.
-	        * slim.pc.in: New file.
-
-	* ChangeLog.libpixregion, configure.in, libpixman.pc.in, src/pixman.h, src/pixregion.c, src/pixregionint.h:
-	        * configure.in: Run PKG_CHECK_MODULES on slim.
-	        * libpixregion.pc.in: Require slim.
-	        * src/pixregion.c (PixRegionCreateSimple): Mark hidden.
-	        (PixRegionCopy, PixRegionUnion): Mark hidden.
-	        * src/pixregion.h: Include and use X11/Xfuncproto.h.  Include
-	        slim_{export,import}.h as appropriate.  Mark all functions with
-	        __external_linkage.
-	        * src/pixregionint.h: Rename include protect to _PIXREGIONINT_H_.
-
-	* src/slim_export.h, src/slim_import.h, src/slim_internal.h, ChangeLog.slim:
-	        * src/slim_internal.h: New file.
-	        * src/slim_export.h: New file.
-	        * src/slim_import.h: New file.
-	        * src/Makefile.am (include_HEADERS): Add them.
-	        * configure.in (AC_INIT): Check for src/slim_export.h
-
-2003-07-30  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.slim: Initial commit of slim shell
-
-2003-07-29  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.c, src/ic.h, src/iccompose.c, src/icimage.h, src/icint.h:
-	Replaced CARD*/INT* datatypes with stdint types (vektor at dumbterm.net).
-
-2003-07-10  Anders Carlsson  <andersca at codefactory.se>
-
-	* ChangeLog.libic:
-	2003-07-10  Anders Carlsson  <andersca at codefactory.se>
-
-		* autogen.sh:
-		Pass --enable-maintainer-mode to configure
-
-		* configure.in:
-		Add compiler warning flags to CFLAGS.
-
-2003-07-09  Anders Carlsson  <andersca at codefactory.se>
-
-	* src/ic.h, src/icimage.c, ChangeLog.libic:
-	2003-07-09  Anders Carlsson  <andersca at codefactory.se>
-
-		* src/ic.h:
-		* src/icimage.c: (IcImageGetData):
-		Add accessor for getting a pointer to the image data.
-
-2003-07-08  Anders Carlsson  <andersca at codefactory.se>
-
-	* src/ic.h, src/icimage.c, ChangeLog.libic:
-	2003-07-09  Anders Carlsson  <andersca at codefactory.se>
-
-		* src/ic.h:
-		* src/icimage.c: (IcImageGetWidth), (IcImageGetHeight),
-		(IcImageGetStride):
-		Add accessors.
-
-2003-05-29  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.c, src/iccompose.c: Cleanup of some stale unused code.
-
-2003-05-15  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h, src/iccompose.c, src/icimage.c, src/icimage.h,
-	src/icint.h, src/ictransform.c, ChangeLog.libic: Fixed
-	transform/filter support
-
-2003-05-05  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ictrap.c:
-	Avoid crash in IcCompositeTrapezoids when there's nothing to draw.
-
-2003-04-26  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/icimage.c, src/icimage.h: Fixed memory leak
-
-2003-04-25  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.h, src/icint.h, src/icrect.c,
-	src/ictrap.c, src/ictri.c: Remove X datatypes from public
-	interface
-
-	* configure.in, src/Makefile.am, src/pixman.h, src/pixregionint.h:
-	Fixed libtool versioning
-
-	* ChangeLog.libic, src/ic.h:
-	Fixed to not reference XFixed. Fixed libtool versioning
-
-2003-04-23  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h: extern "C" stuff to support C++ (Fredrik Höglund)
-
-2003-04-22  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libpixregion, configure.in: Fixed typo (Owen Taylor)
-
-2003-04-17  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.c, src/ic.h, src/iccolor.c,
-	src/iccompose.c, src/icformat.c, src/icimage.c, src/icimage.h,
-	src/icint.h, src/icpixels.c, src/icrect.c, src/ictrap.c,
-	src/ictri.c: Removed reliance on server headers. Reowrked IcFormat
-
-2003-03-05  Carl Worth  <cworth at isi.edu>
-
-	* ChangeLog.libic, src/ic.h, src/icimage.h, src/icint.h:
-	Updated to use libpixregion
-
-2003-02-25  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.c, src/ic.h, src/iccompose.c, src/icimage.c,
-	src/icimage.h, src/icint.h, src/ictrap.c, src/ictri.c: updated to
-	use libpixregion instead of Xlib region code
-
-	* ChangeLog.libpixregion, src/pixman.h, src/pixregion.c: API cleanup
-
-	* src/.cvsignore, src/Makefile.am, src/pixman.h, src/pixregion.c,
-	src/pixregionint.h: Initial import of libpixregion
-
-	* src/.cvsignore, src/Makefile.am, src/pixman.h, src/pixregion.c,
-	src/pixregionint.h: New file.
-
-	* .cvsignore, AUTHORS, COPYING, ChangeLog.libpixregion, INSTALL,
-	Makefile.am, NEWS, README, autogen.sh, configure.in,
-	libpixman.pc.in: Initial import of libpixregion
-
-	* .cvsignore, AUTHORS, COPYING, ChangeLog.libpixregion, INSTALL,
-	Makefile.am, NEWS, README, autogen.sh, configure.in,
-	libpixman.pc.in: New file.
-
-2003-02-21  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h, src/icimage.h, src/icint.h, src/ictrap.c, src/ictri.c:
-	Added triangle support
-
-	* src/ictransform.c, ChangeLog.libic, src/ic.c, src/icbltone.c,
-	src/iccompose.c, src/icformat.c, src/icimage.c, src/icimage.h,
-	src/icint.h, src/icutil.c: Some reorganization and cruft removal
-
-	* src/ic.c, src/ic.h, src/icimage.c, src/icint.h, src/icpixels.c,
-	src/icstipple.c, src/ictrap.c: Started cleaning up public libic
-	interface
-
-	* src/icimage.h, src/icint.h, src/icrop.h:
-	Initial import of libic code, (still very preliminary).
-
-	* src/icimage.h, src/icint.h, src/icrop.h: New file.
-
-	* src/ictrap.c, src/ictri.c, src/icutil.c:
-	Initial import of libic code, (still very preliminary).
-
-	* src/ictrap.c, src/ictri.c, src/icutil.c: New file.
-
-	* src/iccompose.c, src/icformat.c, src/icimage.c, src/icpixels.c, src/icrect.c, src/icstipple.c:
-	Initial import of libic code, (still very preliminary).
-
-	* src/iccompose.c, src/icformat.c, src/icimage.c, src/icpixels.c, src/icrect.c, src/icstipple.c:
-	New file.
-
-	* src/icbltone.c:
-	Initial import of libic code, (still very preliminary).
-
-	* src/icbltone.c: New file.
-
-	* src/ic.c, src/ic.h, src/icblt.c:
-	Initial import of libic code, (still very preliminary).
-
-	* src/ic.c, src/ic.h, src/icblt.c: New file.
-
-	* ChangeLog.libic:
-	Initial import of libic code, (still very preliminary).
-
-	* ChangeLog.libic: New file.
-
diff --git a/pixman/ChangeLog.libic b/pixman/ChangeLog.libic
deleted file mode 100644
index d6d709f..0000000
--- a/pixman/ChangeLog.libic
+++ /dev/null
@@ -1,300 +0,0 @@
-2003-12-08  Carl Worth  <cworth at isi.edu>
-
-	* autogen.sh: Allow names of all autofoo programs to be
-	overridden via environment variables.
-
-2003-11-25  Carl Worth  <cworth at east.isi.edu>
-
-	* configure.in: Bump version to 0.1.5 for new 64-bit fixes.
-
-	* src/icutil.c (icStipple8Bits): One more fix needed for 64-bit
-	machine (alpha in this case). Thanks to Jakub Bogusz
-	<qboosh at pld-linux.org>.
-
-2003-11-17  Carl Worth  <cworth at isi.edu>
-
-	* src/icutil.c (icStipple1Bits): 
-	* src/icrop.h (IcStipple16Bits): Fixes needed to compile libic on
-	x86_64. Many thanks to David R Bacon <dbacon at cis.ksu.edu>.
-
-2003-11-06  Carl Worth  <cworth at east.isi.edu>
-
-	* configure.in: Bump version to 0.1.4 just to mark removal of the
-	version from ic.h, (so not an interesting change and nothing worth
-	upgrading to).
-
-	* src/ic.h: Remove IC_MAJOR, IC_MINOR, and IC_REVISION, (which
-	were stale anyway so less than useful).
-
-2003-10-31  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (LIBIC_VERSION): Bump version to 0.1.3 for new IcImageGetDepth.
-
-	* src/icimage.c (IcImageGetDepth): Add IcImageGetDepth.
-
-2003-10-29  Carl Worth  <cworth at isi.edu>
-
-	* src/icimage.h: Remove currently unused DevUnion datatype to
-	squelch compiler warning.  Remove prototype for currently
-	unimplemented IcImageChange function.
-
-	* src/icimage.c (IcImageDestroy): Fixed memory leak of
-	image->transform.
-
-2003-10-29  Carl Worth  <cworth at east.isi.edu>
-
-	* configure.in: Drop AC_CONFIG_AUX_DIR(config) as it was confusing
-	"make distcheck"
-
-2003-10-29  Carl Worth  <cworth at east.isi.edu>
-
-	* configure.in: Bumped version to 0.1.2 to indicate new IcOperator
-	type.
-
-	* Everywhere: A large patch from Bryan Worth <bryan at theworths.org>
-	to eliminate lots of leftover, undesired dependencies on X header
-	files. More details below:
-
-	* src/ictransform.c:
-	* src/ictrap.c:
-	* src/ictri.c:
-	* src/icrect.c:
-	* src/iccompose.c:
-	* src/iccolor.c:
-	* src/icbltone.c:
-	* src/icblt.c:
-	* src/icimage.h:
-	* src/icimage.c:
-	* src/ic.c:
-	Replace CARD8/16/32 with uint8/16/32_t.
-	Replace INT16 with int16_t.
-	Use IcOperator in place of char or uint8_t.
-	Replace Bool/FALSE/TRUE with int/0/1.
-
-	* src/icint.h: Remove includes of X11/X.h, X11/Xmd.h,
-	X11/Xprotostr.h and X11/extensions/Xrender.h.  Add IcPoint.  Lift
-	definitions from X headers for Mask, GXor, ClipByChildren,
-	PolyEdgeSharp, PolyModePrecise, CPClipMask, and CPLastBit.
-
-	* src/icimage.h: Remove includes of X11/Xdefs.h and X11/Xprotostr.h.
-	Replace "pointer" with "void *".
-	Remove include of X11/Xutil.h.
-	Replace DDXPointRec with IcPoint.
-	Replace Atom/XID with unsigned long.
-
-	* src/icimage.c: Remove instances of BadAlloc and Success.
-	Replace XID with unsigned int.
-	Replace	"pointer" with "void *".
-	Replace Atom with unsigned long.
-
-	* src/ic.h: Introduce new IcOperator enum, rather than using char
-	or uint8_t.
-
-2003-09-09  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (SLIM_REQUIRED): Updated calls to slim_hidden_def
-	to track changes in slim 0.2.0.
-
-2003-09-05  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (LIBIC_VERSION): Bumped version to 0.1.1.
-
-	* src/ictrap.c (IcCreateAlphaPicture): Fixed memory leak.
-
-	* src/icimage.h: icimage->image_format now a struct not a
-	pointer. Rename integral format_name to format_code.
-
-	* src/iccompose.c: Remove unused functions: IcCombineSaturateU,
-	IcCombineSaturateC, IcFetch_a2b2g2r2, IcFetch_c8, IcFetch_c4,
-	IcFetch_g1, IcStore_c8, IcStore_g8, IcStore_c4, IcStore_g4,
-	IcStore_g1.
-
-	* src/iccolor.c (_IcOnes): Rename Ones to _IcOnes and expose it
-	for internal use.
-
-	* src/ic.h: Changed IcFormatName from an int to an enum.
-	Changed IcFormat from an exposed struct to an opaque type.
-	Now expose IcFormatCreate, IcFormatCreateMasks, and
-	IcFormatDestroy.
-
-2003-09-02  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h: Include inttypes.h rather than stdint.h on OpenBSD,
-	(Michael Schubert <michael at schubert.cx>)
-
-2003-07-31  Richard Henderson  <rth at twiddle.net>
-
-	* src/iccolor.c (Ones): Define as __builtin_popcount when available.
-
-2003-07-31  Richard Henderson  <rth at twiddle.net>
-
-	* configure.in: Check for slim revision.
-	* libic.pc.in: Depend on slim.
-
-	* src/ic.c, src/iccompose.c: Don't include icimage.h.
-	* src/icimage.h: Don't include ic.h.
-
-	* src/ic.h: Include slim_{export,import}.h as appropriate.  Mark all
-	symbols __external_linkage.
-	* src/icint.h: Include slim_import.h; mark symbols __internal_linkage;
-	add slim hidden_proto declarations.
-	* src/icimage.h: Mark all symbols __internal_linkage.
-	* src/icrop.h: Likewise.
-
-	* src/ic.c (IcComposite): Provide hidden definition.
-	* src/iccolor.c (IcColorToPixel): Likewise.
-	* src/icformat.c (IcFormatInit): Likewise.
-	* src/icimage.c (IcImageCreate, IcImageDestroy): Likewise.
-	(IcImageSetRepeat): Likewise.
-	* src/icrect.c (IcFillRectangles): Likewise.
-	* src/tri.c (IcRasterizeTriangle): Make static.
-
-2003-07-31  Richard Henderson  <rth at twiddle.net>
-
-	* src/ic.c: Make everything but IcComposite static.
-	* src/iccompose.c: Make everything except IcBuildCompositeOperand
-	and IcCompositeGeneral static.
-	* src/icbltone.c (Ic8Lane, Ic16Lane, Ic32Lane): Make static.
-	(IcLaneTable): Turn into a function.
-	(IcBltOne): Make IcLane const.
-	(icStipple24Bits): Make static.
-	* src/icimage.h: Remove lots of now static declarations.
-	* src/icrop.h: Likewise.
-	* src/icutil.c (icStipple8Bits, icStipple4Bits): Make static.
-	(icStipple2Bits, icStipple1Bits): Make static.
-	(IcStippleTable): Turn into a function.
-
-2003-07-30  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h: Fixed IcRectangle to be compatible with XRectangle.
-
-2003-07-29  Billy Biggs  <vektor at dumbterm.net>
-
-	* src/ic.h: Changed all references to CARD*/INT* to use stdint
-	names, (eg. uint32_t, int32_t).
-
-2003-07-10  Anders Carlsson  <andersca at codefactory.se>
-
-	* autogen.sh:
-	Pass --enable-maintainer-mode to configure
-	
-	* configure.in:
-	Add compiler warning flags to CFLAGS.
-	
-2003-07-09  Anders Carlsson  <andersca at codefactory.se>
-
-	* src/ic.h:
-	* src/icimage.c: (IcImageGetData):
-	Add accessor for getting a pointer to the image data.
-	
-2003-07-09  Anders Carlsson  <andersca at codefactory.se>
-
-	* src/ic.h:
-	* src/icimage.c: (IcImageGetWidth), (IcImageGetHeight),
-	(IcImageGetStride):
-	Add accessors.
-	
-2003-05-14  Carl Worth  <cworth at isi.edu>
-
-	* src/ic.h: Add IcImageSetFilter. Fixed transform support.
-
-2003-05-05  Carl Worth  <cworth at isi.edu>
-
-	* src/ictrap.c (IcCompositeTrapezoids): Avoid crash if there's
-	nothing to draw.
-
-2003-04-26  Carl Worth  <cworth at isi.edu>
-
-	* src/icimage.c (IcImageDestroy): Fix memory leak of image->pixels
-	when owns_pixels == 1;
-
-2003-04-25  Carl Worth  <cworth at east.isi.edu>
-
-	* src/ic.h (IC_REVISION): Added #defines for version.
-	Don't reference undefined XFixed datatype.
-	Added IcFixed16_16, IcPointFixed, IcLineFixed, IcRectangle,
-	IcTriangle, and IcTrapzezoid to eliminate X datatypes in public
-	interface.
-
-	* configure.in: Fixed libtool versioning.
-
-2003-04-17  Carl Worth  <cworth at isi.edu>
-
-	* src/icint.h: Removed reliance on some server include files,
-	(this included copy and paste of Xserver/render/picture.h into
-	icint.h)
-
-	* src/icformat.c (IcFormatInit): Replaced public
-	IcFormatCreate/IcFormatDestroy with IcFormatInit and an exposed
-	IcFormat structure.
-	(_IcFormatCreate): Tracked changes now that IcFormat no longer has
-	direct and indexed sub-structure.
-
-	* src/iccompose.c: Commented out all code supporting indexed
-	formats.
-
-	* src/ic.h: Expose IcFormat structure, (with no support for
-	indexed formats).
-
-	* src/ic.c (IcComposite): Track changes in IcImage structure
-	(format vs. format_name)
-
-2003-03-10  Carl Worth  <cworth at isi.edu>
-
-	* src/Makefile.am (INCLUDES): Cleaned up to no longer require
-	includes from X server source tree.
-
-2003-03-05  Carl Worth  <cworth at isi.edu>
-
-	* src/ictri.c (IcTriangles): 
-	(IcTriStrip): 
-	(IcTriFan): fixed argument order to match XRender
-
-	* src/icrect.c (IcRectangle): Add IcRectangle convenience function.
-	(IcRectangles): fixed argument order to match XRender
-
-	* src/ictri.c (IcTriangles): 
-	(IcTriStrip): 
-	(IcTriFan): Removed format argument from IcTri* functions.
-
-	* src/ictrap.c (IcTrapezoids): Removed format argument from
-	IcTrapezoids.
-
-	* src/icrect.c (IcRectangles): Initial (painfully slow)
-	implementation of IcRectangles.
-
-	* src/icimage.c (IcImageCreate): Simplified IcImageCreate, (no
-	longer requires mask/vlist/error/error_value)
-	(IcImageSetRepeat): Added IcImageSetRepeat
-	(IcImageSetClipRegion): Implemented simple IcImageSetClipRegion.
-
-2003-02-25  Carl Worth  <cworth at isi.edu>
-
-	* src/icimage.c (IcImageInit):
-	(IcImageDestroy):
-	(IcImageDestroyClip):
-	(IcClipImageReg):
-	(IcClipImageSrc):
-	(IcClipImageSrc):
-	(SetPictureClipRects):
-	(IcComputeCompositeRegion): Converted to use libpixregion rather
-	than region code from Xlib.
-	
-	* src/iccompose.c (IcFetch_transform): Converted to use
-	libpixregion rather than region code from Xlib.
-
-	* src/ic.c (IcComposite): Converted to use libpixregion rather
-	than region code from Xlib.
-
-2003-02-21  Carl Worth  <cworth at isi.edu>
-
-	* src/ictri.c (IcRasterizeTriangle): Added triangle support to
-	libic.
-
-	* src/ic.h: Started cleaning up the public interface of
-	libic. Moved most of the cruft into icint.h.
-
-2003-02-20  Carl Worth  <cworth at isi.edu>
-
-	* AUTHORS: Added AUTHORS, NEWS, ChangeLog.
-
diff --git a/pixman/ChangeLog.libpixregion b/pixman/ChangeLog.libpixregion
deleted file mode 100644
index 75b071e..0000000
--- a/pixman/ChangeLog.libpixregion
+++ /dev/null
@@ -1,47 +0,0 @@
-2003-12-08  Carl Worth  <cworth at isi.edu>
-
- 	* autogen.sh: Allow names of all autofoo programs to be
-	overridden via environment variables.
-
-2003-10-29  Carl Worth  <cworth at east.isi.edu>
-
-	* configure.in:  Drop AC_CONFIG_AUX_DIR(config) as it was confusing
-	"make distcheck"
-
-2003-09-09  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (SLIM_REQUIRED): Updated calls to slim_hidden_def
-	to track changes in slim 0.2.0.
-
-2003-07-30  Carl Worth  <cworth at east.isi.edu>
-
-	* src/pixregion.h: Implement our own 'extern "C"' block to avoid
-	false dependency on X.
-
-	* configure.in: Remove unnecessary AC_PATH_XTRA check for X
-	headers.
-
-2003-07-30  Richard Henderson  <rth at twiddle.net>
-
-	* configure.in: Run PKG_CHECK_MODULES on slim.
-	* libpixregion.pc.in: Require slim.
-	* src/pixregion.c (PixRegionCreateSimple): Mark hidden.
-	(PixRegionCopy, PixRegionUnion): Mark hidden.
-	* src/pixregion.h: Include and use X11/Xfuncproto.h.  Include
-	slim_{export,import}.h as appropriate.  Mark all functions with
-	__external_linkage.
-	* src/pixregionint.h: Rename include protect to _PIXREGIONINT_H_.
-
-2003-04-22  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (LIBPIXREGION_MAJOR_VERSION): Fixed typo (Owen Taylor)
-
-2003-02-25  Carl Worth  <cworth at isi.edu>
-
-	* src/pixregion.c (PixRegionCreateSimple): Eliminated useless size
-	parameter from PixRegionCreateSized, (the server only ever calls
-	it with a value of 1 or 0).
-	(PixRegionInit): 
-	(PixRegionUninit): 
-	(PixRegionBreak): Changed these three functions to be static.
-
diff --git a/pixman/ChangeLog.slim b/pixman/ChangeLog.slim
deleted file mode 100644
index c830bf7..0000000
--- a/pixman/ChangeLog.slim
+++ /dev/null
@@ -1,39 +0,0 @@
-2003-09-23  Carl Worth  <cworth at east.isi.edu>
-
-	* src/slim_internal.h: The slim_hidden_def macros were causing
-	build failures with gcc 2.95.4. I've bumped the test for these
-	macros up to: __GNUC__ >= 3. We'll see if that's sufficient.
-
-2003-09-09  Carl Worth  <cworth at isi.edu>
-
-	* configure.in (SLIM_VERSION): Bump version number to 0.2.0
-	instead, (this is an incompatible change after all).
-	
-	* configure.in (SLIM_VERSION): Bump version number to 0.1.1
-
-	* src/slim_internal.h (slim_hidden_def): Remove ';' from macro
-	definition, (forcing the user to provide it which looks better
-	anyway). This also helps to avoid confusing etags.
-
-2003-07-31  Richard Henderson  <rth at twiddle.net>
-
-	* src/slim_internal.h (__internal_linkage): Attribute visibility
-	not present until gcc 3.3.
-
-2003-07-30  Richard Henderson  <rth at twiddle.net>
-
-	* Makefile.am (EXTRA_DIST, pkgconfigdir, pkgconfig_DATA): New.
-	* configure.in (AC_OUTPUT): Add slim.pc.
-	* slim.pc.in: New file.
-
-2003-07-30  Richard Henderson  <rth at twiddle.net>
-
-	* src/slim_internal.h: New file.
-	* src/slim_export.h: New file.
-	* src/slim_import.h: New file.
-	* src/Makefile.am (include_HEADERS): Add them.
-	* configure.in (AC_INIT): Check for src/slim_export.h
-
-2003-07-29  Carl Worth  <cworth at isi.edu>
-
-	* Create package skeleton.
diff --git a/pixman/INSTALL b/pixman/INSTALL
deleted file mode 100644
index 5ccf1c3..0000000
--- a/pixman/INSTALL
+++ /dev/null
@@ -1,9 +0,0 @@
-This code uses automake, in order to generate the Makefiles use:
-
-	$ autogen.sh
-
-After that, standard build procedures apply:
-
-	$ make
-	# make install
-
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
deleted file mode 100644
index 92ac1e4..0000000
--- a/pixman/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-SUBDIRS = src
-
-EXTRA_DIST = \
-	COPYING \
-	ChangeLog.libic \
-	ChangeLog.libpixregion \
-	ChangeLog.slim
diff --git a/pixman/NEWS b/pixman/NEWS
deleted file mode 100644
index cb41258..0000000
--- a/pixman/NEWS
+++ /dev/null
@@ -1,135 +0,0 @@
-Snapshot 0.1.6 (2005-07-28 Carl Worth <cworth at cworth.org>)
-==========================================================
-Behavioral changes
-------------------
-Clips are changed to only affect destination operands, not
-sources. This gives the desired behavior for cairo. If the X server's
-Render implementation wants to use pixman it will have to select
-source clipping, (presumably through a new API call that we can add at
-that point).
-
-Bug fixes
----------
-Fix leak of the clip region associated with an image in
-pixman_image_destroy.
-
-Fix units for stride return to be FbStip-sized, (this bug was causing
-non antialiased text in cairo to appear as garbage).
-
-Other changes
--------------
-The implementation has been merged considerably with xserver/fb. Most
-of the merge was just name changes, but there were likely some bug
-fixes or performance improvements in there as well.
-
-Snapshot 0.1.5 (2005-05-18 Carl Worth <cworth at cworth.org>)
-==========================================================
-Bug fixes
----------
-Fix confusion of depth and bpp which was causing cairo to crash on
-some X servers.
-
-Properly declare pixman_fixed16_16_t as int32_t which fixes
-compilation failures on some platforms.
-
-Fix to find inttypes.h on AIX.
-
-Fix bug in compositing when the source image has no alpha channel.
-
-Some fixes to the clipping code.
-
-Fix memory leak when asked to draw a degenerate trapezoid list.
-
-Snapshot 0.1.4 (2005-03-07 Carl Worth <cworth at cworth.org>)
-==========================================================
-API Addition
-------------
-Add new function:
-
-	void
-	pixman_add_trapezoids (pixman_image_t           *dst,
-	                       int                      x_off,
-	                       int                      y_off,
-	                       const pixman_trapezoid_t *traps,
-	                       int                      ntraps);
-
-Performance improvement
------------------------
-Restrict size of intermediate surface used while compositing
-trapezoids based on the bounds of the desination surface.
-
-Bug fixes
----------
-Fix rendering on 64-bit platforms.
-
-Snapshot 0.1.3 (2005-01-21 Carl Worth <cworth at cworth.org>)
-==========================================================
-Performance improvements
-------------------------
-Solid fills are now much faster, (thanks to Alexander Larsson).
-
-Bug fixes
----------
-Fixed to quiet warnings in newer versions of gcc.
-
-Don't divide-by-zero if given an image of size 0x0.
-
-Fixed several corner cases where values outside a trapezoid would be
-drawn with alpha 1/255 (in the 8-bit case).
-
-Internal changes
-----------------
-Imported the newer point-sampling trapezoid rasterization code that
-Keith Packard wrote for the X server. This provide pixel-perfect
-matching with the Render extension as well as code that is simpler,
-more robust, and easier to maintain.
-
-Snapshot 0.1.2 (2004-10-27 Carl Worth <cworth at cworth.org>)
-==========================================================
-New functionality
------------------
-Added three new functions:
-
-	pixman_image_set_component_alpha
-	pixman_format_get_masks
-	pixman_image_get_format
-
-The first enables component-alpha compositing which can be used for
-optimizing sub-pixel rendering of text and other geometry. This is
-useful when the geometrical relationship of the sub-pixel components
-of the display device are known, (eg. with flat-panel monitors rather
-than CRTs).
-
-The other two functions are simple query functions that were missing.
-
-Bug fixes
----------
-Enabling both transform and repeat simultaneously now works.
-Some byte-order fixes.
-Clipping fixes: pixman now takes a copy of the client clipping region
-                client clipping is now actually used, it wasn't earlier.
-
-Snapshot 0.1.1 (2004-04-16 Carl Worth <cworth at east.isi.edu>)
-============================================================
-Build fixes for cygwin
-----------------------
-This snapshot adds the -no-undefined flag during compilation which is
-necessart for building a shared library under cygwin.
-
-Cleanup of the public API
--------------------------
-We recently noticed that there were a coupld of bugs in the script
-that renamed libic to libpixman. Fixing this requires the following
-changes in the public API:
-
-	PIXMAN_FORMAT_AR_GB32 -> PIXMAN_FORMAT_ARGB32
-	PIXMAN_FORMAT_RG_B24 -> PIXMAN_FORMAT_RGB24
-
-While we're changing that, we also normalized the names of structure
-tags, for example:
-
-	struct _pixman_region16_t -> struct pixman_region16
-	etc.
-
-but users are expected to use typedefs such as pixman_region16_t
-anyway.
diff --git a/pixman/README b/pixman/README
deleted file mode 100644
index 621ab94..0000000
--- a/pixman/README
+++ /dev/null
@@ -1,47 +0,0 @@
-libpixman - Pixel manipulation library
-
-libpixman is a merge of libpixregion and libic.
-It also includes the slim headers.
-
-----------------------------------------------------------------------
-libpixregion - Pixel region Library
-
-libpixregion is a generic library for manipulating pixel regions. A
-PixRegion is a set of Y-X banded rectangles that cover the desired
-region.
-
-The original code for libxregion was part of the reference X server
-implementation of the X Window System. A modified copy of the code
-also exists in the Xlib client library. libpixregion was formed so
-that both the X server and client libraries could share common code
-for region manipulation.
-
-libpixregion is also intended to be applicable outside of the X Window
-System. The public interface of libpixregion does not depend on any
-part of the X Window System.
-
-----------------------------------------------------------------------
-libic - Image compositing library
-
-libic is a generic image compositing library. libic provides
-Porter/Duff compositing of images and implicit mask generation for
-geometric primitives including trapezoids, triangles, and rectangles.
-
-The semantics of libic are designed to precisely match the
-specification of the X Render extension. In fact, the initial
-implementation of libic was lifted from the reference implementation
-of RENDER from the X server.
-
-However, libic is intended to be useful independent of the X Window
-System. The public interface exported by libic does not contain any
-X-specific data structures.
-
-Carl Worth
-cworth at isi.edu
-
-Keith Packard (keithp at keithp.com) originally wrote all the original
-RENDER code that was yanked out to become libic. Keith also provided
-impetus and guidance in the development of libic.
-
-----------------------------------------------------------------------
-slim - Shared Library Interface Macros
diff --git a/pixman/RELEASING b/pixman/RELEASING
deleted file mode 100644
index bb7ad05..0000000
--- a/pixman/RELEASING
+++ /dev/null
@@ -1,81 +0,0 @@
-So far, libpixman hasn't reached an initial release. But we can still form
-good habits now by practicing the release process with the current
-snapshots.
-
-A new snapshot is needed whenever significant new features or bug
-fixes are committed. Here are the steps to follow:
-
-1) Ensure that there are no local, uncommitted modifications. The best
-   thing to do here may be to begin with a fresh checkout from CVS:
-
-	cvs -d cairographics.org:/cvs/cairo co libpixman
-
-   But it's probably good enough if "cvs -q update -Ad" generates no
-   output.
-
-2) Verify that the code passes "make distcheck"
-
-	Running "make distcheck" should result in no warnings or
-	errors and end with a message of the form:
-
-	================================================
-	libpixman-X.Y.Z.tar.gz is ready for distribution
-	================================================
-
-	(But the tar file isn't actually ready yet, as we still have
-	some more steps to follow).
-
-3) Fill out an entry in the NEWS file
-
-	Sift through the information in ChangeLog since the last
-	snapshot. Summarize major changes briefly in a style similar
-	to other entries in NEWS. Take special care to note any
-	incompatible changes in the API. These should be easy to find
-	by looking for pixman.h in the ChangeLog. Additionally, the
-	output of the following command should be examined using the
-	previous snapshot tag:
-
-		cvs diff -r SNAPSHOT_X_Y_Z src/pixman.h
-
-4) Increment LIBPIXMAN_VERSION in configure.in
-
-	First, remove the "-head" suffix, then increment the version
-	as follows:
-
-	If there are backward-incompatible changes in the API,
-	(function removals, or semantic changes), increment the minor
-	number and reset the sub-minor number to 0.
-
-	Otherwise, (that is, if there are only bug fixes and perhaps
-	API additions), then increment only the sub-minor number.
-
-	Prior to the initial "1.0" release of cairo, leave the major
-	number at 0. Also, do not modify the "libtool shared library
-	version" variables, (LT_CURRENT, LT_VERSION, LT_AGE).
-
-5) Commit the changes to NEWS and configure.in
-
-	Don't forget to fill out the ChangeLog just like with any
-	other commit. It's especially important to mention the new
-	version number in the ChangeLog.
-
-6) Run "make release-publish" which will perform the following steps
-   for you:
-
-	* Check that no release exists with the current version
-	* Verify that make distcheck completes successfully
-	* Generate the final tar file
-	* Generate an md5sum file
-	* scp both files to appear on http://cairographics.org/snapshots
-	* Create a LATEST-package-version file (after deleting any old one)
-	* Place local copies of both files in the releases directory
-	* Provide some text for the release announcement (see below).
-
-7) Tag the entire source tree with a tag of the form SNAPSHOT_X_Y_Z:
-
-	cvs tag SNAPSHOT_X_Y_Z
-
-8) Add a "-head" to LIBPIXMAN_VERSION in configure, and commit.
-
-9) Send a message to cairo-announce at cairographics.org to announce the
-   new snapshot using the text provided from "make release-publish".
diff --git a/pixman/TODO b/pixman/TODO
deleted file mode 100644
index 5560d8d..0000000
--- a/pixman/TODO
+++ /dev/null
@@ -1,10 +0,0 @@
-Need to finish up libpixman to the point where there X server can use
-it in place of its original copy of all this code (eg. in fb).  This
-means merging features that have happened in either tree since the
-birth of libpixman. Off-hand I can think of the following things that
-have happened:
-
-	* libpixman has fix for transform + repeat
-	* X server has some (MMX? SSE?) optimized compositing code
-
-But see the logs for more details.
diff --git a/pixman/autogen.sh b/pixman/autogen.sh
deleted file mode 100755
index fe847d9..0000000
--- a/pixman/autogen.sh
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-set -e
-
-LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
-LIBTOOLIZE_FLAGS="--copy --force"
-ACLOCAL=${ACLOCAL-aclocal}
-AUTOHEADER=${AUTOHEADER-autoheader}
-AUTOMAKE=${AUTOMAKE-automake}
-AUTOMAKE_FLAGS="--add-missing"
-AUTOCONF=${AUTOCONF-autoconf}
-
-ARGV0=$0
-
-if test -z "$ACLOCAL_FLAGS"; then
-    acdir=`aclocal --print-ac-dir`
-    if [ ! -f $acdir/pkg.m4 ]; then
-	echo "$ARGV0: Error: Could not find pkg-config macros."
-	echo "        (Looked in $acdir/pkg.m4)"
-	echo "        If pkg.m4 is available in /another/directory, please set"
-	echo "        ACLOCAL_FLAGS=\"-I /another/directory\""
-	echo "        Otherwise, please install pkg-config."
-	echo ""
-	echo "pkg-config is available from:"
-	echo "http://www.freedesktop.org/software/pkgconfig/"
-	exit 1
-    fi
-fi
-
-if test -z "$*"; then
-  echo "$ARGV0:	Note: \`./configure' will be run with no arguments."
-  echo "		If you wish to pass any to it, please specify them on the"
-  echo "		\`$0' command line."
-  echo
-fi
-
-do_cmd() {
-    echo "$ARGV0: running \`$@'"
-    $@
-}
-
-do_cmd $LIBTOOLIZE $LIBTOOLIZE_FLAGS
-
-do_cmd $ACLOCAL $ACLOCAL_FLAGS
-
-do_cmd $AUTOHEADER
-
-do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
-
-do_cmd $AUTOCONF
-
-do_cmd ./configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1
diff --git a/pixman/configure.in b/pixman/configure.in
deleted file mode 100644
index 4cbb5ba..0000000
--- a/pixman/configure.in
+++ /dev/null
@@ -1,92 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.54)
-
-AC_INIT(src/pixman.h)
-
-dnl ===========================================================================
-
-# Package version number, (as distinct from shared library version)
-LIBPIXMAN_VERSION=0.1.6-head
-
-# libtool shared library version
-
-# Increment if the interface has additions, changes, removals.
-LT_CURRENT=1
-
-# Increment any time the source changes; set to
-# 0 if you increment CURRENT
-LT_REVISION=0
-
-# Increment if any interfaces have been added; set to 0
-# if any interfaces have been removed. removal has
-# precedence over adding, so set to 0 if both happened.
-LT_AGE=0
-
-VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
-AC_SUBST(VERSION_INFO)
-
-dnl ===========================================================================
-
-AM_INIT_AUTOMAKE(libpixman, $LIBPIXMAN_VERSION)
-AM_CONFIG_HEADER(config.h)
-
-AM_MAINTAINER_MODE
-
-AC_PROG_CC
-AM_PROG_LIBTOOL
-
-AC_C_BIGENDIAN
-
-dnl Use lots of warning flags with GCC
-
-WARN_CFLAGS=""
-
-if test "x$GCC" = "xyes"; then
-	WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-	-Wmissing-prototypes -Wmissing-declarations \
-	-Wnested-externs -fno-strict-aliasing \
-	-Wno-attributes"
-fi
-
-AC_SUBST(WARN_CFLAGS)
-
-dnl ===========================================================================
-dnl Check for MMX
-
-MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
-
-have_mmx_intrinsics=no
-AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)
-xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS $MMX_CFLAGS"
-AC_COMPILE_IFELSE([
-#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
-#error "Need GCC >= 3.4 for MMX intrinsics"
-#endif
-#include <mmintrin.h>
-#include <xmmintrin.h>
-int main () {
-    __m64 v = _mm_cvtsi32_si64 (1);
-    v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
-    return _mm_cvtsi64_si32 (v);
-}], have_mmx_intrinsics=yes)
-CFLAGS=$xserver_save_CFLAGS
-AC_MSG_RESULT($have_mmx_intrinsics)
-
-if test $have_mmx_intrinsics = yes ; then
-   AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
-else
-   MMX_CFLAGS=
-fi
-AC_SUBST(MMX_CFLAGS)
-
-AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
-
-dnl ===========================================================================
-
-AC_OUTPUT([
-libpixman.pc
-Makefile
-src/Makefile
-])
diff --git a/pixman/libpixman.pc.in b/pixman/libpixman.pc.in
deleted file mode 100644
index 006018a..0000000
--- a/pixman/libpixman.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libpixman
-Description: Pixel manipulation library
-Version: @VERSION@
-Libs: -L${libdir} -lpixman
-Cflags: -I${includedir}
diff --git a/pixman/src/.gitignore b/pixman/src/.gitignore
deleted file mode 100644
index 1084758..0000000
--- a/pixman/src/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-Makefile
-Makefile.in
-*.gcda
-*.gcno
-*.la
-*.lo
-.libs
-.deps
-*.obj
-*.lib
-*.pdb
-*.o
-*~
diff --git a/pixman/src/Makefile.am b/pixman/src/Makefile.am
deleted file mode 100644
index 106f60b..0000000
--- a/pixman/src/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-noinst_LTLIBRARIES = libpixman.la
-
-libpixman_la_SOURCES = \
-	pixman.h \
-	pixmanint.h \
-	pixman-remap.h \
-	pixman-xserver-compat.h \
-	pixregion.c \
-	pixregionint.h \
-	fbpict.h \
-	fbpict.c \
-	icblt.c \
-	icbltone.c \
-	iccolor.c \
-	icformat.c \
-	icimage.c \
-	icimage.h \
-	icpixels.c \
-	icrect.c \
-	icrop.h \
-	icstipple.c \
-	ictrap.c \
-	ictransform.c \
-	ictri.c \
-	icutil.c \
-	fbedge.c \
-	fbedgeimp.h \
-	fbtrap.c \
-	fbcompose.c \
-	renderedge.c \
-	renderedge.h
-libpixman_la_CFLAGS = $(PIXMAN_CFLAGS)
-libpixman_la_LIBADD = $(PIXMAN_LDADD)
-
-if USE_MMX
-noinst_LTLIBRARIES += libpixman-mmx.la
-libpixman_mmx_la_SOURCES = \
-	fbmmx.c		\
-	fbmmx.h
-libpixman_mmx_la_CFLAGS = $(PIXMAN_CFLAGS)
-libpixman_mmx_la_LIBADD = $(PIXMAN_LDADD)
-libpixman_la_LIBADD += libpixman-mmx.la
-endif
-
-TESTS = check-pixmanint.sh
-EXTRA_DIST = $(TESTS)
diff --git a/pixman/src/Makefile.win32 b/pixman/src/Makefile.win32
deleted file mode 100644
index fcbe53b..0000000
--- a/pixman/src/Makefile.win32
+++ /dev/null
@@ -1,37 +0,0 @@
-CC = cl
-CFLAGS = /nologo /MD /Zi /O2 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DUSE_MMX
-
-SOURCES = \
-	fbcompose.c \
-	fbedge.c \
-	fbpict.c \
-	fbtrap.c \
-	icblt.c \
-	icbltone.c \
-	iccolor.c \
-	icformat.c \
-	icimage.c \
-	icpixels.c \
-	icrect.c \
-	icstipple.c \
-	ictransform.c \
-	ictrap.c \
-	ictri.c \
-	icutil.c \
-	pixregion.c \
-	renderedge.c \
-	fbmmx.c \
-	$(NULL)
-
-OBJECTS = $(subst .c,.obj,$(SOURCES))
-
-all: pixman.lib
-
-%.obj: %.c
-	@$(CC) $(CFLAGS) /c /Fo"$@" $<
-
-pixman.lib: $(OBJECTS)
-	lib /NOLOGO /OUT:$@ $(OBJECTS)
-
-clean:
-	@rm -f *.obj *.lib *.pdb || exit 0
diff --git a/pixman/src/check-config.sh b/pixman/src/check-config.sh
deleted file mode 100755
index a1f9194..0000000
--- a/pixman/src/check-config.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-LANG=C
-
-test -z "$srcdir" && srcdir=.
-status=0
-
-echo 'Checking source files for missing or misplaced #include <config.h>'
-
-find "$srcdir" -name '*.c' -or -name '*.cpp' |
-while read x; do
-	grep '\<include\>' "$x" /dev/null | head -n 1
-done |
-grep -v '<config.h>' |
-grep . && status = 1
-
-exit $status
diff --git a/pixman/src/check-pixmanint.sh b/pixman/src/check-pixmanint.sh
deleted file mode 100755
index d56ad90..0000000
--- a/pixman/src/check-pixmanint.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-LANG=C
-
-test -z "$srcdir" && srcdir=.
-status=0
-
-echo 'Checking source files for missing or misplaced #include "pixmanint.h"'
-
-find "$srcdir" -name '*.c' -or -name '*.cpp' |
-while read x; do
-	grep '\<include\>' "$x" /dev/null | head -n 1
-done |
-grep -v '"pixmanint.h"' |
-grep . && status = 1
-
-exit $status
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
deleted file mode 100644
index 4197e34..0000000
--- a/pixman/src/fbcompose.c
+++ /dev/null
@@ -1,4354 +0,0 @@
-/*
- * $XdotOrg: xc/programs/Xserver/fb/fbcompose.c,v 1.5 2005/01/13 20:49:21 sandmann Exp $
- *
- * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
- *             2005 Lars Knoll & Zack Rusin, Trolltech
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-#include "fbpict.h"
-
-#ifdef RENDER
-
-#include "pixregionint.h"
-
-#ifdef _MSC_VER
-#define _USE_MATH_DEFINES
-#endif
-
-#include <assert.h>
-#include <math.h>
-
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-/* #define PIXMAN_CONVOLUTION */
-/* #define PIXMAN_INDEXED_FORMATS */
-
-static Bool
-PictureTransformPoint3d (pixman_transform_t *transform,
-                         PictVector *vector)
-{
-    PictVector	    result;
-    int		    i, j;
-    xFixed_32_32    partial;
-    xFixed_48_16    v;
-
-    for (j = 0; j < 3; j++)
-    {
-	v = 0;
-	for (i = 0; i < 3; i++)
-	{
-	    partial = ((xFixed_48_16) transform->matrix[j][i] *
-		       (xFixed_48_16) vector->vector[i]);
-	    v += partial >> 16;
-	}
-	if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16)
-	    return FALSE;
-	result.vector[j] = (xFixed) v;
-    }
-    if (!result.vector[2])
-	return FALSE;
-    *vector = result;
-    return TRUE;
-}
-
-static unsigned int
-SourcePictureClassify (PicturePtr pict,
-		       int	  x,
-		       int	  y,
-		       int	  width,
-		       int	  height)
-{
-    if (pict->pSourcePict->type == SourcePictTypeSolidFill)
-    {
-	pict->pSourcePict->solidFill.class = SourcePictClassHorizontal;
-    }
-    else if (pict->pSourcePict->type == SourcePictTypeLinear)
-    {
-	PictVector   v;
-	xFixed_32_32 l;
-	xFixed_48_16 dx, dy, a, b, off;
-	xFixed_48_16 factors[4];
-	int	     i;
-
-	dx = pict->pSourcePict->linear.p2.x - pict->pSourcePict->linear.p1.x;
-	dy = pict->pSourcePict->linear.p2.y - pict->pSourcePict->linear.p1.y;
-	l = dx * dx + dy * dy;
-	if (l)
-	{
-	    a = (dx << 32) / l;
-	    b = (dy << 32) / l;
-	}
-	else
-	{
-	    a = b = 0;
-	}
-
-	off = (-a * pict->pSourcePict->linear.p1.x
-	       -b * pict->pSourcePict->linear.p1.y) >> 16;
-
-	for (i = 0; i < 3; i++)
-	{
-	    v.vector[0] = IntToxFixed ((i % 2) * (width  - 1) + x);
-	    v.vector[1] = IntToxFixed ((i / 2) * (height - 1) + y);
-	    v.vector[2] = xFixed1;
-
-	    if (pict->transform)
-	    {
-		if (!PictureTransformPoint3d (pict->transform, &v))
-		    return SourcePictClassUnknown;
-	    }
-
-	    factors[i] = ((a * v.vector[0] + b * v.vector[1]) >> 16) + off;
-	}
-
-	if (factors[2] == factors[0])
-	    pict->pSourcePict->linear.class = SourcePictClassHorizontal;
-	else if (factors[1] == factors[0])
-	    pict->pSourcePict->linear.class = SourcePictClassVertical;
-    }
-
-    return pict->pSourcePict->solidFill.class;
-}
-
-#define mod(a,b)	((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
-
-#define SCANLINE_BUFFER_LENGTH 2048
-
-typedef FASTCALL void (*fetchProc)(const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed);
-
-/*
- * All of the fetch functions
- */
-
-static FASTCALL void
-fbFetch_a8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    memcpy(buffer, (const CARD32 *)bits + x, width*sizeof(CARD32));
-}
-
-static FASTCALL void
-fbFetch_x8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD32 *pixel = (const CARD32 *)bits + x;
-    const CARD32 *end = pixel + width;
-    while (pixel < end) {
-        *buffer++ = *pixel++ | 0xff000000;
-    }
-}
-
-static FASTCALL void
-fbFetch_a8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD32 *pixel = (CARD32 *)bits + x;
-    const CARD32 *end = pixel + width;
-    while (pixel < end) {
-        *buffer++ =  ((*pixel & 0xff00ff00) |
-                      ((*pixel >> 16) & 0xff) |
-                      ((*pixel & 0xff) << 16));
-        ++pixel;
-    }
-}
-
-static FASTCALL void
-fbFetch_x8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD32 *pixel = (CARD32 *)bits + x;
-    const CARD32 *end = pixel + width;
-    while (pixel < end) {
-        *buffer++ =  0xff000000 |
-                     ((*pixel & 0x0000ff00) |
-                      ((*pixel >> 16) & 0xff) |
-                      ((*pixel & 0xff) << 16));
-        ++pixel;
-    }
-}
-
-static FASTCALL void
-fbFetch_r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + 3*x;
-    const CARD8 *end = pixel + 3*width;
-    while (pixel < end) {
-        CARD32 b = Fetch24(pixel) | 0xff000000;
-        pixel += 3;
-        *buffer++ = b;
-    }
-}
-
-static FASTCALL void
-fbFetch_b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + 3*x;
-    const CARD8 *end = pixel + 3*width;
-    while (pixel < end) {
-        CARD32 b = 0xff000000;
-#if IMAGE_BYTE_ORDER == MSBFirst
-        b |= (*pixel++);
-        b |= (*pixel++ << 8);
-        b |= (*pixel++ << 16);
-#else
-        b |= (*pixel++ << 16);
-        b |= (*pixel++ << 8);
-        b |= (*pixel++);
-#endif
-    }
-}
-
-static FASTCALL void
-fbFetch_r5g6b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32 r = (((p) << 3) & 0xf8) |
-                   (((p) << 5) & 0xfc00) |
-                   (((p) << 8) & 0xf80000);
-        r |= (r >> 5) & 0x70007;
-        r |= (r >> 6) & 0x300;
-        *buffer++ = 0xff000000 | r;
-    }
-}
-
-static FASTCALL void
-fbFetch_b5g6r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        b = ((p & 0xf800) | ((p & 0xe000) >> 5)) >> 8;
-        g = ((p & 0x07e0) | ((p & 0x0600) >> 6)) << 5;
-        r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b, a;
-
-        a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24;
-        r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
-        g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
-        b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
-        *buffer++ = (a | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_x1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9;
-        g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
-        b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2;
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b, a;
-
-        a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24;
-        b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
-        g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
-        r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
-        *buffer++ = (a | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_x1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7;
-        g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6;
-        r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14;
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b, a;
-
-        a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
-        r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
-        g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
-        b = ((p & 0x000f) | ((p & 0x000f) << 4));
-        *buffer++ = (a | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_x4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
-        g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
-        b = ((p & 0x000f) | ((p & 0x000f) << 4));
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b, a;
-
-        a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16;
-        b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
-        g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
-        r = ((p & 0x000f) | ((p & 0x000f) << 4));
-        *buffer++ = (a | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_x4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD16 *pixel = (const CARD16 *)bits + x;
-    const CARD16 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12;
-        g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8;
-        r = ((p & 0x000f) | ((p & 0x000f) << 4));
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        *buffer++ = (*pixel++) << 24;
-    }
-}
-
-static FASTCALL void
-fbFetch_r3g3b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        r = ((p & 0xe0) | ((p & 0xe0) >> 3) | ((p & 0xc0) >> 6)) << 16;
-        g = ((p & 0x1c) | ((p & 0x18) >> 3) | ((p & 0x1c) << 3)) << 8;
-        b = (((p & 0x03)     ) |
-             ((p & 0x03) << 2) |
-             ((p & 0x03) << 4) |
-             ((p & 0x03) << 6));
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_b2g3r3 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32  r,g,b;
-
-        b = (((p & 0xc0)     ) |
-             ((p & 0xc0) >> 2) |
-             ((p & 0xc0) >> 4) |
-             ((p & 0xc0) >> 6));
-        g = ((p & 0x38) | ((p & 0x38) >> 3) | ((p & 0x30) << 2)) << 8;
-        r = (((p & 0x07)     ) |
-             ((p & 0x07) << 3) |
-             ((p & 0x06) << 6)) << 16;
-        *buffer++ = (0xff000000 | r | g | b);
-    }
-}
-
-static FASTCALL void
-fbFetch_a2r2g2b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32   a,r,g,b;
-
-        a = ((p & 0xc0) * 0x55) << 18;
-        r = ((p & 0x30) * 0x55) << 12;
-        g = ((p & 0x0c) * 0x55) << 6;
-        b = ((p & 0x03) * 0x55);
-        *buffer++ = a|r|g|b;
-	}
-}
-
-static FASTCALL void
-fbFetch_a2b2g2r2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        CARD32   a,r,g,b;
-
-        a = ((p & 0xc0) * 0x55) << 18;
-        b = ((p & 0x30) * 0x55) >> 6;
-        g = ((p & 0x0c) * 0x55) << 6;
-        r = ((p & 0x03) * 0x55) << 16;
-        *buffer++ = a|r|g|b;
-    }
-}
-
-static FASTCALL void
-fbFetch_c8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    const CARD8 *pixel = (const CARD8 *)bits + x;
-    const CARD8 *end = pixel + width;
-    while (pixel < end) {
-        CARD32  p = *pixel++;
-        *buffer++ = indexed->rgba[p];
-    }
-}
-
-#define Fetch8(l,o)    (((CARD8 *) (l))[(o) >> 2])
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
-#else
-#define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) >> 4 : Fetch8(l,o) & 0xf)
-#endif
-
-static FASTCALL void
-fbFetch_a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-
-        p |= p << 4;
-        *buffer++ = p << 24;
-    }
-}
-
-static FASTCALL void
-fbFetch_r1g2b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-        CARD32  r,g,b;
-
-        r = ((p & 0x8) * 0xff) << 13;
-        g = ((p & 0x6) * 0x55) << 7;
-        b = ((p & 0x1) * 0xff);
-        *buffer++ = 0xff000000|r|g|b;
-    }
-}
-
-static FASTCALL void
-fbFetch_b1g2r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-        CARD32  r,g,b;
-
-        b = ((p & 0x8) * 0xff) >> 3;
-        g = ((p & 0x6) * 0x55) << 7;
-        r = ((p & 0x1) * 0xff) << 16;
-        *buffer++ = 0xff000000|r|g|b;
-    }
-}
-
-static FASTCALL void
-fbFetch_a1r1g1b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-        CARD32  a,r,g,b;
-
-        a = ((p & 0x8) * 0xff) << 21;
-        r = ((p & 0x4) * 0xff) << 14;
-        g = ((p & 0x2) * 0xff) << 7;
-        b = ((p & 0x1) * 0xff);
-        *buffer++ = a|r|g|b;
-    }
-}
-
-static FASTCALL void
-fbFetch_a1b1g1r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-        CARD32  a,r,g,b;
-
-        a = ((p & 0x8) * 0xff) << 21;
-        r = ((p & 0x4) * 0xff) >> 3;
-        g = ((p & 0x2) * 0xff) << 7;
-        b = ((p & 0x1) * 0xff) << 16;
-        *buffer++ = a|r|g|b;
-    }
-}
-
-static FASTCALL void
-fbFetch_c4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = Fetch4(bits, i + x);
-
-        *buffer++ = indexed->rgba[p];
-    }
-}
-
-static FASTCALL void
-fbFetch_a1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = ((CARD32 *)bits)[(i + x) >> 5];
-        CARD32  a;
-#if BITMAP_BIT_ORDER == MSBFirst
-        a = p >> (0x1f - ((i+x) & 0x1f));
-#else
-        a = p >> ((i+x) & 0x1f);
-#endif
-        a = a & 1;
-        a |= a << 1;
-        a |= a << 2;
-        a |= a << 4;
-        *buffer++ = a << 24;
-    }
-}
-
-static FASTCALL void
-fbFetch_g1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  p = ((CARD32 *)bits)[(i+x) >> 5];
-        CARD32 a;
-#if BITMAP_BIT_ORDER == MSBFirst
-        a = p >> (0x1f - ((i+x) & 0x1f));
-#else
-        a = p >> ((i+x) & 0x1f);
-#endif
-        a = a & 1;
-        *buffer++ = indexed->rgba[a];
-    }
-}
-
-static fetchProc fetchProcForPicture (PicturePtr pict)
-{
-    switch(pict->format_code) {
-    case PICT_a8r8g8b8: return fbFetch_a8r8g8b8;
-    case PICT_x8r8g8b8: return fbFetch_x8r8g8b8;
-    case PICT_a8b8g8r8: return fbFetch_a8b8g8r8;
-    case PICT_x8b8g8r8: return fbFetch_x8b8g8r8;
-
-        /* 24bpp formats */
-    case PICT_r8g8b8: return fbFetch_r8g8b8;
-    case PICT_b8g8r8: return fbFetch_b8g8r8;
-
-        /* 16bpp formats */
-    case PICT_r5g6b5: return fbFetch_r5g6b5;
-    case PICT_b5g6r5: return fbFetch_b5g6r5;
-
-    case PICT_a1r5g5b5: return fbFetch_a1r5g5b5;
-    case PICT_x1r5g5b5: return fbFetch_x1r5g5b5;
-    case PICT_a1b5g5r5: return fbFetch_a1b5g5r5;
-    case PICT_x1b5g5r5: return fbFetch_x1b5g5r5;
-    case PICT_a4r4g4b4: return fbFetch_a4r4g4b4;
-    case PICT_x4r4g4b4: return fbFetch_x4r4g4b4;
-    case PICT_a4b4g4r4: return fbFetch_a4b4g4r4;
-    case PICT_x4b4g4r4: return fbFetch_x4b4g4r4;
-
-        /* 8bpp formats */
-    case PICT_a8: return  fbFetch_a8;
-    case PICT_r3g3b2: return fbFetch_r3g3b2;
-    case PICT_b2g3r3: return fbFetch_b2g3r3;
-    case PICT_a2r2g2b2: return fbFetch_a2r2g2b2;
-    case PICT_a2b2g2r2: return fbFetch_a2b2g2r2;
-    case PICT_c8: return  fbFetch_c8;
-    case PICT_g8: return  fbFetch_c8;
-
-        /* 4bpp formats */
-    case PICT_a4: return  fbFetch_a4;
-    case PICT_r1g2b1: return fbFetch_r1g2b1;
-    case PICT_b1g2r1: return fbFetch_b1g2r1;
-    case PICT_a1r1g1b1: return fbFetch_a1r1g1b1;
-    case PICT_a1b1g1r1: return fbFetch_a1b1g1r1;
-    case PICT_c4: return  fbFetch_c4;
-    case PICT_g4: return  fbFetch_c4;
-
-        /* 1bpp formats */
-    case PICT_a1: return  fbFetch_a1;
-    case PICT_g1: return  fbFetch_g1;
-    default:
-        return NULL;
-    }
-}
-
-/*
- * Pixel wise fetching
- */
-
-typedef FASTCALL CARD32 (*fetchPixelProc)(const FbBits *bits, int offset, miIndexedPtr indexed);
-
-static FASTCALL CARD32
-fbFetchPixel_a8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    return ((CARD32 *)bits)[offset];
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    return ((CARD32 *)bits)[offset] | 0xff000000;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD32 *)bits)[offset];
-
-    return ((pixel & 0xff000000) |
-	    ((pixel >> 16) & 0xff) |
-	    (pixel & 0x0000ff00) |
-	    ((pixel & 0xff) << 16));
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD32 *)bits)[offset];
-
-    return ((0xff000000) |
-	    ((pixel >> 16) & 0xff) |
-	    (pixel & 0x0000ff00) |
-	    ((pixel & 0xff) << 16));
-}
-
-static FASTCALL CARD32
-fbFetchPixel_r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD8   *pixel = ((CARD8 *) bits) + (offset*3);
-#if IMAGE_BYTE_ORDER == MSBFirst
-    return (0xff000000 |
-	    (pixel[0] << 16) |
-	    (pixel[1] << 8) |
-	    (pixel[2]));
-#else
-    return (0xff000000 |
-            (pixel[2] << 16) |
-            (pixel[1] << 8) |
-            (pixel[0]));
-#endif
-}
-
-static FASTCALL CARD32
-fbFetchPixel_b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD8   *pixel = ((CARD8 *) bits) + (offset*3);
-#if IMAGE_BYTE_ORDER == MSBFirst
-    return (0xff000000 |
-	    (pixel[2] << 16) |
-	    (pixel[1] << 8) |
-	    (pixel[0]));
-#else
-    return (0xff000000 |
-	    (pixel[0] << 16) |
-	    (pixel[1] << 8) |
-	    (pixel[2]));
-#endif
-}
-
-static FASTCALL CARD32
-fbFetchPixel_r5g6b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    r = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) << 8;
-    g = ((pixel & 0x07e0) | ((pixel & 0x0600) >> 6)) << 5;
-    b = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) >> 2;
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_b5g6r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    b = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) >> 8;
-    g = ((pixel & 0x07e0) | ((pixel & 0x0600) >> 6)) << 5;
-    r = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) << 14;
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  a,r,g,b;
-
-    a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
-    r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9;
-    g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
-    b = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) >> 2;
-    return (a | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9;
-    g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
-    b = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) >> 2;
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  a,r,g,b;
-
-    a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24;
-    b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7;
-    g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
-    r = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) << 14;
-    return (a | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7;
-    g = ((pixel & 0x03e0) | ((pixel & 0x0380) >> 5)) << 6;
-    r = ((pixel & 0x001c) | ((pixel & 0x001f) << 5)) << 14;
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  a,r,g,b;
-
-    a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
-    r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
-    g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
-    b = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
-    return (a | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
-    g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
-    b = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  a,r,g,b;
-
-    a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16;
-    b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
-    g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
-    r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
-    return (a | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_x4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD16 *) bits)[offset];
-    CARD32  r,g,b;
-
-    b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12;
-    g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8;
-    r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4));
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-
-    return pixel << 24;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_r3g3b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-    CARD32  r,g,b;
-
-    r = ((pixel & 0xe0) | ((pixel & 0xe0) >> 3) | ((pixel & 0xc0) >> 6)) << 16;
-    g = ((pixel & 0x1c) | ((pixel & 0x18) >> 3) | ((pixel & 0x1c) << 3)) << 8;
-    b = (((pixel & 0x03)     ) |
-	 ((pixel & 0x03) << 2) |
-	 ((pixel & 0x03) << 4) |
-	 ((pixel & 0x03) << 6));
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_b2g3r3 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-    CARD32  r,g,b;
-
-    b = (((pixel & 0xc0)     ) |
-	 ((pixel & 0xc0) >> 2) |
-	 ((pixel & 0xc0) >> 4) |
-	 ((pixel & 0xc0) >> 6));
-    g = ((pixel & 0x38) | ((pixel & 0x38) >> 3) | ((pixel & 0x30) << 2)) << 8;
-    r = (((pixel & 0x07)     ) |
-	 ((pixel & 0x07) << 3) |
-	 ((pixel & 0x06) << 6)) << 16;
-    return (0xff000000 | r | g | b);
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a2r2g2b2 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-    CARD32   a,r,g,b;
-
-    a = ((pixel & 0xc0) * 0x55) << 18;
-    r = ((pixel & 0x30) * 0x55) << 12;
-    g = ((pixel & 0x0c) * 0x55) << 6;
-    b = ((pixel & 0x03) * 0x55);
-    return a|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a2b2g2r2 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-    CARD32   a,r,g,b;
-
-    a = ((pixel & 0xc0) * 0x55) << 18;
-    b = ((pixel & 0x30) * 0x55) >> 6;
-    g = ((pixel & 0x0c) * 0x55) << 6;
-    r = ((pixel & 0x03) * 0x55) << 16;
-    return a|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_c8 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32   pixel = ((CARD8 *) bits)[offset];
-    return indexed->rgba[pixel];
-}
-
-#define Fetch8(l,o)    (((CARD8 *) (l))[(o) >> 2])
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4)
-#else
-#define Fetch4(l,o)    ((o) & 2 ? Fetch8(l,o) >> 4 : Fetch8(l,o) & 0xf)
-#endif
-
-static FASTCALL CARD32
-fbFetchPixel_a4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-
-    pixel |= pixel << 4;
-    return pixel << 24;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_r1g2b1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-    CARD32  r,g,b;
-
-    r = ((pixel & 0x8) * 0xff) << 13;
-    g = ((pixel & 0x6) * 0x55) << 7;
-    b = ((pixel & 0x1) * 0xff);
-    return 0xff000000|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_b1g2r1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-    CARD32  r,g,b;
-
-    b = ((pixel & 0x8) * 0xff) >> 3;
-    g = ((pixel & 0x6) * 0x55) << 7;
-    r = ((pixel & 0x1) * 0xff) << 16;
-    return 0xff000000|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a1r1g1b1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-    CARD32  a,r,g,b;
-
-    a = ((pixel & 0x8) * 0xff) << 21;
-    r = ((pixel & 0x4) * 0xff) << 14;
-    g = ((pixel & 0x2) * 0xff) << 7;
-    b = ((pixel & 0x1) * 0xff);
-    return a|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a1b1g1r1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-    CARD32  a,r,g,b;
-
-    a = ((pixel & 0x8) * 0xff) << 21;
-    r = ((pixel & 0x4) * 0xff) >> 3;
-    g = ((pixel & 0x2) * 0xff) << 7;
-    b = ((pixel & 0x1) * 0xff) << 16;
-    return a|r|g|b;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_c4 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = Fetch4(bits, offset);
-
-    return indexed->rgba[pixel];
-}
-
-static FASTCALL CARD32
-fbFetchPixel_a1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32  pixel = ((CARD32 *)bits)[offset >> 5];
-    CARD32  a;
-#if BITMAP_BIT_ORDER == MSBFirst
-    a = pixel >> (0x1f - (offset & 0x1f));
-#else
-    a = pixel >> (offset & 0x1f);
-#endif
-    a = a & 1;
-    a |= a << 1;
-    a |= a << 2;
-    a |= a << 4;
-    return a << 24;
-}
-
-static FASTCALL CARD32
-fbFetchPixel_g1 (const FbBits *bits, int offset, miIndexedPtr indexed)
-{
-    CARD32 pixel = ((CARD32 *)bits)[offset >> 5];
-    CARD32 a;
-#if BITMAP_BIT_ORDER == MSBFirst
-    a = pixel >> (0x1f - (offset & 0x1f));
-#else
-    a = pixel >> (offset & 0x1f);
-#endif
-    a = a & 1;
-    return indexed->rgba[a];
-}
-
-static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict)
-{
-    switch(pict->format_code) {
-    case PICT_a8r8g8b8: return fbFetchPixel_a8r8g8b8;
-    case PICT_x8r8g8b8: return fbFetchPixel_x8r8g8b8;
-    case PICT_a8b8g8r8: return fbFetchPixel_a8b8g8r8;
-    case PICT_x8b8g8r8: return fbFetchPixel_x8b8g8r8;
-
-        /* 24bpp formats */
-    case PICT_r8g8b8: return fbFetchPixel_r8g8b8;
-    case PICT_b8g8r8: return fbFetchPixel_b8g8r8;
-
-        /* 16bpp formats */
-    case PICT_r5g6b5: return fbFetchPixel_r5g6b5;
-    case PICT_b5g6r5: return fbFetchPixel_b5g6r5;
-
-    case PICT_a1r5g5b5: return fbFetchPixel_a1r5g5b5;
-    case PICT_x1r5g5b5: return fbFetchPixel_x1r5g5b5;
-    case PICT_a1b5g5r5: return fbFetchPixel_a1b5g5r5;
-    case PICT_x1b5g5r5: return fbFetchPixel_x1b5g5r5;
-    case PICT_a4r4g4b4: return fbFetchPixel_a4r4g4b4;
-    case PICT_x4r4g4b4: return fbFetchPixel_x4r4g4b4;
-    case PICT_a4b4g4r4: return fbFetchPixel_a4b4g4r4;
-    case PICT_x4b4g4r4: return fbFetchPixel_x4b4g4r4;
-
-        /* 8bpp formats */
-    case PICT_a8: return  fbFetchPixel_a8;
-    case PICT_r3g3b2: return fbFetchPixel_r3g3b2;
-    case PICT_b2g3r3: return fbFetchPixel_b2g3r3;
-    case PICT_a2r2g2b2: return fbFetchPixel_a2r2g2b2;
-    case PICT_a2b2g2r2: return fbFetchPixel_a2b2g2r2;
-    case PICT_c8: return  fbFetchPixel_c8;
-    case PICT_g8: return  fbFetchPixel_c8;
-
-        /* 4bpp formats */
-    case PICT_a4: return  fbFetchPixel_a4;
-    case PICT_r1g2b1: return fbFetchPixel_r1g2b1;
-    case PICT_b1g2r1: return fbFetchPixel_b1g2r1;
-    case PICT_a1r1g1b1: return fbFetchPixel_a1r1g1b1;
-    case PICT_a1b1g1r1: return fbFetchPixel_a1b1g1r1;
-    case PICT_c4: return  fbFetchPixel_c4;
-    case PICT_g4: return  fbFetchPixel_c4;
-
-        /* 1bpp formats */
-    case PICT_a1: return  fbFetchPixel_a1;
-    case PICT_g1: return  fbFetchPixel_g1;
-    default:
-        return NULL;
-    }
-}
-
-/*
- * All the store functions
- */
-
-typedef FASTCALL void (*storeProc) (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed);
-
-#define Splita(v)	CARD32	a = ((v) >> 24), r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
-#define Split(v)	CARD32	r = ((v) >> 16) & 0xff, g = ((v) >> 8) & 0xff, b = (v) & 0xff
-
-static FASTCALL void
-fbStore_a8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    memcpy(((CARD32 *)bits) + x, values, width*sizeof(CARD32));
-}
-
-static FASTCALL void
-fbStore_x8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD32 *pixel = (CARD32 *)bits + x;
-    for (i = 0; i < width; ++i)
-        *pixel++ = values[i] & 0xffffff;
-}
-
-static FASTCALL void
-fbStore_a8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD32 *pixel = (CARD32 *)bits + x;
-    for (i = 0; i < width; ++i)
-        *pixel++ = (values[i] & 0xff00ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16);
-}
-
-static FASTCALL void
-fbStore_x8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD32 *pixel = (CARD32 *)bits + x;
-    for (i = 0; i < width; ++i)
-        *pixel++ = (values[i] & 0x0000ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16);
-}
-
-static FASTCALL void
-fbStore_r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8 *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Store24(pixel, values[i]);
-        pixel += 3;
-    }
-}
-
-static FASTCALL void
-fbStore_b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8 *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-#if IMAGE_BYTE_ORDER == MSBFirst
-        *pixel++ = Blue(values[i]);
-        *pixel++ = Green(values[i]);
-        *pixel++ = Red(values[i]);
-#else
-        *pixel++ = Red(values[i]);
-        *pixel++ = Green(values[i]);
-        *pixel++ = Blue(values[i]);
-#endif
-    }
-}
-
-static FASTCALL void
-fbStore_r5g6b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16 *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = values[i];
-        *pixel++ = ((s >> 3) & 0x001f) |
-                   ((s >> 5) & 0x07e0) |
-                   ((s >> 8) & 0xf800);
-    }
-}
-
-static FASTCALL void
-fbStore_b5g6r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((b << 8) & 0xf800) |
-                    ((g << 3) & 0x07e0) |
-                    ((r >> 3)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_a1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Splita(values[i]);
-        *pixel++ = (((a << 8) & 0x8000) |
-                    ((r << 7) & 0x7c00) |
-                    ((g << 2) & 0x03e0) |
-                    ((b >> 3)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_x1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((r << 7) & 0x7c00) |
-                    ((g << 2) & 0x03e0) |
-                    ((b >> 3)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_a1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Splita(values[i]);
-        *pixel++ = (((a << 8) & 0x8000) |
-                    ((b << 7) & 0x7c00) |
-                    ((g << 2) & 0x03e0) |
-                    ((r >> 3)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_x1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((b << 7) & 0x7c00) |
-                    ((g << 2) & 0x03e0) |
-                    ((r >> 3)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_a4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Splita(values[i]);
-        *pixel++ = (((a << 8) & 0xf000) |
-                    ((r << 4) & 0x0f00) |
-                    ((g     ) & 0x00f0) |
-                    ((b >> 4)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_x4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((r << 4) & 0x0f00) |
-                    ((g     ) & 0x00f0) |
-                    ((b >> 4)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_a4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Splita(values[i]);
-        *pixel++ = (((a << 8) & 0xf000) |
-                    ((b << 4) & 0x0f00) |
-                    ((g     ) & 0x00f0) |
-                    ((r >> 4)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_x4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD16  *pixel = ((CARD16 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((b << 4) & 0x0f00) |
-                    ((g     ) & 0x00f0) |
-                    ((r >> 4)         ));
-    }
-}
-
-static FASTCALL void
-fbStore_a8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8   *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        *pixel++ = values[i] >> 24;
-	}
-}
-
-static FASTCALL void
-fbStore_r3g3b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8   *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((r     ) & 0xe0) |
-                    ((g >> 3) & 0x1c) |
-                    ((b >> 6)       ));
-    }
-}
-
-static FASTCALL void
-fbStore_b2g3r3 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8   *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Split(values[i]);
-        *pixel++ = (((b     ) & 0xe0) |
-                    ((g >> 3) & 0x1c) |
-                    ((r >> 6)       ));
-    }
-}
-
-static FASTCALL void
-fbStore_a2r2g2b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8   *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        Splita(values[i]);
-        *pixel++ = (((a     ) & 0xc0) |
-                    ((r >> 2) & 0x30) |
-                    ((g >> 4) & 0x0c) |
-                    ((b >> 6)       ));
-    }
-}
-
-static FASTCALL void
-fbStore_c8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    CARD8   *pixel = ((CARD8 *) bits) + x;
-    for (i = 0; i < width; ++i) {
-        *pixel++ = miIndexToEnt24(indexed,values[i]);
-    }
-}
-
-#define Store8(l,o,v)  (((CARD8 *) l)[(o) >> 3] = (v))
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Store4(l,o,v)  Store8(l,o,((o) & 4 ? \
-				   (Fetch8(l,o) & 0xf0) | (v) : \
-				   (Fetch8(l,o) & 0x0f) | ((v) << 4)))
-#else
-#define Store4(l,o,v)  Store8(l,o,((o) & 4 ? \
-				   (Fetch8(l,o) & 0x0f) | ((v) << 4) : \
-				   (Fetch8(l,o) & 0xf0) | (v)))
-#endif
-
-static FASTCALL void
-fbStore_a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        Store4(bits, i + x, values[i]>>28);
-    }
-}
-
-static FASTCALL void
-fbStore_r1g2b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  pixel;
-
-        Split(values[i]);
-        pixel = (((r >> 4) & 0x8) |
-                 ((g >> 5) & 0x6) |
-                 ((b >> 7)      ));
-        Store4(bits, i + x, pixel);
-    }
-}
-
-static FASTCALL void
-fbStore_b1g2r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  pixel;
-
-        Split(values[i]);
-        pixel = (((b >> 4) & 0x8) |
-                 ((g >> 5) & 0x6) |
-                 ((r >> 7)      ));
-        Store4(bits, i + x, pixel);
-    }
-}
-
-static FASTCALL void
-fbStore_a1r1g1b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  pixel;
-        Splita(values[i]);
-        pixel = (((a >> 4) & 0x8) |
-                 ((r >> 5) & 0x4) |
-                 ((g >> 6) & 0x2) |
-                 ((b >> 7)      ));
-        Store4(bits, i + x, pixel);
-    }
-}
-
-static FASTCALL void
-fbStore_a1b1g1r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  pixel;
-        Splita(values[i]);
-        pixel = (((a >> 4) & 0x8) |
-                 ((b >> 5) & 0x4) |
-                 ((g >> 6) & 0x2) |
-                 ((r >> 7)      ));
-        Store4(bits, i + x, pixel);
-    }
-}
-
-static FASTCALL void
-fbStore_c4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  pixel;
-
-        pixel = miIndexToEnt24(indexed, values[i]);
-        Store4(bits, i + x, pixel);
-    }
-}
-
-static FASTCALL void
-fbStore_a1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  *pixel = ((CARD32 *) bits) + ((i+x) >> 5);
-        CARD32  mask = FbStipMask((i+x) & 0x1f, 1);
-
-        CARD32 v = values[i] & 0x80000000 ? mask : 0;
-        *pixel = (*pixel & ~mask) | v;
-    }
-}
-
-static FASTCALL void
-fbStore_g1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  *pixel = ((CARD32 *) bits) + ((i+x) >> 5);
-        CARD32  mask = FbStipMask((i+x) & 0x1f, 1);
-
-        CARD32 v = miIndexToEntY24(indexed,values[i]) ? mask : 0;
-        *pixel = (*pixel & ~mask) | v;
-    }
-}
-
-static storeProc storeProcForPicture (PicturePtr pict)
-{
-    switch(pict->format_code) {
-    case PICT_a8r8g8b8: return fbStore_a8r8g8b8;
-    case PICT_x8r8g8b8: return fbStore_x8r8g8b8;
-    case PICT_a8b8g8r8: return fbStore_a8b8g8r8;
-    case PICT_x8b8g8r8: return fbStore_x8b8g8r8;
-
-        /* 24bpp formats */
-    case PICT_r8g8b8: return fbStore_r8g8b8;
-    case PICT_b8g8r8: return fbStore_b8g8r8;
-
-        /* 16bpp formats */
-    case PICT_r5g6b5: return fbStore_r5g6b5;
-    case PICT_b5g6r5: return fbStore_b5g6r5;
-
-    case PICT_a1r5g5b5: return fbStore_a1r5g5b5;
-    case PICT_x1r5g5b5: return fbStore_x1r5g5b5;
-    case PICT_a1b5g5r5: return fbStore_a1b5g5r5;
-    case PICT_x1b5g5r5: return fbStore_x1b5g5r5;
-    case PICT_a4r4g4b4: return fbStore_a4r4g4b4;
-    case PICT_x4r4g4b4: return fbStore_x4r4g4b4;
-    case PICT_a4b4g4r4: return fbStore_a4b4g4r4;
-    case PICT_x4b4g4r4: return fbStore_x4b4g4r4;
-
-        /* 8bpp formats */
-    case PICT_a8: return  fbStore_a8;
-    case PICT_r3g3b2: return fbStore_r3g3b2;
-    case PICT_b2g3r3: return fbStore_b2g3r3;
-    case PICT_a2r2g2b2: return fbStore_a2r2g2b2;
-    case PICT_c8: return  fbStore_c8;
-    case PICT_g8: return  fbStore_c8;
-
-        /* 4bpp formats */
-    case PICT_a4: return  fbStore_a4;
-    case PICT_r1g2b1: return fbStore_r1g2b1;
-    case PICT_b1g2r1: return fbStore_b1g2r1;
-    case PICT_a1r1g1b1: return fbStore_a1r1g1b1;
-    case PICT_a1b1g1r1: return fbStore_a1b1g1r1;
-    case PICT_c4: return  fbStore_c4;
-    case PICT_g4: return  fbStore_c4;
-
-        /* 1bpp formats */
-    case PICT_a1: return  fbStore_a1;
-    case PICT_g1: return  fbStore_g1;
-    default:
-        return NULL;
-    }
-}
-
-/*
- * Combine src and mask
- */
-static FASTCALL void
-fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 a = mask[i] >> 24;
-        CARD32 s = src[i];
-        FbByteMul(s, a);
-        src[i] = s;
-    }
-}
-
-/*
- * All of the composing functions
- */
-
-static FASTCALL void
-fbCombineClear (CARD32 *dest, const CARD32 *src, int width)
-{
-    memset(dest, 0, width*sizeof(CARD32));
-}
-
-static FASTCALL void
-fbCombineSrcU (CARD32 *dest, const CARD32 *src, int width)
-{
-    memcpy(dest, src, width*sizeof(CARD32));
-}
-
-static FASTCALL void
-fbCombineOverU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 ia = Alpha(~s);
-
-        FbByteMulAdd(d, ia, s);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 ia = Alpha(~dest[i]);
-        FbByteMulAdd(s, ia, d);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineInU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 a = Alpha(dest[i]);
-        FbByteMul(s, a);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineInReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD32 a = Alpha(src[i]);
-        FbByteMul(d, a);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineOutU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 a = Alpha(~dest[i]);
-        FbByteMul(s, a);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineOutReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD32 a = Alpha(~src[i]);
-        FbByteMul(d, a);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineAtopU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 dest_a = Alpha(d);
-        CARD32 src_ia = Alpha(~s);
-
-        FbByteAddMul(s, dest_a, d, src_ia);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineAtopReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 src_a = Alpha(s);
-        CARD32 dest_ia = Alpha(~d);
-
-        FbByteAddMul(s, dest_ia, d, src_a);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineXorU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 src_ia = Alpha(~s);
-        CARD32 dest_ia = Alpha(~d);
-
-        FbByteAddMul(s, dest_ia, d, src_ia);
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineAddU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        FbByteAdd(d, s);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineSaturateU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  s = src[i];
-        CARD32 d = dest[i];
-        CARD16  sa, da;
-
-        sa = s >> 24;
-        da = ~d >> 24;
-        if (sa > da)
-        {
-            sa = FbIntDiv(da, sa);
-            FbByteMul(s, sa);
-        }
-        FbByteAdd(d, s);
-        dest[i] = d;
-    }
-}
-
-/*
- * All of the disjoint composing functions
-
- The four entries in the first column indicate what source contributions
- come from each of the four areas of the picture -- areas covered by neither
- A nor B, areas covered only by A, areas covered only by B and finally
- areas covered by both A and B.
-
-		Disjoint			Conjoint
-		Fa		Fb		Fa		Fb
-(0,0,0,0)	0		0		0		0
-(0,A,0,A)	1		0		1		0
-(0,0,B,B)	0		1		0		1
-(0,A,B,A)	1		min((1-a)/b,1)	1		max(1-a/b,0)
-(0,A,B,B)	min((1-b)/a,1)	1		max(1-b/a,0)	1
-(0,0,0,A)	max(1-(1-b)/a,0) 0		min(1,b/a)	0
-(0,0,0,B)	0		max(1-(1-a)/b,0) 0		min(a/b,1)
-(0,A,0,0)	min(1,(1-b)/a)	0		max(1-b/a,0)	0
-(0,0,B,0)	0		min(1,(1-a)/b)	0		max(1-a/b,0)
-(0,0,B,A)	max(1-(1-b)/a,0) min(1,(1-a)/b)	 min(1,b/a)	max(1-a/b,0)
-(0,A,0,B)	min(1,(1-b)/a)	max(1-(1-a)/b,0) max(1-b/a,0)	min(1,a/b)
-(0,A,B,0)	min(1,(1-b)/a)	min(1,(1-a)/b)	max(1-b/a,0)	max(1-a/b,0)
-
- */
-
-#define CombineAOut 1
-#define CombineAIn  2
-#define CombineBOut 4
-#define CombineBIn  8
-
-#define CombineClear	0
-#define CombineA	(CombineAOut|CombineAIn)
-#define CombineB	(CombineBOut|CombineBIn)
-#define CombineAOver	(CombineAOut|CombineBOut|CombineAIn)
-#define CombineBOver	(CombineAOut|CombineBOut|CombineBIn)
-#define CombineAAtop	(CombineBOut|CombineAIn)
-#define CombineBAtop	(CombineAOut|CombineBIn)
-#define CombineXor	(CombineAOut|CombineBOut)
-
-/* portion covered by a but not b */
-static inline CARD8
-fbCombineDisjointOutPart (CARD8 a, CARD8 b)
-{
-    /* min (1, (1-b) / a) */
-
-    b = ~b;		    /* 1 - b */
-    if (b >= a)		    /* 1 - b >= a -> (1-b)/a >= 1 */
-	return 0xff;	    /* 1 */
-    return FbIntDiv(b,a);   /* (1-b) / a */
-}
-
-/* portion covered by both a and b */
-static inline CARD8
-fbCombineDisjointInPart (CARD8 a, CARD8 b)
-{
-    /* max (1-(1-b)/a,0) */
-    /*  = - min ((1-b)/a - 1, 0) */
-    /*  = 1 - min (1, (1-b)/a) */
-
-    b = ~b;		    /* 1 - b */
-    if (b >= a)		    /* 1 - b >= a -> (1-b)/a >= 1 */
-	return 0;	    /* 1 - 1 */
-    return ~FbIntDiv(b,a);  /* 1 - (1-b) / a */
-}
-
-static FASTCALL void
-fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 combine)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 d = dest[i];
-        CARD32 m,n,o,p;
-        CARD16 Fa, Fb, t, u, v;
-        CARD8 sa = s >> 24;
-        CARD8 da = d >> 24;
-
-        switch (combine & CombineA) {
-        default:
-            Fa = 0;
-            break;
-        case CombineAOut:
-            Fa = fbCombineDisjointOutPart (sa, da);
-            break;
-        case CombineAIn:
-            Fa = fbCombineDisjointInPart (sa, da);
-            break;
-        case CombineA:
-            Fa = 0xff;
-            break;
-        }
-
-        switch (combine & CombineB) {
-        default:
-            Fb = 0;
-            break;
-        case CombineBOut:
-            Fb = fbCombineDisjointOutPart (da, sa);
-            break;
-        case CombineBIn:
-            Fb = fbCombineDisjointInPart (da, sa);
-            break;
-        case CombineB:
-            Fb = 0xff;
-            break;
-        }
-        m = FbGen (s,d,0,Fa,Fb,t, u, v);
-        n = FbGen (s,d,8,Fa,Fb,t, u, v);
-        o = FbGen (s,d,16,Fa,Fb,t, u, v);
-        p = FbGen (s,d,24,Fa,Fb,t, u, v);
-        s = m|n|o|p;
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineDisjointOverU (CARD32 *dest, const CARD32 *src, int width)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  s = src[i];
-        CARD16  a = s >> 24;
-
-        if (a != 0x00)
-        {
-            if (a != 0xff)
-            {
-                CARD32 d = dest[i];
-                a = fbCombineDisjointOutPart (d >> 24, a);
-                FbByteMulAdd(d, a, s);
-                s = d;
-            }
-            dest[i] = s;
-        }
-    }
-}
-
-static FASTCALL void
-fbCombineDisjointInU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineAIn);
-}
-
-static FASTCALL void
-fbCombineDisjointInReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineBIn);
-}
-
-static FASTCALL void
-fbCombineDisjointOutU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineAOut);
-}
-
-static FASTCALL void
-fbCombineDisjointOutReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineBOut);
-}
-
-static FASTCALL void
-fbCombineDisjointAtopU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineAAtop);
-}
-
-static FASTCALL void
-fbCombineDisjointAtopReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineBAtop);
-}
-
-static FASTCALL void
-fbCombineDisjointXorU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineDisjointGeneralU (dest, src, width, CombineXor);
-}
-
-/* portion covered by a but not b */
-static inline CARD8
-fbCombineConjointOutPart (CARD8 a, CARD8 b)
-{
-    /* max (1-b/a,0) */
-    /* = 1-min(b/a,1) */
-
-    /* min (1, (1-b) / a) */
-
-    if (b >= a)		    /* b >= a -> b/a >= 1 */
-	return 0x00;	    /* 0 */
-    return ~FbIntDiv(b,a);   /* 1 - b/a */
-}
-
-/* portion covered by both a and b */
-static inline CARD8
-fbCombineConjointInPart (CARD8 a, CARD8 b)
-{
-    /* min (1,b/a) */
-
-    if (b >= a)		    /* b >= a -> b/a >= 1 */
-	return 0xff;	    /* 1 */
-    return FbIntDiv(b,a);   /* b/a */
-}
-
-static FASTCALL void
-fbCombineConjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 combine)
-{
-    int i;
-    for (i = 0; i < width; ++i) {
-        CARD32  s = src[i];
-        CARD32 d = dest[i];
-        CARD32  m,n,o,p;
-        CARD16  Fa, Fb, t, u, v;
-        CARD8 sa = s >> 24;
-        CARD8 da = d >> 24;
-
-        switch (combine & CombineA) {
-        default:
-            Fa = 0;
-            break;
-        case CombineAOut:
-            Fa = fbCombineConjointOutPart (sa, da);
-            break;
-        case CombineAIn:
-            Fa = fbCombineConjointInPart (sa, da);
-            break;
-        case CombineA:
-            Fa = 0xff;
-            break;
-        }
-
-        switch (combine & CombineB) {
-        default:
-            Fb = 0;
-            break;
-        case CombineBOut:
-            Fb = fbCombineConjointOutPart (da, sa);
-            break;
-        case CombineBIn:
-            Fb = fbCombineConjointInPart (da, sa);
-            break;
-        case CombineB:
-            Fb = 0xff;
-            break;
-        }
-        m = FbGen (s,d,0,Fa,Fb,t, u, v);
-        n = FbGen (s,d,8,Fa,Fb,t, u, v);
-        o = FbGen (s,d,16,Fa,Fb,t, u, v);
-        p = FbGen (s,d,24,Fa,Fb,t, u, v);
-        s = m|n|o|p;
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineConjointOverU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineAOver);
-}
-
-static FASTCALL void
-fbCombineConjointOverReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineBOver);
-}
-
-static FASTCALL void
-fbCombineConjointInU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineAIn);
-}
-
-static FASTCALL void
-fbCombineConjointInReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineBIn);
-}
-
-static FASTCALL void
-fbCombineConjointOutU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineAOut);
-}
-
-static FASTCALL void
-fbCombineConjointOutReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineBOut);
-}
-
-static FASTCALL void
-fbCombineConjointAtopU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineAAtop);
-}
-
-static FASTCALL void
-fbCombineConjointAtopReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineBAtop);
-}
-
-static FASTCALL void
-fbCombineConjointXorU (CARD32 *dest, const CARD32 *src, int width)
-{
-    fbCombineConjointGeneralU (dest, src, width, CombineXor);
-}
-
-static CombineFuncU fbCombineFuncU[] = {
-    fbCombineClear,
-    fbCombineSrcU,
-    NULL, /* CombineDst */
-    fbCombineOverU,
-    fbCombineOverReverseU,
-    fbCombineInU,
-    fbCombineInReverseU,
-    fbCombineOutU,
-    fbCombineOutReverseU,
-    fbCombineAtopU,
-    fbCombineAtopReverseU,
-    fbCombineXorU,
-    fbCombineAddU,
-    fbCombineSaturateU,
-    NULL,
-    NULL,
-    fbCombineClear,
-    fbCombineSrcU,
-    NULL, /* CombineDst */
-    fbCombineDisjointOverU,
-    fbCombineSaturateU, /* DisjointOverReverse */
-    fbCombineDisjointInU,
-    fbCombineDisjointInReverseU,
-    fbCombineDisjointOutU,
-    fbCombineDisjointOutReverseU,
-    fbCombineDisjointAtopU,
-    fbCombineDisjointAtopReverseU,
-    fbCombineDisjointXorU,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    fbCombineClear,
-    fbCombineSrcU,
-    NULL, /* CombineDst */
-    fbCombineConjointOverU,
-    fbCombineConjointOverReverseU,
-    fbCombineConjointInU,
-    fbCombineConjointInReverseU,
-    fbCombineConjointOutU,
-    fbCombineConjointOutReverseU,
-    fbCombineConjointAtopU,
-    fbCombineConjointAtopReverseU,
-    fbCombineConjointXorU,
-};
-
-static inline void
-fbCombineMaskC (CARD32 *src, CARD32 *mask)
-{
-    CARD32 a = *mask;
-
-    CARD32	x;
-    CARD16	xa;
-
-    if (!a)
-    {
-	*src = 0;
-	return;
-    }
-
-    x = *src;
-    if (a == 0xffffffff)
-    {
-	x = x >> 24;
-	x |= x << 8;
-	x |= x << 16;
-	*mask = x;
-	return;
-    }
-
-    xa = x >> 24;
-    FbByteMulC(x, a);
-    *src = x;
-    FbByteMul(a, xa);
-    *mask = a;
-}
-
-static inline void
-fbCombineMaskValueC (CARD32 *src, const CARD32 *mask)
-{
-    CARD32 a = *mask;
-    CARD32	x;
-
-    if (!a)
-    {
-	*src = 0;
-	return;
-    }
-
-    if (a == 0xffffffff)
-	return;
-
-    x = *src;
-    FbByteMulC(x, a);
-    *src = x;
-}
-
-static inline void
-fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask)
-{
-    CARD32 a = *mask;
-    CARD32	x;
-
-    if (!a)
-	return;
-
-    x = *src >> 24;
-    if (x == 0xff)
-	return;
-    if (a == 0xffffffff)
-    {
-	x = x >> 24;
-	x |= x << 8;
-	x |= x << 16;
-	*mask = x;
-	return;
-    }
-
-    FbByteMul(a, x);
-    *mask = a;
-}
-
-static FASTCALL void
-fbCombineClearC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    memset(dest, 0, width*sizeof(CARD32));
-}
-
-static FASTCALL void
-fbCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-	CARD32 s = src[i];
-	CARD32 m = mask[i];
-
-	fbCombineMaskValueC (&s, &m);
-
-	*dest = s;
-    }
-}
-
-static FASTCALL void
-fbCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-	CARD32 s = src[i];
-	CARD32 m = mask[i];
-	CARD32 a;
-
-	fbCombineMaskC (&s, &m);
-
-	a = ~m;
-        if (a != 0xffffffff)
-        {
-            if (a)
-            {
-                CARD32 d = dest[i];
-                FbByteMulAddC(d, a, s);
-                s = d;
-            }
-            dest[i] = s;
-        }
-    }
-}
-
-static FASTCALL void
-fbCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD32 a = ~d >> 24;
-
-        if (a)
-        {
-            CARD32 s = src[i];
-	    CARD32 m = mask[i];
-
-	    fbCombineMaskValueC (&s, &m);
-
-            if (a != 0xff)
-            {
-                FbByteMulAdd(s, a, d);
-            }
-            dest[i] = s;
-        }
-    }
-}
-
-static FASTCALL void
-fbCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD16 a = d >> 24;
-        CARD32 s = 0;
-        if (a)
-        {
-	    CARD32 m = mask[i];
-
-	    s = src[i];
-	    fbCombineMaskValueC (&s, &m);
-            if (a != 0xff)
-            {
-                FbByteMul(s, a);
-            }
-        }
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 m = mask[i];
-        CARD32 a;
-
-	fbCombineMaskAlphaC (&s, &m);
-
-	a = m;
-        if (a != 0xffffffff)
-        {
-            CARD32 d = 0;
-            if (a)
-            {
-                d = dest[i];
-                FbByteMulC(d, a);
-            }
-            dest[i] = d;
-        }
-    }
-}
-
-static FASTCALL void
-fbCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD16 a = ~d >> 24;
-        CARD32 s = 0;
-        if (a)
-        {
-	    CARD32 m = mask[i];
-
-	    s = src[i];
-	    fbCombineMaskValueC (&s, &m);
-
-            if (a != 0xff)
-            {
-                FbByteMul(s, a);
-            }
-        }
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-	CARD32 s = src[i];
-	CARD32 m = mask[i];
-	CARD32 a;
-
-	fbCombineMaskAlphaC (&s, &m);
-
-        a = ~m;
-        if (a != 0xffffffff)
-        {
-            CARD32 d = 0;
-            if (a)
-            {
-                d = dest[i];
-                FbByteMulC(d, a);
-            }
-            dest[i] = d;
-        }
-    }
-}
-
-static FASTCALL void
-fbCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD32 s = src[i];
-        CARD32 m = mask[i];
-        CARD32 ad;
-        CARD16 as = d >> 24;
-
-	fbCombineMaskC (&s, &m);
-
-        ad = ~m;
-
-        FbByteAddMulC(d, ad, s, as);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-
-        CARD32 d = dest[i];
-        CARD32 s = src[i];
-        CARD32 m = mask[i];
-        CARD32 ad;
-        CARD16 as = ~d >> 24;
-
-	fbCombineMaskC (&s, &m);
-
-	ad = m;
-
-        FbByteAddMulC(d, ad, s, as);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 d = dest[i];
-        CARD32 s = src[i];
-        CARD32 m = mask[i];
-        CARD32 ad;
-        CARD16 as = ~d >> 24;
-
-	fbCombineMaskC (&s, &m);
-
-	ad = ~m;
-
-        FbByteAddMulC(d, ad, s, as);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32 s = src[i];
-        CARD32 m = mask[i];
-        CARD32 d = dest[i];
-
-	fbCombineMaskValueC (&s, &m);
-
-        FbByteAdd(d, s);
-        dest[i] = d;
-    }
-}
-
-static FASTCALL void
-fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32  s, d;
-        CARD16  sa, sr, sg, sb, da;
-        CARD16  t, u, v;
-        CARD32  m,n,o,p;
-
-        d = dest[i];
-        s = src[i];
-	m = mask[i];
-
-	fbCombineMaskC (&s, &m);
-
-        sa = (m >> 24);
-        sr = (m >> 16) & 0xff;
-        sg = (m >>  8) & 0xff;
-        sb = (m      ) & 0xff;
-        da = ~d >> 24;
-
-        if (sb <= da)
-            m = FbAdd(s,d,0,t);
-        else
-            m = FbGen (s, d, 0, (da << 8) / sb, 0xff, t, u, v);
-
-        if (sg <= da)
-            n = FbAdd(s,d,8,t);
-        else
-            n = FbGen (s, d, 8, (da << 8) / sg, 0xff, t, u, v);
-
-        if (sr <= da)
-            o = FbAdd(s,d,16,t);
-        else
-            o = FbGen (s, d, 16, (da << 8) / sr, 0xff, t, u, v);
-
-        if (sa <= da)
-            p = FbAdd(s,d,24,t);
-        else
-            p = FbGen (s, d, 24, (da << 8) / sa, 0xff, t, u, v);
-
-        dest[i] = m|n|o|p;
-    }
-}
-
-static FASTCALL void
-fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, CARD8 combine)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32  s, d;
-        CARD32  m,n,o,p;
-        CARD32  Fa, Fb;
-        CARD16  t, u, v;
-        CARD32  sa;
-        CARD8   da;
-
-        s = src[i];
-        m = mask[i];
-        d = dest[i];
-        da = d >> 24;
-
-	fbCombineMaskC (&s, &m);
-
-	sa = m;
-
-        switch (combine & CombineA) {
-        default:
-            Fa = 0;
-            break;
-        case CombineAOut:
-            m = fbCombineDisjointOutPart ((CARD8) (sa >> 0), da);
-            n = fbCombineDisjointOutPart ((CARD8) (sa >> 8), da) << 8;
-            o = fbCombineDisjointOutPart ((CARD8) (sa >> 16), da) << 16;
-            p = fbCombineDisjointOutPart ((CARD8) (sa >> 24), da) << 24;
-            Fa = m|n|o|p;
-            break;
-        case CombineAIn:
-            m = fbCombineDisjointInPart ((CARD8) (sa >> 0), da);
-            n = fbCombineDisjointInPart ((CARD8) (sa >> 8), da) << 8;
-            o = fbCombineDisjointInPart ((CARD8) (sa >> 16), da) << 16;
-            p = fbCombineDisjointInPart ((CARD8) (sa >> 24), da) << 24;
-            Fa = m|n|o|p;
-            break;
-        case CombineA:
-            Fa = 0xffffffff;
-            break;
-        }
-
-        switch (combine & CombineB) {
-        default:
-            Fb = 0;
-            break;
-        case CombineBOut:
-            m = fbCombineDisjointOutPart (da, (CARD8) (sa >> 0));
-            n = fbCombineDisjointOutPart (da, (CARD8) (sa >> 8)) << 8;
-            o = fbCombineDisjointOutPart (da, (CARD8) (sa >> 16)) << 16;
-            p = fbCombineDisjointOutPart (da, (CARD8) (sa >> 24)) << 24;
-            Fb = m|n|o|p;
-            break;
-        case CombineBIn:
-            m = fbCombineDisjointInPart (da, (CARD8) (sa >> 0));
-            n = fbCombineDisjointInPart (da, (CARD8) (sa >> 8)) << 8;
-            o = fbCombineDisjointInPart (da, (CARD8) (sa >> 16)) << 16;
-            p = fbCombineDisjointInPart (da, (CARD8) (sa >> 24)) << 24;
-            Fb = m|n|o|p;
-            break;
-        case CombineB:
-            Fb = 0xffffffff;
-            break;
-        }
-        m = FbGen (s,d,0,FbGet8(Fa,0),FbGet8(Fb,0),t, u, v);
-        n = FbGen (s,d,8,FbGet8(Fa,8),FbGet8(Fb,8),t, u, v);
-        o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v);
-        p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v);
-        s = m|n|o|p;
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineDisjointOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineAOver);
-}
-
-static FASTCALL void
-fbCombineDisjointInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineAIn);
-}
-
-static FASTCALL void
-fbCombineDisjointInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineBIn);
-}
-
-static FASTCALL void
-fbCombineDisjointOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineAOut);
-}
-
-static FASTCALL void
-fbCombineDisjointOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineBOut);
-}
-
-static FASTCALL void
-fbCombineDisjointAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineAAtop);
-}
-
-static FASTCALL void
-fbCombineDisjointAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineBAtop);
-}
-
-static FASTCALL void
-fbCombineDisjointXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineDisjointGeneralC (dest, src, mask, width, CombineXor);
-}
-
-static FASTCALL void
-fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, CARD8 combine)
-{
-    int i;
-
-    for (i = 0; i < width; ++i) {
-        CARD32  s, d;
-        CARD32  m,n,o,p;
-        CARD32  Fa, Fb;
-        CARD16  t, u, v;
-        CARD32  sa;
-        CARD8   da;
-
-        s = src[i];
-        m = mask[i];
-        d = dest[i];
-        da = d >> 24;
-
-	fbCombineMaskC (&s, &m);
-
-        sa = m;
-
-        switch (combine & CombineA) {
-        default:
-            Fa = 0;
-            break;
-        case CombineAOut:
-            m = fbCombineConjointOutPart ((CARD8) (sa >> 0), da);
-            n = fbCombineConjointOutPart ((CARD8) (sa >> 8), da) << 8;
-            o = fbCombineConjointOutPart ((CARD8) (sa >> 16), da) << 16;
-            p = fbCombineConjointOutPart ((CARD8) (sa >> 24), da) << 24;
-            Fa = m|n|o|p;
-            break;
-        case CombineAIn:
-            m = fbCombineConjointInPart ((CARD8) (sa >> 0), da);
-            n = fbCombineConjointInPart ((CARD8) (sa >> 8), da) << 8;
-            o = fbCombineConjointInPart ((CARD8) (sa >> 16), da) << 16;
-            p = fbCombineConjointInPart ((CARD8) (sa >> 24), da) << 24;
-            Fa = m|n|o|p;
-            break;
-        case CombineA:
-            Fa = 0xffffffff;
-            break;
-        }
-
-        switch (combine & CombineB) {
-        default:
-            Fb = 0;
-            break;
-        case CombineBOut:
-            m = fbCombineConjointOutPart (da, (CARD8) (sa >> 0));
-            n = fbCombineConjointOutPart (da, (CARD8) (sa >> 8)) << 8;
-            o = fbCombineConjointOutPart (da, (CARD8) (sa >> 16)) << 16;
-            p = fbCombineConjointOutPart (da, (CARD8) (sa >> 24)) << 24;
-            Fb = m|n|o|p;
-            break;
-        case CombineBIn:
-            m = fbCombineConjointInPart (da, (CARD8) (sa >> 0));
-            n = fbCombineConjointInPart (da, (CARD8) (sa >> 8)) << 8;
-            o = fbCombineConjointInPart (da, (CARD8) (sa >> 16)) << 16;
-            p = fbCombineConjointInPart (da, (CARD8) (sa >> 24)) << 24;
-            Fb = m|n|o|p;
-            break;
-        case CombineB:
-            Fb = 0xffffffff;
-            break;
-        }
-        m = FbGen (s,d,0,FbGet8(Fa,0),FbGet8(Fb,0),t, u, v);
-        n = FbGen (s,d,8,FbGet8(Fa,8),FbGet8(Fb,8),t, u, v);
-        o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v);
-        p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v);
-        s = m|n|o|p;
-        dest[i] = s;
-    }
-}
-
-static FASTCALL void
-fbCombineConjointOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineAOver);
-}
-
-static FASTCALL void
-fbCombineConjointOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineBOver);
-}
-
-static FASTCALL void
-fbCombineConjointInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineAIn);
-}
-
-static FASTCALL void
-fbCombineConjointInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineBIn);
-}
-
-static FASTCALL void
-fbCombineConjointOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineAOut);
-}
-
-static FASTCALL void
-fbCombineConjointOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineBOut);
-}
-
-static FASTCALL void
-fbCombineConjointAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineAAtop);
-}
-
-static FASTCALL void
-fbCombineConjointAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineBAtop);
-}
-
-static FASTCALL void
-fbCombineConjointXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    fbCombineConjointGeneralC (dest, src, mask, width, CombineXor);
-}
-
-static CombineFuncC fbCombineFuncC[] = {
-    fbCombineClearC,
-    fbCombineSrcC,
-    NULL, /* Dest */
-    fbCombineOverC,
-    fbCombineOverReverseC,
-    fbCombineInC,
-    fbCombineInReverseC,
-    fbCombineOutC,
-    fbCombineOutReverseC,
-    fbCombineAtopC,
-    fbCombineAtopReverseC,
-    fbCombineXorC,
-    fbCombineAddC,
-    fbCombineSaturateC,
-    NULL,
-    NULL,
-    fbCombineClearC,	    /* 0x10 */
-    fbCombineSrcC,
-    NULL, /* Dest */
-    fbCombineDisjointOverC,
-    fbCombineSaturateC, /* DisjointOverReverse */
-    fbCombineDisjointInC,
-    fbCombineDisjointInReverseC,
-    fbCombineDisjointOutC,
-    fbCombineDisjointOutReverseC,
-    fbCombineDisjointAtopC,
-    fbCombineDisjointAtopReverseC,
-    fbCombineDisjointXorC,  /* 0x1b */
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-    fbCombineClearC,
-    fbCombineSrcC,
-    NULL, /* Dest */
-    fbCombineConjointOverC,
-    fbCombineConjointOverReverseC,
-    fbCombineConjointInC,
-    fbCombineConjointInReverseC,
-    fbCombineConjointOutC,
-    fbCombineConjointOutReverseC,
-    fbCombineConjointAtopC,
-    fbCombineConjointAtopReverseC,
-    fbCombineConjointXorC,
-};
-
-FbComposeFunctions composeFunctions = {
-    fbCombineFuncU,
-    fbCombineFuncC,
-    fbCombineMaskU
-};
-
-static void fbFetchSolid(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
-{
-    FbBits *bits;
-    FbStride stride;
-    int bpp;
-    int xoff, yoff;
-    CARD32 color;
-    CARD32 *end;
-    fetchPixelProc fetch = fetchPixelProcForPicture(pict);
-#ifdef PIXMAN_INDEXED_FORMATS
-    miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate;
-#else
-    miIndexedPtr indexed = NULL;
-#endif
-
-    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-    bits += yoff*stride + (xoff*bpp >> FB_SHIFT);
-
-    color = fetch(bits, 0, indexed);
-
-    end = buffer + width;
-    while (buffer < end)
-        *buffer++ = color;
-}
-
-static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
-{
-    FbBits *bits;
-    FbStride stride;
-    int bpp;
-    int xoff, yoff;
-    fetchProc fetch = fetchProcForPicture(pict);
-#ifdef PIXMAN_INDEXED_FORMATS
-    miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate;
-#else
-    miIndexedPtr indexed = NULL;
-#endif
-
-    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-    x += xoff;
-    y += yoff;
-
-    bits += y*stride;
-
-    fetch(bits, x, width, buffer, indexed);
-}
-
-#define DIV(a,b) ((((a) < 0) == ((b) < 0)) ? (a) / (b) :\
-        ((a) - (b) + 1 - (((b) < 0) << 1)) / (b))
-
-typedef struct
-{
-    CARD32        left_ag;
-    CARD32        left_rb;
-    CARD32        right_ag;
-    CARD32        right_rb;
-    int32_t       left_x;
-    int32_t       right_x;
-    int32_t       stepper;
-
-    pixman_gradient_stop_t  *stops;
-    int                      num_stops;
-    unsigned int             spread;
-
-    int           need_reset;
-} GradientWalker;
-
-static void
-_gradient_walker_init (GradientWalker  *walker,
-                       SourcePictPtr    pGradient,
-                       unsigned int     spread)
-{
-    walker->num_stops = pGradient->gradient.nstops;
-    walker->stops     = pGradient->gradient.stops;
-    walker->left_x    = 0;
-    walker->right_x   = 0x10000;
-    walker->stepper   = 0;
-    walker->left_ag   = 0;
-    walker->left_rb   = 0;
-    walker->right_ag  = 0;
-    walker->right_rb  = 0;
-    walker->spread    = spread;
-
-    walker->need_reset = TRUE;
-}
-
-static void
-_gradient_walker_reset (GradientWalker  *walker,
-                        xFixed_32_32     pos)
-{
-    int32_t                  x, left_x, right_x;
-    pixman_color_t          *left_c, *right_c;
-    int                      n, count = walker->num_stops;
-    pixman_gradient_stop_t  *stops = walker->stops;
-
-    static const pixman_color_t   transparent_black = { 0, 0, 0, 0 };
-
-    switch (walker->spread)
-    {
-    case RepeatNormal:
-	x = (int32_t)pos & 0xFFFF;
-	for (n = 0; n < count; n++)
-	    if (x < stops[n].x)
-		break;
-	if (n == 0) {
-	    left_x =  stops[count-1].x - 0x10000;
-	    left_c = &stops[count-1].color;
-	} else {
-	    left_x =  stops[n-1].x;
-	    left_c = &stops[n-1].color;
-	}
-
-	if (n == count) {
-	    right_x =  stops[0].x + 0x10000;
-	    right_c = &stops[0].color;
-	} else {
-	    right_x =  stops[n].x;
-	    right_c = &stops[n].color;
-	}
-	left_x  += (pos - x);
-	right_x += (pos - x);
-	break;
-
-    case RepeatPad:
-	for (n = 0; n < count; n++)
-	    if (pos < stops[n].x)
-		break;
-
-	if (n == 0) {
-	    left_x =  INT_MIN;
-	    left_c = &stops[0].color;
-	} else {
-	    left_x =  stops[n-1].x;
-	    left_c = &stops[n-1].color;
-	}
-
-	if (n == count) {
-	    right_x =  INT_MAX;
-	    right_c = &stops[n-1].color;
-	} else {
-	    right_x =  stops[n].x;
-	    right_c = &stops[n].color;
-	}
-	break;
-
-    case RepeatReflect:
-	x = (int32_t)pos & 0xFFFF;
-	if ((int32_t)pos & 0x10000)
-	    x = 0x10000 - x;
-	for (n = 0; n < count; n++)
-	    if (x < stops[n].x)
-		break;
-
-	if (n == 0) {
-	    left_x =  -stops[0].x;
-	    left_c = &stops[0].color;
-	} else {
-	    left_x =  stops[n-1].x;
-	    left_c = &stops[n-1].color;
-	}
-
-	if (n == count) {
-	    right_x = 0x20000 - stops[n-1].x;
-	    right_c = &stops[n-1].color;
-	} else {
-	    right_x =  stops[n].x;
-	    right_c = &stops[n].color;
-	}
-
-	if ((int32_t)pos & 0x10000) {
-	    pixman_color_t  *tmp_c;
-	    int32_t          tmp_x;
-
-	    tmp_x   = 0x10000 - right_x;
-	    right_x = 0x10000 - left_x;
-	    left_x  = tmp_x;
-
-	    tmp_c   = right_c;
-	    right_c = left_c;
-	    left_c  = tmp_c;
-
-            x = 0x10000 - x;
-	}
-	left_x  += (pos - x);
-	right_x += (pos - x);
-	break;
-
-    default:  /* RepeatNone */
-	for (n = 0; n < count; n++)
-	    if (pos < stops[n].x)
-		break;
-
-	if (n == 0)
-	{
-	    left_x  =  INT_MIN;
-	    right_x =  stops[0].x;
-	    left_c  = right_c = (pixman_color_t*) &transparent_black;
-	}
-	else if (n == count)
-	{
-	    left_x  = stops[n-1].x;
-	    right_x = INT_MAX;
-	    left_c  = right_c = (pixman_color_t*) &transparent_black;
-	}
-	else
-	{
-	    left_x  =  stops[n-1].x;
-	    right_x =  stops[n].x;
-	    left_c  = &stops[n-1].color;
-	    right_c = &stops[n].color;
-	}
-    }
-
-    walker->left_x   = left_x;
-    walker->right_x  = right_x;
-    walker->left_ag  = ((left_c->alpha >> 8) << 16)   | (left_c->green >> 8);
-    walker->left_rb  = ((left_c->red & 0xff00) << 8)  | (left_c->blue >> 8);
-    walker->right_ag = ((right_c->alpha >> 8) << 16)  | (right_c->green >> 8);
-    walker->right_rb = ((right_c->red & 0xff00) << 8) | (right_c->blue >> 8);
-
-    if ( walker->left_x == walker->right_x           ||
-	 ( walker->left_ag == walker->right_ag &&
-	   walker->left_rb == walker->right_rb )   )
-    {
-	walker->stepper = 0;
-    }
-    else
-    {
-	int32_t width = right_x - left_x;
-	walker->stepper = ((1 << 24) + width/2)/width;
-    }
-
-    walker->need_reset = FALSE;
-}
-
-#define  GRADIENT_WALKER_NEED_RESET(w,x)  \
-   ( (w)->need_reset || (x) < (w)->left_x || (x) >= (w)->right_x)
-
-/* the following assumes that GRADIENT_WALKER_NEED_RESET(w,x) is FALSE */
-static CARD32
-_gradient_walker_pixel (GradientWalker  *walker,
-                        xFixed_32_32     x)
-{
-    int  dist, idist;
-    uint32_t  t1, t2, a, color;
-
-    if (GRADIENT_WALKER_NEED_RESET (walker, x))
-        _gradient_walker_reset (walker, x);
-
-    dist  = ((int)(x - walker->left_x)*walker->stepper) >> 16;
-    idist = 256 - dist;
-
-    /* combined INTERPOLATE and premultiply */
-    t1 = walker->left_rb*idist + walker->right_rb*dist;
-    t1 = (t1 >> 8) & 0xff00ff;
-
-    t2  = walker->left_ag*idist + walker->right_ag*dist;
-    t2 &= 0xff00ff00;
-
-    color = t2 & 0xff000000;
-    a     = t2 >> 24;
-
-    t1  = t1*a + 0x800080;
-    t1  = (t1 + ((t1 >> 8) & 0xff00ff)) >> 8;
-
-    t2  = (t2 >> 8)*a + 0x800080;
-    t2  = (t2 + ((t2 >> 8) & 0xff00ff));
-
-    return (color | (t1 & 0xff00ff) | (t2 & 0xff00));
-}
-
-static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
-{
-    SourcePictPtr   pGradient = pict->pSourcePict;
-    GradientWalker  walker;
-    CARD32         *end = buffer + width;
-
-    _gradient_walker_init (&walker, pGradient, pict->repeat);
-
-    if (pGradient->type == SourcePictTypeSolidFill) {
-        register CARD32 color = pGradient->solidFill.color;
-        while (buffer < end) {
-            *buffer++ = color;
-        }
-    } else if (pGradient->type == SourcePictTypeLinear) {
-        PictVector v, unit;
-        xFixed_32_32 l;
-        xFixed_48_16 dx, dy, a, b, off;
-
-        /* reference point is the center of the pixel */
-        v.vector[0] = IntToxFixed(x) + xFixed1/2;
-        v.vector[1] = IntToxFixed(y) + xFixed1/2;
-        v.vector[2] = xFixed1;
-        if (pict->transform) {
-            if (!PictureTransformPoint3d (pict->transform, &v))
-                return;
-            unit.vector[0] = pict->transform->matrix[0][0];
-            unit.vector[1] = pict->transform->matrix[1][0];
-            unit.vector[2] = pict->transform->matrix[2][0];
-        } else {
-            unit.vector[0] = xFixed1;
-            unit.vector[1] = 0;
-            unit.vector[2] = 0;
-        }
-
-        dx = pGradient->linear.p2.x - pGradient->linear.p1.x;
-        dy = pGradient->linear.p2.y - pGradient->linear.p1.y;
-        l = dx*dx + dy*dy;
-        if (l != 0) {
-            a = (dx << 32) / l;
-            b = (dy << 32) / l;
-            off = (-a*pGradient->linear.p1.x - b*pGradient->linear.p1.y)>>16;
-        }
-        if (l == 0  || (unit.vector[2] == 0 && v.vector[2] == xFixed1)) {
-            xFixed_48_16 inc, t;
-            /* affine transformation only */
-            if (l == 0) {
-                t = 0;
-                inc = 0;
-            } else {
-                t = ((a*v.vector[0] + b*v.vector[1]) >> 16) + off;
-                inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16;
-            }
-
-	    if (pGradient->linear.class == SourcePictClassVertical)
-	    {
-		register CARD32 color;
-
-		color = _gradient_walker_pixel( &walker, t );
-		while (buffer < end)
-		    *buffer++ = color;
-	    }
-	    else
-	    {
-                if (!mask) {
-                    while (buffer < end)
-                    {
-                        *buffer = _gradient_walker_pixel (&walker, t);
-                        buffer += 1;
-                        t      += inc;
-                    }
-                } else {
-                    while (buffer < end) {
-                        if (*mask++ & maskBits)
-                        {
-                            *buffer = _gradient_walker_pixel (&walker, t);
-                        }
-                        buffer += 1;
-                        t      += inc;
-                    }
-                }
-	    }
-	}
-	else /* projective transformation */
-	{
-	    xFixed_48_16 t;
-
-	    if (pGradient->linear.class == SourcePictClassVertical)
-	    {
-		register CARD32 color;
-
-		if (v.vector[2] == 0)
-		{
-		    t = 0;
-		}
-		else
-		{
-		    xFixed_48_16 x, y;
-
-		    x = ((xFixed_48_16) v.vector[0] << 16) / v.vector[2];
-		    y = ((xFixed_48_16) v.vector[1] << 16) / v.vector[2];
-		    t = ((a * x + b * y) >> 16) + off;
-		}
-
-		color = _gradient_walker_pixel( &walker, t );
-		while (buffer < end)
-		    *buffer++ = color;
-	    }
-	    else
-	    {
-                while (buffer < end)
-                {
-                    if (!mask || *mask++ & maskBits)
-                    {
-                        if (v.vector[2] == 0) {
-                            t = 0;
-                        } else {
-                            xFixed_48_16 x, y;
-                            x = ((xFixed_48_16)v.vector[0] << 16) / v.vector[2];
-                            y = ((xFixed_48_16)v.vector[1] << 16) / v.vector[2];
-                            t = ((a*x + b*y) >> 16) + off;
-                        }
-                        *buffer = _gradient_walker_pixel (&walker, t);
-                    }
-                    ++buffer;
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-	    }
-        }
-    } else {
-
-/*
- * In the radial gradient problem we are given two circles (c₁,r₁) and
- * (câ‚‚,râ‚‚) that define the gradient itself. Then, for any point p, we
- * must compute the value(s) of t within [0.0, 1.0] representing the
- * circle(s) that would color the point.
- *
- * There are potentially two values of t since the point p can be
- * colored by both sides of the circle, (which happens whenever one
- * circle is not entirely contained within the other).
- *
- * If we solve for a value of t that is outside of [0.0, 1.0] then we
- * use the extend mode (NONE, REPEAT, REFLECT, or PAD) to map to a
- * value within [0.0, 1.0].
- *
- * Here is an illustration of the problem:
- *
- *              pâ‚‚
- *           p  •
- *           •   ╲
- *        ·       ╲r₂
- *  p₁ ·           ╲
- *  •              θ╲
- *   ╲             ╌╌•
- *    ╲r₁        ·   c₂
- *    θ╲    ·
- *    ╌╌•
- *      c₁
- *
- * Given (c₁,r₁), (c₂,r₂) and p, we must find an angle θ such that two
- * points p₁ and p₂ on the two circles are collinear with p. Then, the
- * desired value of t is the ratio of the length of p₁p to the length
- * of p₁p₂.
- *
- * So, we have six unknown values: (p₁x, p₁y), (p₂x, p₂y), θ and t.
- * We can also write six equations that constrain the problem:
- *
- * Point p₁ is a distance r₁ from c₁ at an angle of θ:
- *
- *	1. p₁x = c₁x + r₁·cos θ
- *	2. p₁y = c₁y + r₁·sin θ
- *
- * Point p₂ is a distance r₂ from c₂ at an angle of θ:
- *
- *	3. p₂x = c₂x + r2·cos θ
- *	4. p₂y = c₂y + r2·sin θ
- *
- * Point p lies at a fraction t along the line segment p₁p₂:
- *
- *	5. px = t·p₂x + (1-t)·p₁x
- *	6. py = t·p₂y + (1-t)·p₁y
- *
- * To solve, first subtitute 1-4 into 5 and 6:
- *
- * px = t·(c₂x + r₂·cos θ) + (1-t)·(c₁x + r₁·cos θ)
- * py = t·(c₂y + r₂·sin θ) + (1-t)·(c₁y + r₁·sin θ)
- *
- * Then solve each for cos θ and sin θ expressed as a function of t:
- *
- * cos θ = (-(c₂x - c₁x)·t + (px - c₁x)) / ((r₂-r₁)·t + r₁)
- * sin θ = (-(c₂y - c₁y)·t + (py - c₁y)) / ((r₂-r₁)·t + r₁)
- *
- * To simplify this a bit, we define new variables for several of the
- * common terms as shown below:
- *
- *              pâ‚‚
- *           p  •
- *           •   ╲
- *        ·  ┆    ╲r₂
- *  p₁ ·     ┆     ╲
- *  •     pdy┆      ╲
- *   ╲       ┆       •c₂
- *    ╲r₁    ┆   ·   ┆
- *     ╲    ·┆       ┆cdy
- *      •╌╌╌╌┴╌╌╌╌╌╌╌┘
- *    c₁  pdx   cdx
- *
- * cdx = (c₂x - c₁x)
- * cdy = (c₂y - c₁y)
- *  dr =  r₂-r₁
- * pdx =  px - c₁x
- * pdy =  py - c₁y
- *
- * Note that cdx, cdy, and dr do not depend on point p at all, so can
- * be pre-computed for the entire gradient. The simplifed equations
- * are now:
- *
- * cos θ = (-cdx·t + pdx) / (dr·t + r₁)
- * sin θ = (-cdy·t + pdy) / (dr·t + r₁)
- *
- * Finally, to get a single function of t and eliminate the last
- * unknown θ, we use the identity sin²θ + cos²θ = 1. First, square
- * each equation, (we knew a quadratic was coming since it must be
- * possible to obtain two solutions in some cases):
- *
- * cos²θ = (cdx²t² - 2·cdx·pdx·t + pdx²) / (dr²·t² + 2·r₁·dr·t + r₁²)
- * sin²θ = (cdy²t² - 2·cdy·pdy·t + pdy²) / (dr²·t² + 2·r₁·dr·t + r₁²)
- *
- * Then add both together, set the result equal to 1, and express as a
- * standard quadratic equation in t of the form At² + Bt + C = 0
- *
- * (cdx² + cdy² - dr²)·t² - 2·(cdx·pdx + cdy·pdy + r₁·dr)·t + (pdx² + pdy² - r₁²) = 0
- *
- * In other words:
- *
- * A = cdx² + cdy² - dr²
- * B = -2·(pdx·cdx + pdy·cdy + r₁·dr)
- * C = pdx² + pdy² - r₁²
- *
- * And again, notice that A does not depend on p, so can be
- * precomputed. From here we just use the quadratic formula to solve
- * for t:
- *
- * t = (-2·B ± ⎷(B² - 4·A·C)) / 2·A
- */
-        /* radial or conical */
-        Bool projective = FALSE;
-        double cx = 1.;
-        double cy = 0.;
-        double cz = 0.;
-        double rx = x + 0.5;
-        double ry = y + 0.5;
-        double rz = 1.;
-
-        if (pict->transform) {
-            PictVector v;
-            /* reference point is the center of the pixel */
-            v.vector[0] = IntToxFixed(x) + xFixed1/2;
-            v.vector[1] = IntToxFixed(y) + xFixed1/2;
-            v.vector[2] = xFixed1;
-            if (!PictureTransformPoint3d (pict->transform, &v))
-                return;
-
-            cx = pict->transform->matrix[0][0]/65536.;
-            cy = pict->transform->matrix[1][0]/65536.;
-            cz = pict->transform->matrix[2][0]/65536.;
-            rx = v.vector[0]/65536.;
-            ry = v.vector[1]/65536.;
-            rz = v.vector[2]/65536.;
-            projective = pict->transform->matrix[2][0] != 0 || v.vector[2] != xFixed1;
-        }
-
-        if (pGradient->type == SourcePictTypeRadial) {
-	    pixman_radial_gradient_image_t *radial;
-	    radial = &pGradient->radial;
-            if (!projective) {
-                while (buffer < end) {
-                    if (!mask || *mask++ & maskBits)
-                    {
-			double pdx, pdy;
-			double B, C;
-			double det;
-			double c1x = xFixedToDouble (radial->c1.x);
-			double c1y = xFixedToDouble (radial->c1.y);
-			double r1  = xFixedToDouble (radial->c1.radius);
-                        xFixed_48_16 t;
-
-			pdx = rx - c1x;
-			pdy = ry - c1y;
-
-			B = -2 * (  pdx * radial->cdx
-				  + pdy * radial->cdy
-				  + r1 * radial->dr);
-			C = (pdx * pdx + pdy * pdy - r1 * r1);
-
-                        det = (B * B) - (4 * radial->A * C);
-			if (det < 0.0)
-			    det = 0.0;
-
-			if (radial->A < 0)
-			    t = (xFixed_48_16) ((- B - sqrt(det)) / (2.0 * radial->A) * 65536);
-			else
-			    t = (xFixed_48_16) ((- B + sqrt(det)) / (2.0 * radial->A) * 65536);
-
-                        *buffer = _gradient_walker_pixel (&walker, t);
-                    }
-                    ++buffer;
-                    rx += cx;
-                    ry += cy;
-                }
-            } else {
-		/* In cairo, we don't have projective transformed
-		 * radial gradients---so I'm not going to bother
-		 * implementing something untested and broken
-		 * here. Instead, someone trying to get this code into
-		 * shape for use in the X server can fix this here. */
-		assert (0);
-            }
-        } else /* SourcePictTypeConical */ {
-            double a = pGradient->conical.angle/(180.*65536);
-            if (!projective) {
-                rx -= pGradient->conical.center.x/65536.;
-                ry -= pGradient->conical.center.y/65536.;
-
-                while (buffer < end) {
-                    double angle;
-
-                    if (!mask || *mask++ & maskBits)
-                    {
-                        xFixed_48_16   t;
-
-                        angle = atan2(ry, rx) + a;
-                        t     = (xFixed_48_16) (angle * (65536. / (2*M_PI)));
-
-                        *buffer = _gradient_walker_pixel (&walker, t);
-                    }
-                    ++buffer;
-                    rx += cx;
-                    ry += cy;
-                }
-            } else {
-                while (buffer < end) {
-                    double x, y;
-                    double angle;
-
-                    if (!mask || *mask++ & maskBits)
-                    {
-                        xFixed_48_16  t;
-
-                        if (rz != 0) {
-                            x = rx/rz;
-                            y = ry/rz;
-                        } else {
-                            x = y = 0.;
-                        }
-                        x -= pGradient->conical.center.x/65536.;
-                        y -= pGradient->conical.center.y/65536.;
-                        angle = atan2(y, x) + a;
-                        t     = (xFixed_48_16) (angle * (65536. / (2*M_PI)));
-
-                        *buffer = _gradient_walker_pixel (&walker, t);
-                    }
-                    ++buffer;
-                    rx += cx;
-                    ry += cy;
-                    rz += cz;
-                }
-            }
-        }
-    }
-}
-
-static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
-{
-    FbBits     *bits;
-    FbStride    stride;
-    int         bpp;
-    int         xoff, yoff;
-    fetchPixelProc   fetch;
-    PictVector	v;
-    PictVector  unit;
-    int         i;
-    BoxRec	box;
-#ifdef PIXMAN_INDEXED_FORMATS
-    miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate;
-#else
-    miIndexedPtr indexed = NULL;
-#endif
-    Bool projective = FALSE;
-
-    fetch = fetchPixelProcForPicture(pict);
-
-    fbGetDrawable(pict->pDrawable, bits, stride, bpp, xoff, yoff);
-    x += xoff;
-    y += yoff;
-
-    /* reference point is the center of the pixel */
-    v.vector[0] = IntToxFixed(x) + xFixed1/2;
-    v.vector[1] = IntToxFixed(y) + xFixed1/2;
-    v.vector[2] = xFixed1;
-
-    /* when using convolution filters one might get here without a transform */
-    if (pict->transform) {
-        if (!PictureTransformPoint3d (pict->transform, &v))
-            return;
-        unit.vector[0] = pict->transform->matrix[0][0];
-        unit.vector[1] = pict->transform->matrix[1][0];
-        unit.vector[2] = pict->transform->matrix[2][0];
-    } else {
-        unit.vector[0] = xFixed1;
-        unit.vector[1] = 0;
-        unit.vector[2] = 0;
-    }
-    projective = (unit.vector[2] != 0);
-
-    if (pict->filter == PIXMAN_FILTER_NEAREST || pict->filter == PIXMAN_FILTER_FAST)
-    {
-        if (pict->repeat == RepeatNormal) {
-            if (PIXREGION_NUM_RECTS(&pict->sourceClip) == 1) {
-                box = pict->sourceClip.extents;
-                for (i = 0; i < width; ++i) {
- 		    if (!mask || mask[i] & maskBits)
- 		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    if (projective) {
-				y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height);
-				x = MOD(DIV(v.vector[0],v.vector[2]), pict->pDrawable->width);
-			    } else {
-				y = MOD(v.vector[1]>>16, pict->pDrawable->height);
-				x = MOD(v.vector[0]>>16, pict->pDrawable->width);
-			    }
-			    buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            } else {
-                for (i = 0; i < width; ++i) {
- 		    if (!mask || mask[i] & maskBits)
- 		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    if (projective) {
-				y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height);
-				x = MOD(DIV(v.vector[0],v.vector[2]), pict->pDrawable->width);
-			    } else {
-				y = MOD(v.vector[1]>>16, pict->pDrawable->height);
-				x = MOD(v.vector[0]>>16, pict->pDrawable->width);
-			    }
-			    if (pixman_region_contains_point (&pict->sourceClip, x, y, &box))
-				buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
-			    else
-				buffer[i] = 0;
-			}
-                    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            }
-        } else {
-            if (PIXREGION_NUM_RECTS(&pict->sourceClip) == 1) {
-                box = pict->sourceClip.extents;
-                for (i = 0; i < width; ++i) {
- 		    if (!mask || mask[i] & maskBits)
- 		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    if (projective) {
-				y = DIV(v.vector[1],v.vector[2]);
-				x = DIV(v.vector[0],v.vector[2]);
-			    } else {
-				y = v.vector[1]>>16;
-				x = v.vector[0]>>16;
-			    }
-			    buffer[i] = ((x < box.x1) | (x >= box.x2) | (y < box.y1) | (y >= box.y2)) ?
-				0 : fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            } else {
-                for (i = 0; i < width; ++i) {
-                    if (!v.vector[2]) {
-                        buffer[i] = 0;
-                    } else {
-                        if (projective) {
-                            y = DIV(v.vector[1],v.vector[2]);
-                            x = DIV(v.vector[0],v.vector[2]);
-                        } else {
-                            y = v.vector[1]>>16;
-                            x = v.vector[0]>>16;
-                        }
-                        if (pixman_region_contains_point (&pict->sourceClip, x, y, &box))
-                            buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
-                        else
-                            buffer[i] = 0;
-                    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            }
-        }
-    } else if (pict->filter == PIXMAN_FILTER_BILINEAR || pict->filter == PIXMAN_FILTER_GOOD || pict->filter == PIXMAN_FILTER_BEST) {
-        /* adjust vector for maximum contribution at 0.5, 0.5 of each texel. */
-        v.vector[0] -= v.vector[2]/2;
-        v.vector[1] -= v.vector[2]/2;
-        unit.vector[0] -= unit.vector[2]/2;
-        unit.vector[1] -= unit.vector[2]/2;
-
-        if (pict->repeat == RepeatNormal) {
-            if (PIXREGION_NUM_RECTS(&pict->sourceClip) == 1) {
-                box = pict->sourceClip.extents;
-                for (i = 0; i < width; ++i) {
-		    if (!mask || mask[i] & maskBits)
-		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    int x1, x2, y1, y2, distx, idistx, disty, idisty;
-			    FbBits *b;
-			    CARD32 tl, tr, bl, br, r;
-			    CARD32 ft, fb;
-
-			    if (projective) {
-				xFixed_48_16 div;
-				div = ((xFixed_48_16)v.vector[0] << 16)/v.vector[2];
-				x1 = div >> 16;
-				distx = ((xFixed)div >> 8) & 0xff;
-				div = ((xFixed_48_16)v.vector[1] << 16)/v.vector[2];
-				y1 = div >> 16;
-				disty = ((xFixed)div >> 8) & 0xff;
-			    } else {
-				x1 = v.vector[0] >> 16;
-				distx = (v.vector[0] >> 8) & 0xff;
-				y1 = v.vector[1] >> 16;
-				disty = (v.vector[1] >> 8) & 0xff;
-			    }
-			    x2 = x1 + 1;
-			    y2 = y1 + 1;
-
-			    idistx = 256 - distx;
-			    idisty = 256 - disty;
-
-			    x1 = MOD (x1, pict->pDrawable->width);
-			    x2 = MOD (x2, pict->pDrawable->width);
-			    y1 = MOD (y1, pict->pDrawable->height);
-			    y2 = MOD (y2, pict->pDrawable->height);
-
-			    b = bits + (y1 + pict->pDrawable->y)*stride;
-
-			    tl = fetch(b, x1 + pict->pDrawable->x, indexed);
-			    tr = fetch(b, x2 + pict->pDrawable->x, indexed);
-			    b = bits + (y2 + pict->pDrawable->y)*stride;
-			    bl = fetch(b, x1 + pict->pDrawable->x, indexed);
-			    br = fetch(b, x2 + pict->pDrawable->x, indexed);
-
-			    ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
-			    fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
-			    r = (((ft * idisty + fb * disty) >> 16) & 0xff);
-			    ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
-			    fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
-			    r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
-			    ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
-			    fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
-			    r |= (((ft * idisty + fb * disty)) & 0xff0000);
-			    ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
-			    fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
-			    r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
-			    buffer[i] = r;
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            } else {
-                for (i = 0; i < width; ++i) {
-		    if (!mask || mask[i] & maskBits)
-		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    int x1, x2, y1, y2, distx, idistx, disty, idisty;
-			    FbBits *b;
-			    CARD32 tl, tr, bl, br, r;
-			    CARD32 ft, fb;
-
-			    if (projective) {
-				xFixed_48_16 div;
-				div = ((xFixed_48_16)v.vector[0] << 16)/v.vector[2];
-				x1 = div >> 16;
-				distx = ((xFixed)div >> 8) & 0xff;
-				div = ((xFixed_48_16)v.vector[1] << 16)/v.vector[2];
-				y1 = div >> 16;
-				disty = ((xFixed)div >> 8) & 0xff;
-			    } else {
-				x1 = v.vector[0] >> 16;
-				distx = (v.vector[0] >> 8) & 0xff;
-				y1 = v.vector[1] >> 16;
-				disty = (v.vector[1] >> 8) & 0xff;
-			    }
-			    x2 = x1 + 1;
-			    y2 = y1 + 1;
-
-			    idistx = 256 - distx;
-			    idisty = 256 - disty;
-
-			    x1 = MOD (x1, pict->pDrawable->width);
-			    x2 = MOD (x2, pict->pDrawable->width);
-			    y1 = MOD (y1, pict->pDrawable->height);
-			    y2 = MOD (y2, pict->pDrawable->height);
-
-			    b = bits + (y1 + pict->pDrawable->y)*stride;
-
-			    tl = pixman_region_contains_point(&pict->sourceClip, x1, y1, &box)
-				? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
-			    tr = pixman_region_contains_point(&pict->sourceClip, x2, y1, &box)
-				? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
-			    b = bits + (y2 + pict->pDrawable->y)*stride;
-			    bl = pixman_region_contains_point(&pict->sourceClip, x1, y2, &box)
-				? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
-			    br = pixman_region_contains_point(&pict->sourceClip, x2, y2, &box)
-				? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
-
-			    ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
-			    fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
-			    r = (((ft * idisty + fb * disty) >> 16) & 0xff);
-			    ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
-			    fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
-			    r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
-			    ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
-			    fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
-			    r |= (((ft * idisty + fb * disty)) & 0xff0000);
-			    ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
-			    fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
-			    r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
-			    buffer[i] = r;
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            }
-        } else {
-            if (PIXREGION_NUM_RECTS(&pict->sourceClip) == 1) {
-                box = pict->sourceClip.extents;
-                for (i = 0; i < width; ++i) {
-		    if (!mask || mask[i] & maskBits)
-		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off;
-			    FbBits *b;
-			    CARD32 tl, tr, bl, br, r;
-			    Bool x1_out, x2_out, y1_out, y2_out;
-			    CARD32 ft, fb;
-
-			    if (projective) {
-				xFixed_48_16 div;
-				div = ((xFixed_48_16)v.vector[0] << 16)/v.vector[2];
-				x1 = div >> 16;
-				distx = ((xFixed)div >> 8) & 0xff;
-				div = ((xFixed_48_16)v.vector[1] << 16)/v.vector[2];
-				y1 = div >> 16;
-				disty = ((xFixed)div >> 8) & 0xff;
-			    } else {
-				x1 = v.vector[0] >> 16;
-				distx = (v.vector[0] >> 8) & 0xff;
-				y1 = v.vector[1] >> 16;
-				disty = (v.vector[1] >> 8) & 0xff;
-			    }
-			    x2 = x1 + 1;
-			    y2 = y1 + 1;
-
-			    idistx = 256 - distx;
-			    idisty = 256 - disty;
-
-			    b = bits + (y1 + pict->pDrawable->y)*stride;
-			    x_off = x1 + pict->pDrawable->x;
-
-			    x1_out = (x1 < box.x1) | (x1 >= box.x2);
-			    x2_out = (x2 < box.x1) | (x2 >= box.x2);
-			    y1_out = (y1 < box.y1) | (y1 >= box.y2);
-			    y2_out = (y2 < box.y1) | (y2 >= box.y2);
-
-			    tl = x1_out|y1_out ? 0 : fetch(b, x_off, indexed);
-			    tr = x2_out|y1_out ? 0 : fetch(b, x_off + 1, indexed);
-			    b += stride;
-			    bl = x1_out|y2_out ? 0 : fetch(b, x_off, indexed);
-			    br = x2_out|y2_out ? 0 : fetch(b, x_off + 1, indexed);
-
-			    ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
-			    fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
-			    r = (((ft * idisty + fb * disty) >> 16) & 0xff);
-			    ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
-			    fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
-			    r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
-			    ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
-			    fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
-			    r |= (((ft * idisty + fb * disty)) & 0xff0000);
-			    ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
-			    fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
-			    r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
-			    buffer[i] = r;
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            } else {
-                for (i = 0; i < width; ++i) {
-		    if (!mask || mask[i] & maskBits)
-		    {
-			if (!v.vector[2]) {
-			    buffer[i] = 0;
-			} else {
-			    int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off;
-			    FbBits *b;
-			    CARD32 tl, tr, bl, br, r;
-			    CARD32 ft, fb;
-
-			    if (projective) {
-				xFixed_48_16 div;
-				div = ((xFixed_48_16)v.vector[0] << 16)/v.vector[2];
-				x1 = div >> 16;
-				distx = ((xFixed)div >> 8) & 0xff;
-				div = ((xFixed_48_16)v.vector[1] << 16)/v.vector[2];
-				y1 = div >> 16;
-				disty = ((xFixed)div >> 8) & 0xff;
-			    } else {
-				x1 = v.vector[0] >> 16;
-				distx = (v.vector[0] >> 8) & 0xff;
-				y1 = v.vector[1] >> 16;
-				disty = (v.vector[1] >> 8) & 0xff;
-			    }
-			    x2 = x1 + 1;
-			    y2 = y1 + 1;
-
-			    idistx = 256 - distx;
-			    idisty = 256 - disty;
-
-			    b = bits + (y1 + pict->pDrawable->y)*stride;
-			    x_off = x1 + pict->pDrawable->x;
-
-			    tl = pixman_region_contains_point(&pict->sourceClip, x1, y1, &box)
-				? fetch(b, x_off, indexed) : 0;
-			    tr = pixman_region_contains_point(&pict->sourceClip, x2, y1, &box)
-				? fetch(b, x_off + 1, indexed) : 0;
-			    b += stride;
-			    bl = pixman_region_contains_point(&pict->sourceClip, x1, y2, &box)
-				? fetch(b, x_off, indexed) : 0;
-			    br = pixman_region_contains_point(&pict->sourceClip, x2, y2, &box)
-				? fetch(b, x_off + 1, indexed) : 0;
-
-			    ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
-			    fb = FbGet8(bl,0) * idistx + FbGet8(br,0) * distx;
-			    r = (((ft * idisty + fb * disty) >> 16) & 0xff);
-			    ft = FbGet8(tl,8) * idistx + FbGet8(tr,8) * distx;
-			    fb = FbGet8(bl,8) * idistx + FbGet8(br,8) * distx;
-			    r |= (((ft * idisty + fb * disty) >> 8) & 0xff00);
-			    ft = FbGet8(tl,16) * idistx + FbGet8(tr,16) * distx;
-			    fb = FbGet8(bl,16) * idistx + FbGet8(br,16) * distx;
-			    r |= (((ft * idisty + fb * disty)) & 0xff0000);
-			    ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx;
-			    fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx;
-			    r |= (((ft * idisty + fb * disty) << 8) & 0xff000000);
-			    buffer[i] = r;
-			}
-		    }
-                    v.vector[0] += unit.vector[0];
-                    v.vector[1] += unit.vector[1];
-                    v.vector[2] += unit.vector[2];
-                }
-            }
-        }
-#ifdef PIXMAN_CONVOLUTION
-    } else if (pict->filter == PictFilterConvolution) {
-        xFixed *params = pict->filter_params;
-        INT32 cwidth = xFixedToInt(params[0]);
-        INT32 cheight = xFixedToInt(params[1]);
-        int xoff = params[0] >> 1;
-        int yoff = params[1] >> 1;
-        params += 2;
-        for (i = 0; i < width; ++i) {
-	    if (!mask || mask[i] & maskBits)
-	    {
-		if (!v.vector[2]) {
-		    buffer[i] = 0;
-		} else {
-		    int x1, x2, y1, y2, x, y;
-		    INT32 srtot, sgtot, sbtot, satot;
-		    xFixed *p = params;
-
-		    if (projective) {
-			xFixed_48_16 tmp;
-			tmp = ((xFixed_48_16)v.vector[0] << 16)/v.vector[2] - xoff;
-			x1 = xFixedToInt(tmp);
-			tmp = ((xFixed_48_16)v.vector[1] << 16)/v.vector[2] - yoff;
-			y1 = xFixedToInt(tmp);
-		    } else {
-			x1 = xFixedToInt(v.vector[0] - xoff);
-			y1 = xFixedToInt(v.vector[1] - yoff);
-		    }
-		    x2 = x1 + cwidth;
-		    y2 = y1 + cheight;
-
-		    srtot = sgtot = sbtot = satot = 0;
-
-		    for (y = y1; y < y2; y++) {
-			int ty = (pict->repeat == RepeatNormal) ? MOD (y, pict->pDrawable->height) : y;
-			for (x = x1; x < x2; x++) {
-			    if (*p) {
-				int tx = (pict->repeat == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
-				if (pixman_region_contains_point (&pict->sourceClip, tx, ty, &box)) {
-				    FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
-				    CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
-
-				    srtot += Red(c) * *p;
-				    sgtot += Green(c) * *p;
-				    sbtot += Blue(c) * *p;
-				    satot += Alpha(c) * *p;
-				}
-			    }
-			    p++;
-			}
-		    }
-
-		    if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff;
-		    if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff;
-		    if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
-		    if (sbtot < 0) sbtot = 0; else if (sbtot > 0xff) sbtot = 0xff;
-
-		    buffer[i] = ((satot << 24) |
-				 (srtot << 16) |
-				 (sgtot <<  8) |
-				 (sbtot       ));
-		}
-	    }
-            v.vector[0] += unit.vector[0];
-            v.vector[1] += unit.vector[1];
-            v.vector[2] += unit.vector[2];
-        }
-#endif
-    }
-}
-
-static void fbFetchExternalAlpha(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
-{
-    int i;
-    CARD32 _alpha_buffer[SCANLINE_BUFFER_LENGTH];
-    CARD32 *alpha_buffer = _alpha_buffer;
-
-    if (!pict->alphaMap) {
-        fbFetchTransformed(pict, x, y, width, buffer, mask, maskBits);
-        return;
-    }
-
-    if (width > SCANLINE_BUFFER_LENGTH)
-        alpha_buffer = (CARD32 *) malloc(width*sizeof(CARD32));
-
-    fbFetchTransformed(pict, x, y, width, buffer, mask, maskBits);
-    fbFetchTransformed(pict->alphaMap, x - pict->alphaOrigin.x,
-		       y - pict->alphaOrigin.y, width, alpha_buffer,
-		       mask, maskBits);
-    for (i = 0; i < width; ++i) {
-	if (!mask || mask[i] & maskBits)
-	{
-	    int a = alpha_buffer[i]>>24;
-	    buffer[i] = (a << 24)
-		| (div_255(Red(buffer[i]) * a) << 16)
-		| (div_255(Green(buffer[i]) * a) << 8)
-		| (div_255(Blue(buffer[i]) * a));
-	}
-    }
-
-    if (alpha_buffer != _alpha_buffer)
-        free(alpha_buffer);
-}
-
-static void fbStore(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
-{
-    FbBits *bits;
-    FbStride stride;
-    int bpp;
-    int xoff, yoff;
-    storeProc store = storeProcForPicture(pict);
-#ifdef PIXMAN_INDEXED_FORMATS
-    miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate;
-#else
-    miIndexedPtr indexed = NULL;
-#endif
-
-    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-    x += xoff;
-    y += yoff;
-
-    bits += y*stride;
-    store(bits, buffer, x, width, indexed);
-}
-
-static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD32 *buffer)
-{
-    FbBits *bits, *alpha_bits;
-    FbStride stride, astride;
-    int bpp, abpp;
-    int xoff, yoff;
-    int ax, ay;
-    storeProc store;
-    storeProc astore;
-#ifdef PIXMAN_INDEXED_FORMATS
-    miIndexedPtr indexed = (miIndexedPtr) pict->pFormat->index.devPrivate;
-#else
-    miIndexedPtr indexed = NULL;
-#endif
-    miIndexedPtr aindexed;
-
-    if (!pict->alphaMap) {
-        fbStore(pict, x, y, width, buffer);
-        return;
-    }
-
-    store = storeProcForPicture(pict);
-    astore = storeProcForPicture(pict->alphaMap);
-#ifdef PIXMAN_INDEXED_FORMATS
-    aindexed = (miIndexedPtr) pict->alphaMap->pFormat->index.devPrivate;
-#else
-    aindexed = NULL;
-#endif
-
-    ax = x;
-    ay = y;
-
-    fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
-    x += xoff;
-    y += yoff;
-    fbGetDrawable (pict->alphaMap->pDrawable, alpha_bits, astride, abpp, xoff, yoff);
-    ax += xoff;
-    ay += yoff;
-
-    bits       += y*stride;
-    alpha_bits += (ay - pict->alphaOrigin.y)*astride;
-
-    store(bits, buffer, x, width, indexed);
-    astore(alpha_bits, buffer, ax - pict->alphaOrigin.x, width, aindexed);
-}
-
-typedef void (*scanStoreProc)(PicturePtr , int , int , int , CARD32 *);
-typedef void (*scanFetchProc)(PicturePtr , int , int , int , CARD32 * , CARD32 *, CARD32);
-
-static void
-fbCompositeRect (const FbComposeData *data, CARD32 *scanline_buffer)
-{
-    CARD32 *src_buffer = scanline_buffer;
-    CARD32 *dest_buffer = src_buffer + data->width;
-    int i;
-    scanStoreProc store;
-    scanFetchProc fetchSrc = NULL, fetchMask = NULL, fetchDest = NULL;
-    unsigned int srcClass  = SourcePictClassUnknown;
-    unsigned int maskClass = SourcePictClassUnknown;
-    FbBits *bits = NULL;    /* squelch bogus compiler warning */
-    FbStride stride = 0;    /* squelch bogus compiler warning */
-    int	xoff = 0, yoff = 0; /* squelch bogus compiler warning */
-
-    if (data->op == PIXMAN_OPERATOR_CLEAR)
-        fetchSrc = NULL;
-    else if (!data->src->pDrawable) {
-        if (data->src->pSourcePict)
-	{
-            fetchSrc = fbFetchSourcePict;
-	    srcClass = SourcePictureClassify (data->src,
-					      data->xSrc, data->ySrc,
-					      data->width, data->height);
-	}
-    } else if (data->src->alphaMap)
-        fetchSrc = fbFetchExternalAlpha;
-    else if (data->src->repeat == RepeatNormal &&
-             data->src->pDrawable->width == 1 && data->src->pDrawable->height == 1) {
-        fetchSrc = fbFetchSolid;
-	srcClass = SourcePictClassHorizontal;
-    }
-#ifdef PIXMAN_CONVOLUTION
-    else if (!data->src->transform && data->src->filter != PictFilterConvolution)
-        fetchSrc = fbFetch;
-#else
-    else if (!data->src->transform)
-        fetchSrc = fbFetch;
-#endif
-    else
-        fetchSrc = fbFetchTransformed;
-
-    if (data->mask && data->op != PIXMAN_OPERATOR_CLEAR) {
-        if (!data->mask->pDrawable) {
-            if (data->mask->pSourcePict)
-	    {
-                fetchMask = fbFetchSourcePict;
-		maskClass = SourcePictureClassify (data->mask,
-						   data->xMask, data->yMask,
-						   data->width, data->height);
-	    }
-        } else if (data->mask->alphaMap)
-            fetchMask = fbFetchExternalAlpha;
-        else if (data->mask->repeat == RepeatNormal
-                 && data->mask->pDrawable->width == 1 && data->mask->pDrawable->height == 1) {
-            fetchMask = fbFetchSolid;
-	    maskClass = SourcePictClassHorizontal;
-	}
-#ifdef PIXMAN_CONVOLUTION
-        else if (!data->mask->transform && data->mask->filter != PictFilterConvolution)
-            fetchMask = fbFetch;
-#else
-        else if (!data->mask->transform)
-            fetchMask = fbFetch;
-#endif
-        else
-            fetchMask = fbFetchTransformed;
-    } else {
-        fetchMask = NULL;
-    }
-
-    if (data->dest->alphaMap)
-    {
-	fetchDest = fbFetchExternalAlpha;
-	store = fbStoreExternalAlpha;
-
-	if (data->op == PIXMAN_OPERATOR_CLEAR ||
-	    data->op == PIXMAN_OPERATOR_SRC)
-	    fetchDest = NULL;
-    }
-    else
-    {
-	fetchDest = fbFetch;
-	store = fbStore;
-
-	switch (data->op) {
-	case PIXMAN_OPERATOR_CLEAR:
-	case PIXMAN_OPERATOR_SRC:
-	    fetchDest = NULL;
-	    /* fall-through */
-	case PIXMAN_OPERATOR_ADD:
-	case PIXMAN_OPERATOR_OVER:
-	    switch (data->dest->format_code) {
-	    case PICT_a8r8g8b8:
-	    case PICT_x8r8g8b8:
-		store = NULL;
-		break;
-	    }
-	    break;
-	}
-    }
-
-    if (!store)
-    {
-	int bpp;
-
-	fbGetDrawable (data->dest->pDrawable, bits, stride, bpp, xoff, yoff);
-    }
-
-    if (fetchSrc		   &&
-	fetchMask		   &&
-	data->mask		   &&
-	data->mask->componentAlpha &&
-	PICT_FORMAT_RGB (data->mask->format_code))
-    {
-	CARD32 *mask_buffer = dest_buffer + data->width;
-	CombineFuncC compose = composeFunctions.combineC[data->op];
-	if (!compose)
-	    return;
-
-	for (i = 0; i < data->height; ++i) {
-	    /* fill first half of scanline with source */
-	    if (fetchSrc)
-	    {
-		if (fetchMask)
-		{
-		    /* fetch mask before source so that fetching of
-		       source can be optimized */
-		    fetchMask (data->mask, data->xMask, data->yMask + i,
-			       data->width, mask_buffer, NULL, 0);
-
-		    if (maskClass == SourcePictClassHorizontal)
-			fetchMask = NULL;
-		}
-
-		if (srcClass == SourcePictClassHorizontal)
-		{
-		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, NULL, 0);
-		    fetchSrc = NULL;
-		}
-		else
-		{
-		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, mask_buffer,
-			      0xffffffff);
-		}
-	    }
-	    else if (fetchMask)
-	    {
-		fetchMask (data->mask, data->xMask, data->yMask + i,
-			   data->width, mask_buffer, NULL, 0);
-	    }
-
-	    if (store)
-	    {
-		/* fill dest into second half of scanline */
-		if (fetchDest)
-		    fetchDest (data->dest, data->xDest, data->yDest + i,
-			       data->width, dest_buffer, NULL, 0);
-
-		/* blend */
-		compose (dest_buffer, src_buffer, mask_buffer, data->width);
-
-		/* write back */
-		store (data->dest, data->xDest, data->yDest + i, data->width,
-		       dest_buffer);
-	    }
-	    else
-	    {
-		/* blend */
-		compose (bits + (data->yDest + i+ yoff) * stride +
-			 data->xDest + xoff,
-			 src_buffer, mask_buffer, data->width);
-	    }
-	}
-    }
-    else
-    {
-	CARD32 *src_mask_buffer = NULL; /* squelch bogus compiler warning */
-	CARD32 *mask_buffer = NULL;
-	CombineFuncU compose = composeFunctions.combineU[data->op];
-	if (!compose)
-	    return;
-
-	if (fetchMask)
-	  mask_buffer = dest_buffer + data->width;
-
-	for (i = 0; i < data->height; ++i) {
-	    /* fill first half of scanline with source */
-	    if (fetchSrc)
-	    {
-		if (fetchMask)
-		{
-		    /* fetch mask before source so that fetching of
-		       source can be optimized */
-		    fetchMask (data->mask, data->xMask, data->yMask + i,
-			       data->width, mask_buffer, NULL, 0);
-
-		    if (maskClass == SourcePictClassHorizontal)
-			fetchMask = NULL;
-		}
-
-		if (srcClass == SourcePictClassHorizontal)
-		{
-		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, NULL, 0);
-
-		    if (mask_buffer)
-		    {
-			fbCombineInU (mask_buffer, src_buffer, data->width);
-			src_mask_buffer = mask_buffer;
-		    }
-		    else
-			src_mask_buffer = src_buffer;
-
-		    fetchSrc = NULL;
-		}
-		else
-		{
-		    fetchSrc (data->src, data->xSrc, data->ySrc + i,
-			      data->width, src_buffer, mask_buffer,
-			      0xff000000);
-
-		    if (mask_buffer)
-			composeFunctions.combineMaskU (src_buffer,
-						       mask_buffer,
-						       data->width);
-
-		    src_mask_buffer = src_buffer;
-		}
-	    }
-	    else if (fetchMask)
-	    {
-		fetchMask (data->mask, data->xMask, data->yMask + i,
-			   data->width, mask_buffer, NULL, 0);
-
-		fbCombineInU (mask_buffer, src_buffer, data->width);
-
-		src_mask_buffer = mask_buffer;
-	    }
-
-	    if (store)
-	    {
-		/* fill dest into second half of scanline */
-		if (fetchDest)
-		    fetchDest (data->dest, data->xDest, data->yDest + i,
-			       data->width, dest_buffer, NULL, 0);
-
-		/* blend */
-		compose (dest_buffer, src_mask_buffer, data->width);
-
-		/* write back */
-		store (data->dest, data->xDest, data->yDest + i, data->width,
-		       dest_buffer);
-	    }
-	    else
-	    {
-		/* blend */
-		compose (bits + (data->yDest + i+ yoff) * stride +
-			 data->xDest + xoff,
-			 src_mask_buffer, data->width);
-	    }
-	}
-    }
-}
-
-void
-pixman_compositeGeneral (pixman_operator_t	op,
-		    PicturePtr	pSrc,
-		    PicturePtr	pMask,
-		    PicturePtr	pDst,
-		    INT16	xSrc,
-		    INT16	ySrc,
-		    INT16	xMask,
-		    INT16	yMask,
-		    INT16	xDst,
-		    INT16	yDst,
-		    CARD16	width,
-		    CARD16	height)
-{
-    pixman_region16_t region;
-    int		    n;
-    BoxPtr	    pbox;
-    Bool	    srcRepeat = FALSE;
-    Bool	    maskRepeat = FALSE;
-    int		    w, h;
-    CARD32 _scanline_buffer[SCANLINE_BUFFER_LENGTH*3];
-    CARD32 *scanline_buffer = _scanline_buffer;
-    FbComposeData compose_data;
-
-    if (pSrc->pDrawable)
-        srcRepeat = pSrc->repeat == RepeatNormal && !pSrc->transform
-                    && (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1);
-
-    if (pMask && pMask->pDrawable)
-	maskRepeat = pMask->repeat == RepeatNormal && !pMask->transform
-                     && (pMask->pDrawable->width != 1 || pMask->pDrawable->height != 1);
-
-    if (op == PIXMAN_OPERATOR_OVER && !pMask && !pSrc->transform && !PICT_FORMAT_A(pSrc->format_code) && !pSrc->alphaMap)
-        op = PIXMAN_OPERATOR_SRC;
-
-    pixman_region_init_rect (&region, xDst, yDst, width, height);
-
-    if (!FbComputeCompositeRegion (&region, pSrc, pMask, pDst, xSrc, ySrc,
-                                   xMask, yMask, xDst, yDst, width, height))
-        goto CLEANUP_REGION;
-
-    compose_data.op = op;
-    compose_data.src = pSrc;
-    compose_data.mask = pMask;
-    compose_data.dest = pDst;
-    if (width > SCANLINE_BUFFER_LENGTH)
-        scanline_buffer = (CARD32 *) malloc(width * 3 * sizeof(CARD32));
-
-    n = pixman_region_num_rects (&region);
-    pbox = pixman_region_rects (&region);
-    while (n--)
-    {
-	h = pbox->y2 - pbox->y1;
-	compose_data.ySrc = pbox->y1 - yDst + ySrc;
-	compose_data.yMask = pbox->y1 - yDst + yMask;
-	compose_data.yDest = pbox->y1;
-	while (h)
-	{
-	    compose_data.height = h;
-	    w = pbox->x2 - pbox->x1;
-	    compose_data.xSrc = pbox->x1 - xDst + xSrc;
-	    compose_data.xMask = pbox->x1 - xDst + xMask;
-	    compose_data.xDest = pbox->x1;
-	    if (maskRepeat)
-	    {
-		compose_data.yMask = mod (compose_data.yMask, pMask->pDrawable->height);
-		if (compose_data.height > pMask->pDrawable->height - compose_data.yMask)
-		    compose_data.height = pMask->pDrawable->height - compose_data.yMask;
-	    }
-	    if (srcRepeat)
-	    {
-		compose_data.ySrc = mod (compose_data.ySrc, pSrc->pDrawable->height);
-		if (compose_data.height > pSrc->pDrawable->height - compose_data.ySrc)
-		    compose_data.height = pSrc->pDrawable->height - compose_data.ySrc;
-	    }
-	    while (w)
-	    {
-		compose_data.width = w;
-		if (maskRepeat)
-		{
-		    compose_data.xMask = mod (compose_data.xMask, pMask->pDrawable->width);
-		    if (compose_data.width > pMask->pDrawable->width - compose_data.xMask)
-			compose_data.width = pMask->pDrawable->width - compose_data.xMask;
-		}
-		if (srcRepeat)
-		{
-		    compose_data.xSrc = mod (compose_data.xSrc, pSrc->pDrawable->width);
-		    if (compose_data.width > pSrc->pDrawable->width - compose_data.xSrc)
-			compose_data.width = pSrc->pDrawable->width - compose_data.xSrc;
-		}
-		fbCompositeRect(&compose_data, scanline_buffer);
-		w -= compose_data.width;
-		compose_data.xSrc += compose_data.width;
-		compose_data.xMask += compose_data.width;
-		compose_data.xDest += compose_data.width;
-	    }
-	    h -= compose_data.height;
-	    compose_data.ySrc += compose_data.height;
-	    compose_data.yMask += compose_data.height;
-	    compose_data.yDest += compose_data.height;
-	}
-	pbox++;
-    }
-
-    if (scanline_buffer != _scanline_buffer)
-        free(scanline_buffer);
-
-CLEANUP_REGION:
-    pixman_region_fini (&region);
-}
-
-#endif
diff --git a/pixman/src/fbedge.c b/pixman/src/fbedge.c
deleted file mode 100644
index 1552dfc..0000000
--- a/pixman/src/fbedge.c
+++ /dev/null
@@ -1,303 +0,0 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include <string.h>
-#include "pixman-xserver-compat.h"
-
-#ifdef RENDER
-
-/*
- * 4 bit alpha
- */
-
-#define N_BITS	4
-#define rasterizeEdges	fbRasterizeEdges4
-
-#if BITMAP_BIT_ORDER == LSBFirst
-#define Shift4(o)	((o) << 2)
-#else
-#define Shift4(o)	((1-(o)) << 2)
-#endif
-
-#define Get4(x,o)	(((x) >> Shift4(o)) & 0xf)
-#define Put4(x,o,v)	(((x) & ~(0xf << Shift4(o))) | (((v) & 0xf) << Shift4(o)))
-
-#define DefineAlpha(line,x) \
-    CARD8   *__ap = (CARD8 *) line + ((x) >> 1); \
-    int	    __ao = (x) & 1
-
-#define StepAlpha	((__ap += __ao), (__ao ^= 1))
-
-#define AddAlpha(a) {						\
-    CARD8   __o = *__ap;					\
-    CARD8   __a = (a) + Get4(__o, __ao);			\
-    *__ap = Put4 (__o, __ao, __a | (0 - ((__a) >> 4)));		\
-}
-
-#include "fbedgeimp.h"
-
-#undef AddAlpha
-#undef StepAlpha
-#undef DefineAlpha
-#undef rasterizeEdges
-#undef N_BITS
-
-/*
- * 1 bit alpha
- */
-
-#define N_BITS 1
-#define rasterizeEdges	fbRasterizeEdges1
-
-#include "fbedgeimp.h"
-
-#undef rasterizeEdges
-#undef N_BITS
-
-/*
- * 8 bit alpha
- */
-
-static inline CARD8
-clip255 (int x)
-{
-    if (x > 255) return 255;
-    return x;
-}
-
-static inline void
-add_saturate_8 (CARD8 *buf, int value, int length)
-{
-    while (length--)
-    {
-        *buf = clip255 (*buf + value);
-        buf++;
-    }
-}
-
-/*
- * We want to detect the case where we add the same value to a long
- * span of pixels.  The triangles on the end are filled in while we
- * count how many sub-pixel scanlines contribute to the middle section.
- *
- *                 +--------------------------+
- *  fill_height =|   \                      /
- *                     +------------------+
- *                      |================|
- *                   fill_start       fill_end
- */
-static void
-fbRasterizeEdges8 (FbBits	*buf,
-		   int		width,
-		   int		stride,
-		   RenderEdge	*l,
-		   RenderEdge	*r,
-		   xFixed	t,
-		   xFixed	b)
-{
-    xFixed  y = t;
-    FbBits  *line;
-    int fill_start = -1, fill_end = -1;
-    int fill_size = 0;
-
-    line = buf + xFixedToInt (y) * stride;
-
-    for (;;)
-    {
-        CARD8 *ap = (CARD8 *) line;
-	xFixed	lx, rx;
-	int	lxi, rxi;
-
-	/* clip X */
-	lx = l->x;
-	if (lx < 0)
-	    lx = 0;
-	rx = r->x;
-	if (xFixedToInt (rx) >= width)
-	    rx = IntToxFixed (width);
-
-	/* Skip empty (or backwards) sections */
-	if (rx > lx)
-	{
-            int lxs, rxs;
-
-	    /* Find pixel bounds for span. */
-	    lxi = xFixedToInt (lx);
-	    rxi = xFixedToInt (rx);
-
-            /* Sample coverage for edge pixels */
-            lxs = RenderSamplesX (lx, 8);
-            rxs = RenderSamplesX (rx, 8);
-
-            /* Add coverage across row */
-            if (lxi == rxi)
-            {
-                ap[lxi] = clip255 (ap[lxi] + rxs - lxs);
-            }
-            else
-            {
-                ap[lxi] = clip255 (ap[lxi] + N_X_FRAC(8) - lxs);
-
-                /* Move forward so that lxi/rxi is the pixel span */
-                lxi++;
-
-                /* Don't bother trying to optimize the fill unless
-                 * the span is longer than 4 pixels. */
-                if (rxi - lxi > 4)
-                {
-                    if (fill_start < 0)
-                    {
-                        fill_start = lxi;
-                        fill_end = rxi;
-                        fill_size++;
-                    }
-                    else
-                    {
-                        if (lxi >= fill_end || rxi < fill_start)
-                        {
-                            /* We're beyond what we saved, just fill it */
-                            add_saturate_8 (ap + fill_start,
-                                            fill_size * N_X_FRAC(8),
-                                            fill_end - fill_start);
-                            fill_start = lxi;
-                            fill_end = rxi;
-                            fill_size = 1;
-                        }
-                        else
-                        {
-                            /* Update fill_start */
-                            if (lxi > fill_start)
-                            {
-                                add_saturate_8 (ap + fill_start,
-                                                fill_size * N_X_FRAC(8),
-                                                lxi - fill_start);
-                                fill_start = lxi;
-                            }
-                            else if (lxi < fill_start)
-                            {
-                                add_saturate_8 (ap + lxi, N_X_FRAC(8),
-                                                fill_start - lxi);
-                            }
-
-                            /* Update fill_end */
-                            if (rxi < fill_end)
-                            {
-                                add_saturate_8 (ap + rxi,
-                                                fill_size * N_X_FRAC(8),
-                                                fill_end - rxi);
-                                fill_end = rxi;
-                            }
-                            else if (fill_end < rxi)
-                            {
-                                add_saturate_8 (ap + fill_end,
-                                                N_X_FRAC(8),
-                                                rxi - fill_end);
-                            }
-                            fill_size++;
-                        }
-                    }
-                }
-                else
-                {
-                    add_saturate_8 (ap + lxi, N_X_FRAC(8), rxi - lxi);
-                }
-
-                /* Do not add in a 0 alpha here. This check is
-                 * necessary to avoid a buffer overrun, (when rx
-                 * is exactly on a pixel boundary). */
-                if (rxs)
-                    ap[rxi] = clip255 (ap[rxi] + rxs);
-            }
-	}
-
-	if (y == b) {
-            /* We're done, make sure we clean up any remaining fill. */
-            if (fill_start != fill_end) {
-                if (fill_size == N_Y_FRAC(8))
-                {
-                    memset (ap + fill_start, 0xff, fill_end - fill_start);
-                }
-                else
-                {
-                    add_saturate_8 (ap + fill_start, fill_size * N_X_FRAC(8),
-                                    fill_end - fill_start);
-                }
-            }
-	    break;
-        }
-
-	if (xFixedFrac (y) != Y_FRAC_LAST(8))
-	{
-	    RenderEdgeStepSmall (l);
-	    RenderEdgeStepSmall (r);
-	    y += STEP_Y_SMALL(8);
-	}
-	else
-	{
-	    RenderEdgeStepBig (l);
-	    RenderEdgeStepBig (r);
-	    y += STEP_Y_BIG(8);
-            if (fill_start != fill_end)
-            {
-                if (fill_size == N_Y_FRAC(8))
-                {
-                    memset (ap + fill_start, 0xff, fill_end - fill_start);
-                }
-                else
-                {
-                    add_saturate_8 (ap + fill_start, fill_size * N_X_FRAC(8),
-                                    fill_end - fill_start);
-                }
-                fill_start = fill_end = -1;
-                fill_size = 0;
-            }
-	    line += stride;
-	}
-    }
-}
-
-void
-fbRasterizeEdges (FbBits	*buf,
-		  int		bpp,
-		  int		width,
-		  int		stride,
-		  RenderEdge	*l,
-		  RenderEdge	*r,
-		  xFixed	t,
-		  xFixed	b)
-{
-    switch (bpp) {
-    case 1:
-	fbRasterizeEdges1 (buf, width, stride, l, r, t, b);
-	break;
-    case 4:
-	fbRasterizeEdges4 (buf, width, stride, l, r, t, b);
-	break;
-    case 8:
-	fbRasterizeEdges8 (buf, width, stride, l, r, t, b);
-	break;
-    }
-}
-
-#endif /* RENDER */
diff --git a/pixman/src/fbedgeimp.h b/pixman/src/fbedgeimp.h
deleted file mode 100644
index 121c2d7..0000000
--- a/pixman/src/fbedgeimp.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef rasterizeSpan
-#endif
-
-static void
-rasterizeEdges (FbBits		*buf,
-		int		width,
-		int		stride,
-		RenderEdge	*l,
-		RenderEdge	*r,
-		xFixed		t,
-		xFixed		b)
-{
-    xFixed  y = t;
-    FbBits  *line;
-
-    line = buf + xFixedToInt (y) * stride;
-
-    for (;;)
-    {
-	xFixed	lx, rx;
-	int	lxi, rxi;
-
-	/* clip X */
-	lx = l->x;
-	if (lx < 0)
-	    lx = 0;
-	rx = r->x;
-	if (xFixedToInt (rx) >= width)
-	    rx = IntToxFixed (width);
-
-	/* Skip empty (or backwards) sections */
-	if (rx > lx)
-	{
-
-	    /* Find pixel bounds for span. */
-	    lxi = xFixedToInt (lx);
-	    rxi = xFixedToInt (rx);
-
-#if N_BITS == 1
-	    {
-		FbBits  *a = line;
-		FbBits  startmask, endmask;
-		int	    nmiddle;
-		int	    width = rxi - lxi;
-		int	    x = lxi;
-
-		a += x >> FB_SHIFT;
-		x &= FB_MASK;
-
-		FbMaskBits (x, width, startmask, nmiddle, endmask);
-		if (startmask)
-		    *a++ |= startmask;
-		while (nmiddle--)
-		    *a++ = FB_ALLONES;
-		if (endmask)
-		    *a |= endmask;
-	    }
-#else
-	    {
-		DefineAlpha(line,lxi);
-		int	    lxs, rxs;
-
-		/* Sample coverage for edge pixels */
-		lxs = RenderSamplesX (lx, N_BITS);
-		rxs = RenderSamplesX (rx, N_BITS);
-
-		/* Add coverage across row */
-		if (lxi == rxi)
-		{
-		    AddAlpha (rxs - lxs);
-		}
-		else
-		{
-		    int	xi;
-
-		    AddAlpha (N_X_FRAC(N_BITS) - lxs);
-		    StepAlpha;
-		    for (xi = lxi + 1; xi < rxi; xi++)
-		    {
-			AddAlpha (N_X_FRAC(N_BITS));
-			StepAlpha;
-		    }
-		    /* Do not add in a 0 alpha here. This check is
-		     * necessary to avoid a buffer overrun, (when rx
-		     * is exactly on a pixel boundary). */
-		    if (rxs)
-			AddAlpha (rxs);
-		}
-	    }
-#endif
-	}
-
-	if (y == b)
-	    break;
-
-#if N_BITS > 1
-	if (xFixedFrac (y) != Y_FRAC_LAST(N_BITS))
-	{
-	    RenderEdgeStepSmall (l);
-	    RenderEdgeStepSmall (r);
-	    y += STEP_Y_SMALL(N_BITS);
-	}
-	else
-#endif
-	{
-	    RenderEdgeStepBig (l);
-	    RenderEdgeStepBig (r);
-	    y += STEP_Y_BIG(N_BITS);
-	    line += stride;
-	}
-    }
-}
-
-#undef rasterizeSpan
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
deleted file mode 100644
index 57dcd14..0000000
--- a/pixman/src/fbmmx.c
+++ /dev/null
@@ -1,2821 +0,0 @@
-/*
- * Copyright © 2004 Red Hat, Inc.
- * Copyright © 2004 Nicholas Miell
- * Copyright © 2005 Trolltech AS
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Red Hat not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  Red Hat makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author:  Søren Sandmann (sandmann at redhat.com)
- * Minor Improvements: Nicholas Miell (nmiell at gmail.com)
- * MMX code paths for fbcompose.c by Lars Knoll (lars at trolltech.com)
- *
- * Based on work by Owen Taylor
- */
-
-#include "pixmanint.h"
-
-#include <assert.h>
-#include "fbpict.h"
-#include "pixman-xserver-compat.h"
-#include "fbmmx.h"
-
-#if defined(__amd64__) || defined(__x86_64__)
-#define USE_SSE
-#endif
-
-#include <mmintrin.h>
-#ifdef USE_SSE
-#include <xmmintrin.h> /* for _mm_shuffle_pi16 and _MM_SHUFFLE */
-#endif
-
-#ifdef RENDER
-
-#include "fbpict.h"
-
-#define noVERBOSE
-
-#ifdef VERBOSE
-#define CHECKPOINT() ErrorF ("at %s %d\n", __FUNCTION__, __LINE__)
-#else
-#define CHECKPOINT()
-#endif
-
-/* Notes about writing mmx code
- *
- * give memory operands as the second operand. If you give it as the
- * first, gcc will first load it into a register, then use that
- * register
- *
- *   ie. use
- *
- *         _mm_mullo_pi16 (x, mmx_constant);
- *
- *   not
- *
- *         _mm_mullo_pi16 (mmx_constant, x);
- *
- * Also try to minimize dependencies. i.e. when you need a value, try
- * to calculate it from a value that was calculated as early as
- * possible.
- */
-
-/* --------------- MMX primitivess ------------------------------------ */
-
-#ifdef __GNUC__
-typedef unsigned long long ullong;
-typedef ullong mmxdatafield;
-#endif
-#ifdef _MSC_VER
-typedef unsigned __int64 ullong;
-typedef __m64 mmxdatafield;
-#endif
-
-typedef struct
-{
-    mmxdatafield mmx_4x00ff;
-    mmxdatafield mmx_4x0080;
-    mmxdatafield mmx_565_rgb;
-    mmxdatafield mmx_565_unpack_multiplier;
-    mmxdatafield mmx_565_r;
-    mmxdatafield mmx_565_g;
-    mmxdatafield mmx_565_b;
-    mmxdatafield mmx_mask_0;
-    mmxdatafield mmx_mask_1;
-    mmxdatafield mmx_mask_2;
-    mmxdatafield mmx_mask_3;
-    mmxdatafield mmx_full_alpha;
-    mmxdatafield mmx_ffff0000ffff0000;
-    mmxdatafield mmx_0000ffff00000000;
-    mmxdatafield mmx_000000000000ffff;
-} MMXData;
-
-static const MMXData c =
-{
-#ifdef __GNUC__
-    .mmx_4x00ff =			0x00ff00ff00ff00ffULL,
-    .mmx_4x0080 =			0x0080008000800080ULL,
-    .mmx_565_rgb =			0x000001f0003f001fULL,
-    .mmx_565_unpack_multiplier =	0x0000008404100840ULL,
-    .mmx_565_r =			0x000000f800000000ULL,
-    .mmx_565_g =			0x0000000000fc0000ULL,
-    .mmx_565_b =			0x00000000000000f8ULL,
-    .mmx_mask_0 =			0xffffffffffff0000ULL,
-    .mmx_mask_1 =			0xffffffff0000ffffULL,
-    .mmx_mask_2 =			0xffff0000ffffffffULL,
-    .mmx_mask_3 =			0x0000ffffffffffffULL,
-    .mmx_full_alpha =			0x00ff000000000000ULL,
-    .mmx_ffff0000ffff0000 =		0xffff0000ffff0000ULL,
-    .mmx_0000ffff00000000 =		0x0000ffff00000000ULL,
-    .mmx_000000000000ffff =		0x000000000000ffffULL,
-#endif
-#ifdef _MSC_VER
-    { 0x00ff00ff00ff00ffUI64 },
-    { 0x0080008000800080UI64 },
-    { 0x000001f0003f001fUI64 },
-    { 0x0000008404100840UI64 },
-    { 0x000000f800000000UI64 },
-    { 0x0000000000fc0000UI64 },
-    { 0x00000000000000f8UI64 },
-    { 0xffffffffffff0000UI64 },
-    { 0xffffffff0000ffffUI64 },
-    { 0xffff0000ffffffffUI64 },
-    { 0x0000ffffffffffffUI64 },
-    { 0x00ff000000000000UI64 },
-    { 0xffff0000ffff0000UI64 },
-    { 0x0000ffff00000000UI64 },
-    { 0x000000000000ffffUI64 },
-#endif
-};
-
-#ifdef _MSC_VER
-#undef inline
-#define inline __forceinline
-#endif
-
-#ifdef __GNUC__
-#define MC(x) ((__m64) c.mmx_##x)
-#endif
-#ifdef _MSC_VER
-#define MC(x) c.mmx_##x
-#endif
-
-/* cast to void* in the middle to shut gcc up warning about
- * "dereferencing type-punned pointers".
- */
-#define M64(x) (*(__m64*)(void*)(&x))
-
-static inline __m64
-shift (__m64 v, int s)
-{
-    if (s > 0)
-	return _mm_slli_si64 (v, s);
-    else if (s < 0)
-	return _mm_srli_si64 (v, -s);
-    else
-	return v;
-}
-
-static inline __m64
-negate (__m64 mask)
-{
-    return _mm_xor_si64 (mask, MC(4x00ff));
-}
-
-static inline __m64
-pix_multiply (__m64 a, __m64 b)
-{
-    __m64 res;
-
-    res = _mm_mullo_pi16 (a, b);
-    res = _mm_adds_pu16 (res, MC(4x0080));
-    res = _mm_adds_pu16 (res, _mm_srli_pi16 (res, 8));
-    res = _mm_srli_pi16 (res, 8);
-
-    return res;
-}
-
-static inline __m64
-pix_add (__m64 a, __m64 b)
-{
-    return  _mm_adds_pu8 (a, b);
-}
-
-#ifdef USE_SSE
-
-static inline __m64
-expand_alpha (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 3, 3, 3));
-}
-
-static inline __m64
-expand_alpha_rev (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(0, 0, 0, 0));
-}
-
-static inline __m64
-invert_colors (__m64 pixel)
-{
-    return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(3, 0, 1, 2));
-}
-
-#else
-
-static inline __m64
-expand_alpha (__m64 pixel)
-{
-    __m64 t1, t2;
-
-    t1 = shift (pixel, -48);
-    t2 = shift (t1, 16);
-    t1 = _mm_or_si64 (t1, t2);
-    t2 = shift (t1, 32);
-    t1 = _mm_or_si64 (t1, t2);
-
-    return t1;
-}
-
-static inline __m64
-expand_alpha_rev (__m64 pixel)
-{
-    __m64 t1, t2;
-
-    /* move alpha to low 16 bits and zero the rest */
-    t1 = shift (pixel,  48);
-    t1 = shift (t1, -48);
-
-    t2 = shift (t1, 16);
-    t1 = _mm_or_si64 (t1, t2);
-    t2 = shift (t1, 32);
-    t1 = _mm_or_si64 (t1, t2);
-
-    return t1;
-}
-
-static inline __m64
-invert_colors (__m64 pixel)
-{
-    __m64 x, y, z;
-
-    x = y = z = pixel;
-
-    x = _mm_and_si64 (x, MC(ffff0000ffff0000));
-    y = _mm_and_si64 (y, MC(000000000000ffff));
-    z = _mm_and_si64 (z, MC(0000ffff00000000));
-
-    y = shift (y, 32);
-    z = shift (z, -32);
-
-    x = _mm_or_si64 (x, y);
-    x = _mm_or_si64 (x, z);
-
-    return x;
-}
-
-#endif
-
-static inline __m64
-over (__m64 src, __m64 srca, __m64 dest)
-{
-    return  _mm_adds_pu8 (src, pix_multiply(dest, negate(srca)));
-}
-
-static inline __m64
-over_rev_non_pre (__m64 src, __m64 dest)
-{
-    __m64 srca = expand_alpha (src);
-    __m64 srcfaaa = _mm_or_si64 (srca, MC(full_alpha));
-
-    return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
-}
-
-static inline __m64
-in (__m64 src,
-    __m64 mask)
-{
-    return pix_multiply (src, mask);
-}
-
-#ifndef _MSC_VER
-static inline __m64
-in_over (__m64 src,
-	 __m64 srca,
-	 __m64 mask,
-	 __m64 dest)
-{
-    return over(in(src, mask), pix_multiply(srca, mask), dest);
-}
-#else
-#define in_over(src, srca, mask, dest) over(in(src, mask), pix_multiply(srca, mask), dest)
-#endif
-
-static inline __m64
-load8888 (CARD32 v)
-{
-    return _mm_unpacklo_pi8 (_mm_cvtsi32_si64 (v), _mm_setzero_si64());
-}
-
-static inline __m64
-pack8888 (__m64 lo, __m64 hi)
-{
-    return _mm_packs_pu16 (lo, hi);
-}
-
-static inline CARD32
-store8888 (__m64 v)
-{
-    return _mm_cvtsi64_si32(pack8888(v, _mm_setzero_si64()));
-}
-
-/* Expand 16 bits positioned at @pos (0-3) of a mmx register into
- *
- *    00RR00GG00BB
- *
- * --- Expanding 565 in the low word ---
- *
- * m = (m << (32 - 3)) | (m << (16 - 5)) | m;
- * m = m & (01f0003f001f);
- * m = m * (008404100840);
- * m = m >> 8;
- *
- * Note the trick here - the top word is shifted by another nibble to
- * avoid it bumping into the middle word
- */
-static inline __m64
-expand565 (__m64 pixel, int pos)
-{
-    __m64 p = pixel;
-    __m64 t1, t2;
-
-    /* move pixel to low 16 bit and zero the rest */
-    p = shift (shift (p, (3 - pos) * 16), -48);
-
-    t1 = shift (p, 36 - 11);
-    t2 = shift (p, 16 - 5);
-
-    p = _mm_or_si64 (t1, p);
-    p = _mm_or_si64 (t2, p);
-    p = _mm_and_si64 (p, MC(565_rgb));
-
-    pixel = _mm_mullo_pi16 (p, MC(565_unpack_multiplier));
-    return _mm_srli_pi16 (pixel, 8);
-}
-
-static inline __m64
-expand8888 (__m64 in, int pos)
-{
-    if (pos == 0)
-	return _mm_unpacklo_pi8 (in, _mm_setzero_si64());
-    else
-	return _mm_unpackhi_pi8 (in, _mm_setzero_si64());
-}
-
-static inline __m64
-pack565 (__m64 pixel, __m64 target, int pos)
-{
-    __m64 p = pixel;
-    __m64 t = target;
-    __m64 r, g, b;
-
-    r = _mm_and_si64 (p, MC(565_r));
-    g = _mm_and_si64 (p, MC(565_g));
-    b = _mm_and_si64 (p, MC(565_b));
-
-    r = shift (r, - (32 - 8) + pos * 16);
-    g = shift (g, - (16 - 3) + pos * 16);
-    b = shift (b, - (0  + 3) + pos * 16);
-
-    if (pos == 0)
-	t = _mm_and_si64 (t, MC(mask_0));
-    else if (pos == 1)
-	t = _mm_and_si64 (t, MC(mask_1));
-    else if (pos == 2)
-	t = _mm_and_si64 (t, MC(mask_2));
-    else if (pos == 3)
-	t = _mm_and_si64 (t, MC(mask_3));
-
-    p = _mm_or_si64 (r, t);
-    p = _mm_or_si64 (g, p);
-
-    return _mm_or_si64 (b, p);
-}
-
-#ifndef _MSC_VER
-static inline __m64
-pix_add_mul (__m64 x, __m64 a, __m64 y, __m64 b)
-{
-    x = _mm_mullo_pi16 (x, a);
-    y = _mm_mullo_pi16 (y, b);
-    x = _mm_adds_pu16 (x, MC(4x0080));
-    x = _mm_adds_pu16 (x, y);
-    x = _mm_adds_pu16 (x, _mm_srli_pi16 (x, 8));
-    x = _mm_srli_pi16 (x, 8);
-
-    return x;
-}
-#else
-#define pix_add_mul(x, a, y, b) \
-( x = _mm_mullo_pi16 (x, a), \
-  y = _mm_mullo_pi16 (y, b), \
-  x = _mm_adds_pu16 (x, MC(4x0080)), \
-  x = _mm_adds_pu16 (x, y), \
-  x = _mm_adds_pu16 (x, _mm_srli_pi16 (x, 8)), \
-  _mm_srli_pi16 (x, 8) )
-#endif
-
-/* --------------- MMX code patch for fbcompose.c --------------------- */
-
-static FASTCALL void
-mmxCombineMaskU (CARD32 *src, const CARD32 *mask, int width)
-{
-    const CARD32 *end = mask + width;
-    while (mask < end) {
-	CARD32 mmask = *mask;
-	CARD32 maska = mmask >> 24;
-	if (maska == 0) {
-	    *src = 0;
-	} else if (maska != 0xff) {
-	    __m64 a = load8888(mmask);
-	    __m64 s = load8888(*src);
-	    a = expand_alpha(a);
-	    s = pix_multiply(s, a);
-	    *src = store8888(s);
-	}
-        ++src;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOverU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-	CARD32 ssrc = *src;
-	CARD32 a = ssrc >> 24;
-	if (a == 0xff) {
-	    *dest = ssrc;
-	} else if (a) {
-	    __m64 s, sa;
-	    s = load8888(ssrc);
-	    sa = expand_alpha(s);
-	    *dest = store8888(over(s, sa, load8888(*dest)));
-	}
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-	__m64 d, da;
-	d = load8888(*dest);
-	da = expand_alpha(d);
-	*dest = store8888(over (d, da, load8888(*src)));
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineInU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 x, a;
-        x = load8888(*src);
-        a = load8888(*dest);
-        a = expand_alpha(a);
-        x = pix_multiply(x, a);
-        *dest = store8888(x);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineInReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 x, a;
-        x = load8888(*dest);
-        a = load8888(*src);
-        a = expand_alpha(a);
-        x = pix_multiply(x, a);
-        *dest = store8888(x);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOutU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 x, a;
-        x = load8888(*src);
-        a = load8888(*dest);
-        a = expand_alpha(a);
-        a = negate(a);
-        x = pix_multiply(x, a);
-        *dest = store8888(x);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOutReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 x, a;
-        x = load8888(*dest);
-        a = load8888(*src);
-        a = expand_alpha(a);
-        a = negate(a);
-        x = pix_multiply(x, a);
-        *dest = store8888(x);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAtopU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 s, da, d, sia;
-        s = load8888(*src);
-        d = load8888(*dest);
-        sia = expand_alpha(s);
-        sia = negate(sia);
-        da = expand_alpha(d);
-        s = pix_add_mul (s, da, d, sia);
-        *dest = store8888(s);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAtopReverseU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end;
-
-    end = dest + width;
-
-    while (dest < end) {
-        __m64 s, dia, d, sa;
-        s = load8888(*src);
-        d = load8888(*dest);
-        sa = expand_alpha(s);
-        dia = expand_alpha(d);
-        dia = negate(dia);
-	s = pix_add_mul (s, dia, d, sa);
-        *dest = store8888(s);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineXorU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-
-    while (dest < end) {
-        __m64 s, dia, d, sia;
-        s = load8888(*src);
-        d = load8888(*dest);
-        sia = expand_alpha(s);
-        dia = expand_alpha(d);
-        sia = negate(sia);
-        dia = negate(dia);
-	s = pix_add_mul (s, dia, d, sia);
-        *dest = store8888(s);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAddU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-    while (dest < end) {
-        __m64 s, d;
-	s = load8888(*src);
-	d = load8888(*dest);
-	s = pix_add(s, d);
-	*dest = store8888(s);
-        ++dest;
-        ++src;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineSaturateU (CARD32 *dest, const CARD32 *src, int width)
-{
-    const CARD32 *end = dest + width;
-    while (dest < end) {
-        CARD32 s = *src;
-        CARD32 d = *dest;
-        __m64 ms = load8888(s);
-        __m64 md = load8888(d);
-        CARD32 sa = s >> 24;
-        CARD32 da = ~d >> 24;
-
-        if (sa > da) {
-            __m64 msa = load8888(FbIntDiv(da, sa)<<24);
-            msa = expand_alpha(msa);
-            ms = pix_multiply(ms, msa);
-        }
-        md = pix_add(md, ms);
-        *dest = store8888(md);
-        ++src;
-        ++dest;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        s = pix_multiply(s, a);
-        *dest = store8888(s);
-        ++src;
-        ++mask;
-        ++dest;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 sa = expand_alpha(s);
-
-	*dest = store8888(in_over (s, sa, a, d));
-
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-
-	*dest = store8888(over (d, da, in (s, a)));
-
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-        s = pix_multiply(s, a);
-        s = pix_multiply(s, da);
-        *dest = store8888(s);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 sa = expand_alpha(s);
-        a = pix_multiply(a, sa);
-        d = pix_multiply(d, a);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-        da = negate(da);
-        s = pix_multiply(s, a);
-        s = pix_multiply(s, da);
-        *dest = store8888(s);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 sa = expand_alpha(s);
-        a = pix_multiply(a, sa);
-        a = negate(a);
-        d = pix_multiply(d, a);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-        __m64 sa = expand_alpha(s);
-        s = pix_multiply(s, a);
-        a = pix_multiply(a, sa);
-        a = negate(a);
-	d = pix_add_mul (d, a, s, da);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-        __m64 sa = expand_alpha(s);
-        s = pix_multiply(s, a);
-        a = pix_multiply(a, sa);
-        da = negate(da);
-	d = pix_add_mul (d, a, s, da);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        __m64 da = expand_alpha(d);
-        __m64 sa = expand_alpha(s);
-        s = pix_multiply(s, a);
-        a = pix_multiply(a, sa);
-        da = negate(da);
-        a = negate(a);
-	d = pix_add_mul (d, a, s, da);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-static FASTCALL void
-mmxCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
-{
-    const CARD32 *end = src + width;
-    while (src < end) {
-        __m64 a = load8888(*mask);
-        __m64 s = load8888(*src);
-        __m64 d = load8888(*dest);
-        s = pix_multiply(s, a);
-        d = pix_add(s, d);
-        *dest = store8888(d);
-        ++src;
-        ++dest;
-        ++mask;
-    }
-    _mm_empty();
-}
-
-extern FbComposeFunctions composeFunctions;
-
-void fbComposeSetupMMX(void)
-{
-    /* check if we have MMX support and initialize accordingly */
-    if (fbHaveMMX()) {
-        composeFunctions.combineU[PIXMAN_OPERATOR_OVER] = mmxCombineOverU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_OVER_REVERSE] = mmxCombineOverReverseU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_IN] = mmxCombineInU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_IN_REVERSE] = mmxCombineInReverseU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_OUT] = mmxCombineOutU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_OUT_REVERSE] = mmxCombineOutReverseU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_ATOP] = mmxCombineAtopU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_ATOP_REVERSE] = mmxCombineAtopReverseU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_XOR] = mmxCombineXorU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_ADD] = mmxCombineAddU;
-        composeFunctions.combineU[PIXMAN_OPERATOR_SATURATE] = mmxCombineSaturateU;
-
-        composeFunctions.combineC[PIXMAN_OPERATOR_SRC] = mmxCombineSrcC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_OVER] = mmxCombineOverC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_OVER_REVERSE] = mmxCombineOverReverseC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_IN] = mmxCombineInC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_IN_REVERSE] = mmxCombineInReverseC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_OUT] = mmxCombineOutC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_OUT_REVERSE] = mmxCombineOutReverseC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_ATOP] = mmxCombineAtopC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_ATOP_REVERSE] = mmxCombineAtopReverseC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_XOR] = mmxCombineXorC;
-        composeFunctions.combineC[PIXMAN_OPERATOR_ADD] = mmxCombineAddC;
-
-        composeFunctions.combineMaskU = mmxCombineMaskU;
-    }
-}
-
-/* ------------------ MMX code paths called from fbpict.c ----------------------- */
-
-void
-fbCompositeSolid_nx8888mmx (pixman_operator_t	op,
-			    PicturePtr pSrc,
-			    PicturePtr pMask,
-			    PicturePtr pDst,
-			    INT16	xSrc,
-			    INT16	ySrc,
-			    INT16	xMask,
-			    INT16	yMask,
-			    INT16	xDst,
-			    INT16	yDst,
-			    CARD16	width,
-			    CARD16	height)
-{
-    CARD32	src;
-    CARD32	*dstLine, *dst;
-    CARD16	w;
-    FbStride	dstStride;
-    __m64	vsrc, vsrca;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    if (src >> 24 == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    *dst = store8888(over(vsrc, vsrca, load8888(*dst)));
-
-	    w--;
-	    dst++;
-	}
-
-	while (w >= 2)
-	{
-	    __m64 vdest;
-	    __m64 dest0, dest1;
-
-	    vdest = *(__m64 *)dst;
-
-	    dest0 = over(vsrc, vsrca, expand8888(vdest, 0));
-	    dest1 = over(vsrc, vsrca, expand8888(vdest, 1));
-
-	    *(__m64 *)dst = pack8888(dest0, dest1);
-
-	    dst += 2;
-	    w -= 2;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    *dst = store8888(over(vsrc, vsrca, load8888(*dst)));
-
-	    w--;
-	    dst++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolid_nx0565mmx (pixman_operator_t	op,
-			    PicturePtr pSrc,
-			    PicturePtr pMask,
-			    PicturePtr pDst,
-			    INT16	xSrc,
-			    INT16	ySrc,
-			    INT16	xMask,
-			    INT16	yMask,
-			    INT16	xDst,
-			    INT16	yDst,
-			    CARD16	width,
-			    CARD16	height)
-{
-    CARD32	src;
-    CARD16	*dstLine, *dst;
-    CARD16	w;
-    FbStride	dstStride;
-    __m64	vsrc, vsrca;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    if (src >> 24 == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64 (*dst), 0);
-	    vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
-	    *dst = _mm_cvtsi64_si32 (vdest);
-
-	    w--;
-	    dst++;
-	}
-
-	while (w >= 4)
-	{
-	    __m64 vdest;
-
-	    vdest = *(__m64 *)dst;
-
-	    vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 0)), vdest, 0);
-	    vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 1)), vdest, 1);
-	    vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 2)), vdest, 2);
-	    vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 3)), vdest, 3);
-
-	    *(__m64 *)dst = vdest;
-
-	    dst += 4;
-	    w -= 4;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64 (*dst), 0);
-	    vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
-	    *dst = _mm_cvtsi64_si32 (vdest);
-
-	    w--;
-	    dst++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolidMask_nx8888x8888Cmmx (pixman_operator_t	op,
-				      PicturePtr pSrc,
-				      PicturePtr pMask,
-				      PicturePtr pDst,
-				      INT16	xSrc,
-				      INT16	ySrc,
-				      INT16	xMask,
-				      INT16	yMask,
-				      INT16	xDst,
-				      INT16	yDst,
-				      CARD16	width,
-				      CARD16	height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine;
-    CARD32	*maskLine;
-    FbStride	dstStride, maskStride;
-    __m64	vsrc, vsrca;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (srca == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
-    vsrc = load8888(src);
-    vsrca = expand_alpha(vsrc);
-
-    while (height--)
-    {
-	unsigned int twidth = width;
-	CARD32 *p = (CARD32 *)maskLine;
-	CARD32 *q = (CARD32 *)dstLine;
-
-	while (twidth && (unsigned long)q & 7)
-	{
-	    CARD32 m = *(CARD32 *)p;
-
-	    if (m)
-	    {
-		__m64 vdest = load8888(*q);
-		vdest = in_over(vsrc, vsrca, load8888(m), vdest);
-		*q = store8888(vdest);
-	    }
-
-	    twidth--;
-	    p++;
-	    q++;
-	}
-
-	while (twidth >= 2)
-	{
-	    CARD32 m0, m1;
-	    m0 = *p;
-	    m1 = *(p + 1);
-
-	    if (m0 | m1)
-	    {
-		__m64 dest0, dest1;
-		__m64 vdest = *(__m64 *)q;
-
-		dest0 = in_over(vsrc, vsrca, load8888(m0),
-				expand8888 (vdest, 0));
-		dest1 = in_over(vsrc, vsrca, load8888(m1),
-				expand8888 (vdest, 1));
-
-		*(__m64 *)q = pack8888(dest0, dest1);
-	    }
-
-	    p += 2;
-	    q += 2;
-	    twidth -= 2;
-	}
-
-	while (twidth)
-	{
-	    CARD32 m = *(CARD32 *)p;
-
-	    if (m)
-	    {
-		__m64 vdest = load8888(*q);
-		vdest = in_over(vsrc, vsrca, load8888(m), vdest);
-		*q = store8888(vdest);
-	    }
-
-	    twidth--;
-	    p++;
-	    q++;
-	}
-
-	dstLine += dstStride;
-	maskLine += maskStride;
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrc_8888x8x8888mmx (pixman_operator_t	op,
-			       PicturePtr pSrc,
-			       PicturePtr pMask,
-			       PicturePtr pDst,
-			       INT16	xSrc,
-			       INT16	ySrc,
-			       INT16      xMask,
-			       INT16      yMask,
-			       INT16      xDst,
-			       INT16      yDst,
-			       CARD16     width,
-			       CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    CARD32	mask;
-    __m64	vmask;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    __m64  srca;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    fbComposeGetSolid (pMask, pDst, mask);
-    mask = mask | mask >> 8 | mask >> 16 | mask >> 24;
-    vmask = load8888 (mask);
-    srca = MC(4x00ff);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (in_over (s, expand_alpha (s), vmask, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-
-	while (w >= 2)
-	{
-	    __m64 vs = *(__m64 *)src;
-	    __m64 vd = *(__m64 *)dst;
-	    __m64 vsrc0 = expand8888 (vs, 0);
-	    __m64 vsrc1 = expand8888 (vs, 1);
-
-	    *(__m64 *)dst = pack8888 (
-		in_over (vsrc0, expand_alpha (vsrc0), vmask, expand8888 (vd, 0)),
-		in_over (vsrc1, expand_alpha (vsrc1), vmask, expand8888 (vd, 1)));
-
-	    w -= 2;
-	    dst += 2;
-	    src += 2;
-	}
-
-	while (w)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (in_over (s, expand_alpha (s), vmask, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrc_x888x8x8888mmx (pixman_operator_t	op,
-			       PicturePtr pSrc,
-			       PicturePtr pMask,
-			       PicturePtr pDst,
-			       INT16	xSrc,
-			       INT16	ySrc,
-			       INT16      xMask,
-			       INT16      yMask,
-			       INT16      xDst,
-			       INT16      yDst,
-			       CARD16     width,
-			       CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    CARD32	mask;
-    __m64	vmask;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    __m64  srca;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-    fbComposeGetSolid (pMask, pDst, mask);
-
-    mask = mask | mask >> 8 | mask >> 16 | mask >> 24;
-    vmask = load8888 (mask);
-    srca = MC(4x00ff);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (in_over (s, srca, vmask, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-
-	while (w >= 16)
-	{
-	    __m64 vd0 = *(__m64 *)(dst + 0);
-	    __m64 vd1 = *(__m64 *)(dst + 2);
-	    __m64 vd2 = *(__m64 *)(dst + 4);
-	    __m64 vd3 = *(__m64 *)(dst + 6);
-	    __m64 vd4 = *(__m64 *)(dst + 8);
-	    __m64 vd5 = *(__m64 *)(dst + 10);
-	    __m64 vd6 = *(__m64 *)(dst + 12);
-	    __m64 vd7 = *(__m64 *)(dst + 14);
-
-	    __m64 vs0 = *(__m64 *)(src + 0);
-	    __m64 vs1 = *(__m64 *)(src + 2);
-	    __m64 vs2 = *(__m64 *)(src + 4);
-	    __m64 vs3 = *(__m64 *)(src + 6);
-	    __m64 vs4 = *(__m64 *)(src + 8);
-	    __m64 vs5 = *(__m64 *)(src + 10);
-	    __m64 vs6 = *(__m64 *)(src + 12);
-	    __m64 vs7 = *(__m64 *)(src + 14);
-
-	    vd0 = pack8888 (
-		in_over (expand8888 (vs0, 0), srca, vmask, expand8888 (vd0, 0)),
-		in_over (expand8888 (vs0, 1), srca, vmask, expand8888 (vd0, 1)));
-
-	    vd1 = pack8888 (
-		in_over (expand8888 (vs1, 0), srca, vmask, expand8888 (vd1, 0)),
-		in_over (expand8888 (vs1, 1), srca, vmask, expand8888 (vd1, 1)));
-
-	    vd2 = pack8888 (
-		in_over (expand8888 (vs2, 0), srca, vmask, expand8888 (vd2, 0)),
-		in_over (expand8888 (vs2, 1), srca, vmask, expand8888 (vd2, 1)));
-
-	    vd3 = pack8888 (
-		in_over (expand8888 (vs3, 0), srca, vmask, expand8888 (vd3, 0)),
-		in_over (expand8888 (vs3, 1), srca, vmask, expand8888 (vd3, 1)));
-
-	    vd4 = pack8888 (
-		in_over (expand8888 (vs4, 0), srca, vmask, expand8888 (vd4, 0)),
-		in_over (expand8888 (vs4, 1), srca, vmask, expand8888 (vd4, 1)));
-
-	    vd5 = pack8888 (
-		in_over (expand8888 (vs5, 0), srca, vmask, expand8888 (vd5, 0)),
-		in_over (expand8888 (vs5, 1), srca, vmask, expand8888 (vd5, 1)));
-
-	    vd6 = pack8888 (
-		in_over (expand8888 (vs6, 0), srca, vmask, expand8888 (vd6, 0)),
-		in_over (expand8888 (vs6, 1), srca, vmask, expand8888 (vd6, 1)));
-
-	    vd7 = pack8888 (
-		in_over (expand8888 (vs7, 0), srca, vmask, expand8888 (vd7, 0)),
-		in_over (expand8888 (vs7, 1), srca, vmask, expand8888 (vd7, 1)));
-
-	    *(__m64 *)(dst + 0) = vd0;
-	    *(__m64 *)(dst + 2) = vd1;
-	    *(__m64 *)(dst + 4) = vd2;
-	    *(__m64 *)(dst + 6) = vd3;
-	    *(__m64 *)(dst + 8) = vd4;
-	    *(__m64 *)(dst + 10) = vd5;
-	    *(__m64 *)(dst + 12) = vd6;
-	    *(__m64 *)(dst + 14) = vd7;
-
-	    w -= 16;
-	    dst += 16;
-	    src += 16;
-	}
-
-	while (w)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (in_over (s, srca, vmask, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrc_8888x8888mmx (pixman_operator_t      op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src, s;
-    FbStride	dstStride, srcStride;
-    CARD8	a;
-    CARD16	w;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    a = s >> 24;
-	    if (a == 0xff)
-		*dst = s;
-	    else if (a) {
-		__m64 ms, sa;
-		ms = load8888(s);
-		sa = expand_alpha(ms);
-		*dst = store8888(over(ms, sa, load8888(*dst)));
-	    }
-	    dst++;
-	}
-    }
-    _mm_empty();
-}
-
-void
-fbCompositeSrc_8888x0565mmx (pixman_operator_t      op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD16	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 vsrc = load8888 (*src);
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64(*dst), 0);
-
-	    vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0);
-
-	    *dst = _mm_cvtsi64_si32(vdest);
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-
-	CHECKPOINT();
-
-	while (w >= 4)
-	{
-	    __m64 vsrc0, vsrc1, vsrc2, vsrc3;
-	    __m64 vdest;
-
-	    vsrc0 = load8888(*(src + 0));
-	    vsrc1 = load8888(*(src + 1));
-	    vsrc2 = load8888(*(src + 2));
-	    vsrc3 = load8888(*(src + 3));
-
-	    vdest = *(__m64 *)dst;
-	    
-	    vdest = pack565(over(vsrc0, expand_alpha(vsrc0), expand565(vdest, 0)), vdest, 0);
-	    vdest = pack565(over(vsrc1, expand_alpha(vsrc1), expand565(vdest, 1)), vdest, 1);
-	    vdest = pack565(over(vsrc2, expand_alpha(vsrc2), expand565(vdest, 2)), vdest, 2);
-	    vdest = pack565(over(vsrc3, expand_alpha(vsrc3), expand565(vdest, 3)), vdest, 3);
-	    
-	    *(__m64 *)dst = vdest;
-
-	    w -= 4;
-	    dst += 4;
-	    src += 4;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    __m64 vsrc = load8888 (*src);
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64(*dst), 0);
-
-	    vdest = pack565(over(vsrc, expand_alpha(vsrc), vdest), vdest, 0);
-
-	    *dst = _mm_cvtsi64_si32(vdest);
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolidMask_nx8x8888mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    __m64	vsrc, vsrca;
-    ullong	srcsrc;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (srca == 0)
-	return;
-
-    srcsrc = (ullong)src << 32 | src;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), load8888(*dst));
-		*dst = store8888(vdest);
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-
-	CHECKPOINT();
-
-	while (w >= 2)
-	{
-	    ullong m0, m1;
-	    m0 = *mask;
-	    m1 = *(mask + 1);
-
-	    if (srca == 0xff && (m0 & m1) == 0xff)
-	    {
-		*(ullong *)dst = srcsrc;
-	    }
-	    else if (m0 | m1)
-	    {
-		__m64 vdest;
-		__m64 dest0, dest1;
-
-		vdest = *(__m64 *)dst;
-
-		dest0 = in_over(vsrc, vsrca, expand_alpha_rev (M64(m0)), expand8888(vdest, 0));
-		dest1 = in_over(vsrc, vsrca, expand_alpha_rev (M64(m1)), expand8888(vdest, 1));
-
-		*(__m64 *)dst = pack8888(dest0, dest1);
-	    }
-
-	    mask += 2;
-	    dst += 2;
-	    w -= 2;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		__m64 vdest = load8888(*dst);
-		vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), vdest);
-		*dst = store8888(vdest);
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-    }
-
-    _mm_empty();
-}
-
-static void
-fbSolidFillmmx (FbPixels	*pDraw,
-		int		x,
-		int		y,
-		int		width,
-		int		height,
-		FbBits		xor)
-{
-    FbStride	stride;
-    int		bpp;
-    ullong	fill;
-    __m64	vfill;
-    CARD32	byte_width;
-    CARD8	*byte_line;
-    FbBits      *bits;
-    int		xoff, yoff;
-
-    CHECKPOINT();
-
-    fbGetDrawable(pDraw, bits, stride, bpp, xoff, yoff);
-
-    assert (bpp == 32 || (xor >> 16 == (xor & 0xffff)));
-    assert (bpp == 16 || bpp == 32);
-
-    if (bpp == 16)
-    {
-	stride = stride * sizeof (FbBits) / 2;
-	byte_line = (CARD8 *)(((CARD16 *)bits) + stride * (y + yoff) + (x + xoff));
-	byte_width = 2 * width;
-	stride *= 2;
-    }
-    else
-    {
-	stride = stride * sizeof (FbBits) / 4;
-	byte_line = (CARD8 *)(((CARD32 *)bits) + stride * (y + yoff) + (x + xoff));
-	byte_width = 4 * width;
-	stride *= 4;
-    }
-
-    fill = ((ullong)xor << 32) | xor;
-    vfill = M64(fill);
-
-    while (height--)
-    {
-	unsigned int w;
-	CARD8 *d = byte_line;
-	byte_line += stride;
-	w = byte_width;
-
-	while (w >= 2 && ((unsigned long)d & 3))
-	{
-	    *(CARD16 *)d = xor;
-	    w -= 2;
-	    d += 2;
-	}
-
-	while (w >= 4 && ((unsigned long)d & 7))
-	{
-	    *(CARD32 *)d = xor;
-
-	    w -= 4;
-	    d += 4;
-	}
-
-	while (w >= 64)
-	{
-	    *(__m64*) (d +  0) = vfill;
-	    *(__m64*) (d +  8) = vfill;
-	    *(__m64*) (d + 16) = vfill;
-	    *(__m64*) (d + 24) = vfill;
-	    *(__m64*) (d + 32) = vfill;
-	    *(__m64*) (d + 40) = vfill;
-	    *(__m64*) (d + 48) = vfill;
-	    *(__m64*) (d + 56) = vfill;
-
-	    w -= 64;
-	    d += 64;
-	}
-	while (w >= 4)
-	{
-	    *(CARD32 *)d = xor;
-
-	    w -= 4;
-	    d += 4;
-	}
-	if (w >= 2)
-	{
-	    *(CARD16 *)d = xor;
-	    w -= 2;
-	    d += 2;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_operator_t      op,
-				     PicturePtr pSrc,
-				     PicturePtr pMask,
-				     PicturePtr pDst,
-				     INT16      xSrc,
-				     INT16      ySrc,
-				     INT16      xMask,
-				     INT16      yMask,
-				     INT16      xDst,
-				     INT16      yDst,
-				     CARD16     width,
-				     CARD16     height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    __m64	vsrc, vsrca;
-    ullong	srcsrc;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (srca == 0)
-    {
-	fbSolidFillmmx (pDst->pDrawable, xDst, yDst, width, height, 0);
-	return;
-    }
-
-    srcsrc = (ullong)src << 32 | src;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		  __m64 vdest = in(vsrc, expand_alpha_rev (M64(m)));
-		  *dst = store8888(vdest);
-	    }
-	    else
-	    {
-		  *dst = 0;
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-
-	CHECKPOINT();
-
-	while (w >= 2)
-	{
-	    ullong m0, m1;
-	    m0 = *mask;
-	    m1 = *(mask + 1);
-
-	    if (srca == 0xff && (m0 & m1) == 0xff)
-	    {
-		*(ullong *)dst = srcsrc;
-	    }
-	    else if (m0 | m1)
-	    {
-		__m64 vdest;
-		__m64 dest0, dest1;
-
-		vdest = *(__m64 *)dst;
-
-		dest0 = in(vsrc, expand_alpha_rev (M64(m0)));
-		dest1 = in(vsrc, expand_alpha_rev (M64(m1)));
-
-		*(__m64 *)dst = pack8888(dest0, dest1);
-	    }
-	    else
-	    {
-		*dst = 0;
-	    }
-
-	    mask += 2;
-	    dst += 2;
-	    w -= 2;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		__m64 vdest = load8888(*dst);
-		vdest = in(vsrc, expand_alpha_rev (M64(m)));
-		*dst = store8888(vdest);
-	    }
-	    else
-	    {
-		*dst = 0;
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolidMask_nx8x0565mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD32	src, srca;
-    CARD16	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    __m64	vsrc, vsrca;
-    ullong srcsrcsrcsrc, src16;
-    __m64 vsrc16;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (srca == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    vsrc16 = pack565(vsrc, _mm_setzero_si64(), 0);
-    src16 = *(ullong*)(void*)(&vsrc16);
-
-    srcsrcsrcsrc = (ullong)src16 << 48 | (ullong)src16 << 32 |
-	(ullong)src16 << 16 | (ullong)src16;
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		__m64 vd = _mm_cvtsi32_si64 (*dst);
-		__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), expand565(vd, 0));
-		*dst = _mm_cvtsi64_si32 (pack565(vdest, _mm_setzero_si64(), 0));
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-
-	CHECKPOINT();
-
-	while (w >= 4)
-	{
-	    ullong m0, m1, m2, m3;
-	    m0 = *mask;
-	    m1 = *(mask + 1);
-	    m2 = *(mask + 2);
-	    m3 = *(mask + 3);
-
-	    if (srca == 0xff && (m0 & m1 & m2 & m3) == 0xff)
-	    {
-		*(ullong *)dst = srcsrcsrcsrc;
-	    }
-	    else if (m0 | m1 | m2 | m3)
-	    {
-		__m64 vdest;
-		__m64 vm0, vm1, vm2, vm3;
-
-		vdest = *(__m64 *)dst;
-
-		vm0 = M64(m0);
-		vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm0), expand565(vdest, 0)), vdest, 0);
-		vm1 = M64(m1);
-		vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm1), expand565(vdest, 1)), vdest, 1);
-		vm2 = M64(m2);
-		vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm2), expand565(vdest, 2)), vdest, 2);
-		vm3 = M64(m3);
-		vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm3), expand565(vdest, 3)), vdest, 3);
-
-		*(__m64 *)dst = vdest;
-	    }
-
-	    w -= 4;
-	    mask += 4;
-	    dst += 4;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    ullong m = *mask;
-
-	    if (m)
-	    {
-		__m64 vd = _mm_cvtsi32_si64 (*dst);
-		__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev (M64(m)), expand565(vd, 0));
-		*dst = _mm_cvtsi64_si32 (pack565(vdest, _mm_setzero_si64(), 0));
-	    }
-
-	    w--;
-	    mask++;
-	    dst++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrc_8888RevNPx0565mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD16	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    assert (pSrc->pDrawable == pMask->pDrawable);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	CHECKPOINT();
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 vsrc = load8888 (*src);
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64 (*dst), 0);
-
-	    vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
-
-	    *dst = _mm_cvtsi64_si32 (vdest);
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-
-	CHECKPOINT();
-
-	while (w >= 4)
-	{
-	    CARD32 s0, s1, s2, s3;
-	    unsigned char a0, a1, a2, a3;
-
-	    s0 = *src;
-	    s1 = *(src + 1);
-	    s2 = *(src + 2);
-	    s3 = *(src + 3);
-
-	    a0 = (s0 >> 24);
-	    a1 = (s1 >> 24);
-	    a2 = (s2 >> 24);
-	    a3 = (s3 >> 24);
-
-	    if ((a0 & a1 & a2 & a3) == 0xFF)
-	    {
-		__m64 vdest;
-		vdest = pack565(invert_colors(load8888(s0)), _mm_setzero_si64(), 0);
-		vdest = pack565(invert_colors(load8888(s1)), vdest, 1);
-		vdest = pack565(invert_colors(load8888(s2)), vdest, 2);
-		vdest = pack565(invert_colors(load8888(s3)), vdest, 3);
-
-		*(__m64 *)dst = vdest;
-	    }
-	    else if (a0 | a1 | a2 | a3)
-	    {
-		__m64 vdest = *(__m64 *)dst;
-
-		vdest = pack565(over_rev_non_pre(load8888(s0), expand565(vdest, 0)), vdest, 0);
-	        vdest = pack565(over_rev_non_pre(load8888(s1), expand565(vdest, 1)), vdest, 1);
-		vdest = pack565(over_rev_non_pre(load8888(s2), expand565(vdest, 2)), vdest, 2);
-		vdest = pack565(over_rev_non_pre(load8888(s3), expand565(vdest, 3)), vdest, 3);
-
-		*(__m64 *)dst = vdest;
-	    }
-
-	    w -= 4;
-	    dst += 4;
-	    src += 4;
-	}
-
-	CHECKPOINT();
-
-	while (w)
-	{
-	    __m64 vsrc = load8888 (*src);
-	    __m64 vdest = expand565 (_mm_cvtsi32_si64 (*dst), 0);
-
-	    vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
-
-	    *dst = _mm_cvtsi64_si32 (vdest);
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-    }
-
-    _mm_empty();
-}
-
-/* "8888RevNP" is GdkPixbuf's format: ABGR, non premultiplied */
-
-void
-fbCompositeSrc_8888RevNPx8888mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    assert (pSrc->pDrawable == pMask->pDrawable);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (over_rev_non_pre (s, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-
-	while (w >= 2)
-	{
-	    ullong s0, s1;
-	    unsigned char a0, a1;
-	    __m64 d0, d1;
-
-	    s0 = *src;
-	    s1 = *(src + 1);
-
-	    a0 = (s0 >> 24);
-	    a1 = (s1 >> 24);
-
-	    if ((a0 & a1) == 0xFF)
-	    {
-		d0 = invert_colors(load8888(s0));
-		d1 = invert_colors(load8888(s1));
-
-		*(__m64 *)dst = pack8888 (d0, d1);
-	    }
-	    else if (a0 | a1)
-	    {
-		__m64 vdest = *(__m64 *)dst;
-
-		d0 = over_rev_non_pre (load8888(s0), expand8888 (vdest, 0));
-		d1 = over_rev_non_pre (load8888(s1), expand8888 (vdest, 1));
-
-		*(__m64 *)dst = pack8888 (d0, d1);
-	    }
-
-	    w -= 2;
-	    dst += 2;
-	    src += 2;
-	}
-
-	while (w)
-	{
-	    __m64 s = load8888 (*src);
-	    __m64 d = load8888 (*dst);
-
-	    *dst = store8888 (over_rev_non_pre (s, d));
-
-	    w--;
-	    dst++;
-	    src++;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSolidMask_nx8888x0565Cmmx (pixman_operator_t      op,
-				      PicturePtr pSrc,
-				      PicturePtr pMask,
-				      PicturePtr pDst,
-				      INT16      xSrc,
-				      INT16      ySrc,
-				      INT16      xMask,
-				      INT16      yMask,
-				      INT16      xDst,
-				      INT16      yDst,
-				      CARD16     width,
-				      CARD16     height)
-{
-    CARD32	src, srca;
-    CARD16	*dstLine;
-    CARD32	*maskLine;
-    FbStride	dstStride, maskStride;
-    __m64  vsrc, vsrca;
-
-    CHECKPOINT();
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (srca == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
-    vsrc = load8888 (src);
-    vsrca = expand_alpha (vsrc);
-
-    while (height--)
-    {
-	unsigned int twidth = width;
-	CARD32 *p = (CARD32 *)maskLine;
-	CARD16 *q = (CARD16 *)dstLine;
-
-	while (twidth && ((unsigned long)q & 7))
-	{
-	    CARD32 m = *(CARD32 *)p;
-
-	    if (m)
-	    {
-		__m64 vdest = expand565 (_mm_cvtsi32_si64 (*q), 0);
-		vdest = pack565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0);
-		*q = _mm_cvtsi64_si32 (vdest);
-	    }
-
-	    twidth--;
-	    p++;
-	    q++;
-	}
-
-	while (twidth >= 4)
-	{
-	    CARD32 m0, m1, m2, m3;
-
-	    m0 = *p;
-	    m1 = *(p + 1);
-	    m2 = *(p + 2);
-	    m3 = *(p + 3);
-
-	    if ((m0 | m1 | m2 | m3))
-	    {
-		__m64 vdest = *(__m64 *)q;
-
-		vdest = pack565(in_over(vsrc, vsrca, load8888(m0), expand565(vdest, 0)), vdest, 0);
-		vdest = pack565(in_over(vsrc, vsrca, load8888(m1), expand565(vdest, 1)), vdest, 1);
-		vdest = pack565(in_over(vsrc, vsrca, load8888(m2), expand565(vdest, 2)), vdest, 2);
-		vdest = pack565(in_over(vsrc, vsrca, load8888(m3), expand565(vdest, 3)), vdest, 3);
-
-		*(__m64 *)q = vdest;
-	    }
-	    twidth -= 4;
-	    p += 4;
-	    q += 4;
-	}
-
-	while (twidth)
-	{
-	    CARD32 m;
-
-	    m = *(CARD32 *)p;
-	    if (m)
-	    {
-		__m64 vdest = expand565(_mm_cvtsi32_si64 (*q), 0);
-		vdest = pack565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0);
-		*q = _mm_cvtsi64_si32 (vdest);
-	    }
-
-	    twidth--;
-	    p++;
-	    q++;
-	}
-
-	maskLine += maskStride;
-	dstLine += dstStride;
-    }
-
-    _mm_empty ();
-}
-
-void
-fbCompositeIn_nx8x8mmx (pixman_operator_t	op,
-			PicturePtr pSrc,
-			PicturePtr pMask,
-			PicturePtr pDst,
-			INT16      xSrc,
-			INT16      ySrc,
-			INT16      xMask,
-			INT16      yMask,
-			INT16      xDst,
-			INT16      yDst,
-			CARD16     width,
-			CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    CARD32	src;
-    CARD8	sa;
-    __m64	vsrc, vsrca;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    sa = src >> 24;
-    if (sa == 0)
-	return;
-
-    vsrc = load8888(src);
-    vsrca = expand_alpha(vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	if ((((unsigned long)pDst & 3) == 0) &&
-	    (((unsigned long)pSrc & 3) == 0))
-	{
-	    while (w >= 4)
-	    {
-		CARD32 m;
-		__m64 vmask;
-		__m64 vdest;
-
-		m = 0;
-
-		vmask = load8888 (*(CARD32 *)mask);
-		vdest = load8888 (*(CARD32 *)dst);
-
-		*(CARD32 *)dst = store8888 (in (in (vsrca, vmask), vdest));
-
-		dst += 4;
-		mask += 4;
-		w -= 4;
-	    }
-	}
-
-	while (w--)
-	{
-	    CARD16	tmp;
-	    CARD8	a;
-	    CARD32	m, d;
-	    CARD32	r;
-
-	    a = *mask++;
-	    d = *dst;
-
-	    m = FbInU (sa, 0, a, tmp);
-	    r = FbInU (m, 0, d, tmp);
-
-	    *dst++ = r;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeIn_8x8mmx (pixman_operator_t	op,
-		      PicturePtr pSrc,
-		      PicturePtr pMask,
-		      PicturePtr pDst,
-		      INT16      xSrc,
-		      INT16      ySrc,
-		      INT16      xMask,
-		      INT16      yMask,
-		      INT16      xDst,
-		      INT16      yDst,
-		      CARD16     width,
-		      CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*srcLine, *src;
-    FbStride	srcStride, dstStride;
-    CARD16	w;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	if ((((unsigned long)pDst & 3) == 0) &&
-	    (((unsigned long)pSrc & 3) == 0))
-	{
-	    while (w >= 4)
-	    {
-		CARD32 *s = (CARD32 *)src;
-		CARD32 *d = (CARD32 *)dst;
-
-		*d = store8888 (in (load8888 (*s), load8888 (*d)));
-
-		w -= 4;
-		dst += 4;
-		src += 4;
-	    }
-	}
-
-	while (w--)
-	{
-	    CARD8 s, d;
-	    CARD16 tmp;
-
-	    s = *src;
-	    d = *dst;
-
-	    *dst = FbInU (s, 0, d, tmp);
-
-	    src++;
-	    dst++;
-	}
-    }
-
-    _mm_empty ();
-}
-
-void
-fbCompositeSrcAdd_8888x8x8mmx (pixman_operator_t   op,
-			       PicturePtr pSrc,
-			       PicturePtr pMask,
-			       PicturePtr pDst,
-			       INT16      xSrc,
-			       INT16      ySrc,
-			       INT16      xMask,
-			       INT16      yMask,
-			       INT16      xDst,
-			       INT16      yDst,
-			       CARD16     width,
-			       CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    CARD32	src;
-    CARD8	sa;
-    __m64	vsrc, vsrca;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    sa = src >> 24;
-    if (sa == 0)
-	return;
-
-    vsrc = load8888(src);
-    vsrca = expand_alpha(vsrc);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	if ((((unsigned long)pMask & 3) == 0) &&
-	    (((unsigned long)pDst  & 3) == 0))
-	{
-	    while (w >= 4)
-	    {
-		__m64 vmask = load8888 (*(CARD32 *)mask);
-		__m64 vdest = load8888 (*(CARD32 *)dst);
-
-		*(CARD32 *)dst = store8888 (_mm_adds_pu8 (in (vsrca, vmask), vdest));
-
-		w -= 4;
-		dst += 4;
-		mask += 4;
-	    }
-	}
-
-	while (w--)
-	{
-	    CARD16	tmp;
-	    CARD16	a;
-	    CARD32	m, d;
-	    CARD32	r;
-
-	    a = *mask++;
-	    d = *dst;
-
-	    m = FbInU (sa, 0, a, tmp);
-	    r = FbAdd (m, d, 0, tmp);
-
-	    *dst++ = r;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrcAdd_8000x8000mmx (pixman_operator_t	op,
-				PicturePtr pSrc,
-				PicturePtr pMask,
-				PicturePtr pDst,
-				INT16      xSrc,
-				INT16      ySrc,
-				INT16      xMask,
-				INT16      yMask,
-				INT16      xDst,
-				INT16      yDst,
-				CARD16     width,
-				CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    CARD8	s, d;
-    CARD16	t;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    s = *src;
-	    d = *dst;
-	    t = d + s;
-	    s = t | (0 - (t >> 8));
-	    *dst = s;
-
-	    dst++;
-	    src++;
-	    w--;
-	}
-
-	while (w >= 8)
-	{
-	    *(__m64*)dst = _mm_adds_pu8(*(__m64*)src, *(__m64*)dst);
-	    dst += 8;
-	    src += 8;
-	    w -= 8;
-	}
-
-	while (w)
-	{
-	    s = *src;
-	    d = *dst;
-	    t = d + s;
-	    s = t | (0 - (t >> 8));
-	    *dst = s;
-
-	    dst++;
-	    src++;
-	    w--;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeSrcAdd_8888x8888mmx (pixman_operator_t		op,
-				PicturePtr	pSrc,
-				PicturePtr	pMask,
-				PicturePtr	 pDst,
-				INT16		 xSrc,
-				INT16      ySrc,
-				INT16      xMask,
-				INT16      yMask,
-				INT16      xDst,
-				INT16      yDst,
-				CARD16     width,
-				CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    CHECKPOINT();
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w && (unsigned long)dst & 7)
-	{
-	    *dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src),
-						 _mm_cvtsi32_si64(*dst)));
-	    dst++;
-	    src++;
-	    w--;
-	}
-
-	while (w >= 2)
-	{
-	    *(__m64*)dst =  _mm_adds_pu8(*(__m64*)src, *(__m64*)dst);
-	    dst += 2;
-	    src += 2;
-	    w -= 2;
-	}
-
-	if (w)
-	{
-	    *dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src),
-						 _mm_cvtsi32_si64(*dst)));
-
-	}
-    }
-
-    _mm_empty();
-}
-
-static void
-fbCopyAreammx (FbPixels	*pSrc,
-	       FbPixels	*pDst,
-	       int		src_x,
-	       int		src_y,
-	       int		dst_x,
-	       int		dst_y,
-	       int		width,
-	       int		height)
-{
-    FbBits *	src_bits;
-    FbStride	src_stride;
-    int		src_bpp;
-    int		src_xoff;
-    int		src_yoff;
-
-    FbBits *	dst_bits;
-    FbStride	dst_stride;
-    int		dst_bpp;
-    int		dst_xoff;
-    int		dst_yoff;
-
-    CARD8 *	src_bytes;
-    CARD8 *	dst_bytes;
-    int		byte_width;
-
-    fbGetDrawable(pSrc, src_bits, src_stride, src_bpp, src_xoff, src_yoff);
-    fbGetDrawable(pDst, dst_bits, dst_stride, dst_bpp, dst_xoff, dst_yoff);
-
-    assert (src_bpp == dst_bpp);
-    assert (src_bpp == 16 || src_bpp == 32);
-
-    if (src_bpp == 16)
-    {
-	src_stride = src_stride * sizeof (FbBits) / 2;
-	dst_stride = dst_stride * sizeof (FbBits) / 2;
-	src_bytes = (CARD8 *)(((CARD16 *)src_bits) + src_stride * (src_y + src_yoff) + (src_x + src_xoff));
-	dst_bytes = (CARD8 *)(((CARD16 *)dst_bits) + dst_stride * (dst_y + dst_yoff) + (dst_x + dst_xoff));
-	byte_width = 2 * width;
-	src_stride *= 2;
-	dst_stride *= 2;
-    }
-    else
-    {
-	src_stride = src_stride * sizeof (FbBits) / 4;
-	dst_stride = dst_stride * sizeof (FbBits) / 4;
-	src_bytes = (CARD8 *)(((CARD32 *)src_bits) + src_stride * (src_y + src_yoff) + (src_x + src_xoff));
-	dst_bytes = (CARD8 *)(((CARD32 *)dst_bits) + dst_stride * (dst_y + dst_yoff) + (dst_x + dst_xoff));
-	byte_width = 4 * width;
-	src_stride *= 4;
-	dst_stride *= 4;
-    }
-
-    while (height--)
-    {
-	unsigned int w;
-	CARD8 *s = src_bytes;
-	CARD8 *d = dst_bytes;
-	src_bytes += src_stride;
-	dst_bytes += dst_stride;
-	w = byte_width;
-
-	while (w >= 2 && ((unsigned long)d & 3))
-	{
-	    *(CARD16 *)d = *(CARD16 *)s;
-	    w -= 2;
-	    s += 2;
-	    d += 2;
-	}
-
-	while (w >= 4 && ((unsigned long)d & 7))
-	{
-	    *(CARD32 *)d = *(CARD32 *)s;
-
-	    w -= 4;
-	    s += 4;
-	    d += 4;
-	}
-
-	while (w >= 64)
-	{
-	    *(__m64 *)(d + 0)  = *(__m64 *)(s + 0);
-	    *(__m64 *)(d + 8)  = *(__m64 *)(s + 8);
-	    *(__m64 *)(d + 16) = *(__m64 *)(s + 16);
-	    *(__m64 *)(d + 24) = *(__m64 *)(s + 24);
-	    *(__m64 *)(d + 32) = *(__m64 *)(s + 32);
-	    *(__m64 *)(d + 40) = *(__m64 *)(s + 40);
-	    *(__m64 *)(d + 48) = *(__m64 *)(s + 48);
-	    *(__m64 *)(d + 56) = *(__m64 *)(s + 56);
-	    w -= 64;
-	    s += 64;
-	    d += 64;
-	}
-	while (w >= 4)
-	{
-	    *(CARD32 *)d = *(CARD32 *)s;
-
-	    w -= 4;
-	    s += 4;
-	    d += 4;
-	}
-	if (w >= 2)
-	{
-	    *(CARD16 *)d = *(CARD16 *)s;
-	    w -= 2;
-	    s += 2;
-	    d += 2;
-	}
-    }
-
-    _mm_empty();
-}
-
-void
-fbCompositeCopyAreammx (pixman_operator_t		op,
-			PicturePtr	pSrc,
-			PicturePtr	pMask,
-			PicturePtr	pDst,
-			INT16		xSrc,
-			INT16		ySrc,
-			INT16		xMask,
-			INT16		yMask,
-			INT16		xDst,
-			INT16		yDst,
-			CARD16		width,
-			CARD16		height)
-{
-    fbCopyAreammx (pSrc->pDrawable,
-		   pDst->pDrawable,
-		   xSrc, ySrc,
-		   xDst, yDst,
-		   width, height);
-}
-
-#endif /* RENDER */
diff --git a/pixman/src/fbmmx.h b/pixman/src/fbmmx.h
deleted file mode 100644
index 9c20cd6..0000000
--- a/pixman/src/fbmmx.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Copyright © 2004 Red Hat, Inc.
- * Copyright © 2005 Trolltech AS
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Red Hat not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  Red Hat makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- *
- * Author:  Søren Sandmann (sandmann at redhat.com)
- *          Lars Knoll (lars at trolltech.com)
- *
- * Based on work by Owen Taylor
- */
-#ifdef USE_MMX
-
-#if !defined(__amd64__) && !defined(__x86_64__)
-pixman_private
-Bool fbHaveMMX(void);
-#else
-#define fbHaveMMX() TRUE
-#endif
-
-#else
-#define fbHaveMMX() FALSE
-#endif
-
-#ifdef USE_MMX
-
-pixman_private
-void fbComposeSetupMMX(void);
-
-pixman_private
-void fbCompositeIn_nx8x8mmx (pixman_operator_t	op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height);
-
-pixman_private
-void fbCompositeSolidMask_nx8888x0565Cmmx (pixman_operator_t      op,
-					   PicturePtr pSrc,
-					   PicturePtr pMask,
-					   PicturePtr pDst,
-					   INT16      xSrc,
-					   INT16      ySrc,
-					   INT16      xMask,
-					   INT16      yMask,
-					   INT16      xDst,
-					   INT16      yDst,
-					   CARD16     width,
-					   CARD16     height);
-pixman_private
-void fbCompositeSrcAdd_8888x8888mmx (pixman_operator_t	op,
-				     PicturePtr	pSrc,
-				     PicturePtr	pMask,
-				     PicturePtr	pDst,
-				     INT16	xSrc,
-				     INT16      ySrc,
-				     INT16      xMask,
-				     INT16      yMask,
-				     INT16      xDst,
-				     INT16      yDst,
-				     CARD16     width,
-				     CARD16     height);
-pixman_private
-void fbCompositeSolidMask_nx8888x8888Cmmx (pixman_operator_t	op,
-					   PicturePtr	pSrc,
-					   PicturePtr	pMask,
-					   PicturePtr	pDst,
-					   INT16	xSrc,
-					   INT16	ySrc,
-					   INT16	xMask,
-					   INT16	yMask,
-					   INT16	xDst,
-					   INT16	yDst,
-					   CARD16	width,
-					   CARD16	height);
-pixman_private
-void fbCompositeSolidMask_nx8x8888mmx (pixman_operator_t      op,
-				       PicturePtr pSrc,
-				       PicturePtr pMask,
-				       PicturePtr pDst,
-				       INT16      xSrc,
-				       INT16      ySrc,
-				       INT16      xMask,
-				       INT16      yMask,
-				       INT16      xDst,
-				       INT16      yDst,
-				       CARD16     width,
-				       CARD16     height);
-pixman_private
-void fbCompositeSolidMaskSrc_nx8x8888mmx (pixman_operator_t      op,
-					  PicturePtr pSrc,
-					  PicturePtr pMask,
-					  PicturePtr pDst,
-					  INT16      xSrc,
-					  INT16      ySrc,
-					  INT16      xMask,
-					  INT16      yMask,
-					  INT16      xDst,
-					  INT16      yDst,
-					  CARD16     width,
-					  CARD16     height);
-
-pixman_private
-void fbCompositeSrcAdd_8888x8x8mmx (pixman_operator_t   op,
-				    PicturePtr pSrc,
-				    PicturePtr pMask,
-				    PicturePtr pDst,
-				    INT16      xSrc,
-				    INT16      ySrc,
-				    INT16      xMask,
-				    INT16      yMask,
-				    INT16      xDst,
-				    INT16      yDst,
-				    CARD16     width,
-				    CARD16     height);
-
-pixman_private
-void fbCompositeIn_8x8mmx (pixman_operator_t	op,
-			   PicturePtr pSrc,
-			   PicturePtr pMask,
-			   PicturePtr pDst,
-			   INT16      xSrc,
-			   INT16      ySrc,
-			   INT16      xMask,
-			   INT16      yMask,
-			   INT16      xDst,
-			   INT16      yDst,
-			   CARD16     width,
-			   CARD16     height);
-
-pixman_private
-void fbCompositeSrcAdd_8000x8000mmx (pixman_operator_t	op,
-				     PicturePtr pSrc,
-				     PicturePtr pMask,
-				     PicturePtr pDst,
-				     INT16      xSrc,
-				     INT16      ySrc,
-				     INT16      xMask,
-				     INT16      yMask,
-				     INT16      xDst,
-				     INT16      yDst,
-				     CARD16     width,
-				     CARD16     height);
-pixman_private
-void fbCompositeSrc_8888RevNPx8888mmx (pixman_operator_t      op,
-				       PicturePtr pSrc,
-				       PicturePtr pMask,
-				       PicturePtr pDst,
-				       INT16      xSrc,
-				       INT16      ySrc,
-				       INT16      xMask,
-				       INT16      yMask,
-				       INT16      xDst,
-				       INT16      yDst,
-				       CARD16     width,
-				       CARD16     height);
-pixman_private
-void fbCompositeSrc_8888x0565mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height);
-pixman_private
-void fbCompositeSrc_8888RevNPx0565mmx (pixman_operator_t      op,
-				       PicturePtr pSrc,
-				       PicturePtr pMask,
-				       PicturePtr pDst,
-				       INT16      xSrc,
-				       INT16      ySrc,
-				       INT16      xMask,
-				       INT16      yMask,
-				       INT16      xDst,
-				       INT16      yDst,
-				       CARD16     width,
-				       CARD16     height);
-pixman_private
-void fbCompositeSolid_nx8888mmx (pixman_operator_t		op,
-				 PicturePtr	pSrc,
-				 PicturePtr	pMask,
-				 PicturePtr	pDst,
-				 INT16		xSrc,
-				 INT16		ySrc,
-				 INT16		xMask,
-				 INT16		yMask,
-				 INT16		xDst,
-				 INT16		yDst,
-				 CARD16		width,
-				 CARD16		height);
-pixman_private
-void fbCompositeSolid_nx0565mmx (pixman_operator_t		op,
-				 PicturePtr	pSrc,
-				 PicturePtr	pMask,
-				 PicturePtr	pDst,
-				 INT16		xSrc,
-				 INT16		ySrc,
-				 INT16		xMask,
-				 INT16		yMask,
-				 INT16		xDst,
-				 INT16		yDst,
-				 CARD16		width,
-				 CARD16		height);
-pixman_private
-void fbCompositeSolidMask_nx8x0565mmx (pixman_operator_t      op,
-				       PicturePtr pSrc,
-				       PicturePtr pMask,
-				       PicturePtr pDst,
-				       INT16      xSrc,
-				       INT16      ySrc,
-				       INT16      xMask,
-				       INT16      yMask,
-				       INT16      xDst,
-				       INT16      yDst,
-				       CARD16     width,
-				       CARD16     height);
-pixman_private
-void fbCompositeSrc_x888x8x8888mmx (pixman_operator_t	op,
-				    PicturePtr  pSrc,
-				    PicturePtr  pMask,
-				    PicturePtr  pDst,
-				    INT16	xSrc,
-				    INT16	ySrc,
-				    INT16       xMask,
-				    INT16       yMask,
-				    INT16       xDst,
-				    INT16       yDst,
-				    CARD16      width,
-				    CARD16      height);
-pixman_private
-void fbCompositeSrc_8888x8x8888mmx (pixman_operator_t	op,
-				    PicturePtr  pSrc,
-				    PicturePtr  pMask,
-				    PicturePtr  pDst,
-				    INT16	xSrc,
-				    INT16	ySrc,
-				    INT16       xMask,
-				    INT16       yMask,
-				    INT16       xDst,
-				    INT16       yDst,
-				    CARD16      width,
-				    CARD16      height);
-pixman_private
-void fbCompositeSrc_8888x8888mmx (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height);
-pixman_private
-void fbCompositeCopyAreammx (pixman_operator_t	op,
-			     PicturePtr	pSrc,
-			     PicturePtr	pMask,
-			     PicturePtr	pDst,
-			     INT16	xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height);
-#endif /* USE_MMX */
diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c
deleted file mode 100644
index 2d71402..0000000
--- a/pixman/src/fbpict.c
+++ /dev/null
@@ -1,2181 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-#ifdef RENDER
-
-#include "fbpict.h"
-#include "fbmmx.h"
-
-static CARD32
-fbOver (CARD32 x, CARD32 y)
-{
-    CARD16  a = ~x >> 24;
-    CARD16  t;
-    CARD32  m,n,o,p;
-
-    m = FbOverU(x,y,0,a,t);
-    n = FbOverU(x,y,8,a,t);
-    o = FbOverU(x,y,16,a,t);
-    p = FbOverU(x,y,24,a,t);
-    return m|n|o|p;
-}
-
-static CARD32
-fbOver24 (CARD32 x, CARD32 y)
-{
-    CARD16  a = ~x >> 24;
-    CARD16  t;
-    CARD32  m,n,o;
-
-    m = FbOverU(x,y,0,a,t);
-    n = FbOverU(x,y,8,a,t);
-    o = FbOverU(x,y,16,a,t);
-    return m|n|o;
-}
-
-static CARD32
-fbIn (CARD32 x, CARD8 y)
-{
-    CARD16  a = y;
-    CARD16  t;
-    CARD32  m,n,o,p;
-
-    m = FbInU(x,0,a,t);
-    n = FbInU(x,8,a,t);
-    o = FbInU(x,16,a,t);
-    p = FbInU(x,24,a,t);
-    return m|n|o|p;
-}
-
-#define genericCombine24(a,b,c,d) (((a)*(c)+(b)*(d)))
-
-/*
- * This macro does src IN mask OVER dst when src and dst are 0888.
- * If src has alpha, this will not work
- */
-#define inOver0888(alpha, source, destval, dest) { \
-	CARD32 dstrb=destval&0xFF00FF; CARD32 dstag=(destval>>8)&0xFF00FF; \
-	CARD32 drb=((source&0xFF00FF)-dstrb)*alpha; CARD32 dag=(((source>>8)&0xFF00FF)-dstag)*alpha; \
-	dest =((((drb>>8) + dstrb) & 0x00FF00FF) | ((((dag>>8) + dstag) << 8) & 0xFF00FF00)); \
-	}
-
-/*
- * This macro does src IN mask OVER dst when src and dst are 0565 and
- * mask is a 5-bit alpha value.  Again, if src has alpha, this will not
- * work.
- */
-
-#define inOver0565(alpha, source, destval, dest) { \
-	CARD16 dstrb = destval & 0xf81f; CARD16 dstg  = destval & 0x7e0; \
-	CARD32 drb = ((source&0xf81f)-dstrb)*alpha; CARD32 dg=((source & 0x7e0)-dstg)*alpha; \
-	dest = ((((drb>>5) + dstrb)&0xf81f) | (((dg>>5)  + dstg) & 0x7e0)); \
-	}
-
-#define inOver2x0565(alpha, source, destval, dest) { \
-	CARD32 dstrb = destval & 0x07e0f81f; CARD32 dstg  = (destval & 0xf81f07e0)>>5; \
-	CARD32 drb = ((source&0x07e0f81f)-dstrb)*alpha; CARD32 dg=(((source & 0xf81f07e0)>>5)-dstg)*alpha; \
-	dest = ((((drb>>5) + dstrb)&0x07e0f81f) | ((((dg>>5)  + dstg)<<5) & 0xf81f07e0)); \
-	}
-
-#if IMAGE_BYTE_ORDER == LSBFirst
-#	define setupPackedReader(count,temp,where,workingWhere,workingVal) count=(long)where; \
-					temp=count&3; \
-					where-=temp; \
-					workingWhere=(CARD32 *)where; \
-					workingVal=*workingWhere++; \
-					count=4-temp; \
-					workingVal>>=(8*temp)
-#	define readPacked(where,x,y,z) {if(!(x)) { (x)=4; y=*z++; } where=(y)&0xff; (y)>>=8; (x)--;}
-#	define readPackedSource(where) readPacked(where,ws,workingSource,wsrc)
-#	define readPackedDest(where) readPacked(where,wd,workingiDest,widst)
-#	define writePacked(what) workingoDest>>=8; workingoDest|=(what<<24); ww--; if(!ww) { ww=4; *wodst++=workingoDest; }
-#else
-#	define setupPackedReader(count,temp,where,workingWhere,workingVal) count=(long)where; \
-					temp=count&3; \
-					where-=temp; \
-					workingWhere=(CARD32 *)where; \
-					workingVal=*workingWhere++; \
-					count=4-temp; \
-					workingVal<<=(8*temp)
-#	define readPacked(where,x,y,z) {if(!(x)) { (x)=4; y=*z++; } where=(y)>>24; (y)<<=8; (x)--;}
-#	define readPackedSource(where) readPacked(where,ws,workingSource,wsrc)
-#	define readPackedDest(where) readPacked(where,wd,workingiDest,widst)
-#	define writePacked(what) workingoDest<<=8; workingoDest|=what; ww--; if(!ww) { ww=4; *wodst++=workingoDest; }
-#endif
-/*
- * Naming convention:
- *
- *  opSRCxMASKxDST
- */
-
-static void
-fbCompositeSolidMask_nx8x8888 (pixman_operator_t   op,
-			       PicturePtr pSrc,
-			       PicturePtr pMask,
-			       PicturePtr pDst,
-			       INT16      xSrc,
-			       INT16      ySrc,
-			       INT16      xMask,
-			       INT16      yMask,
-			       INT16      xDst,
-			       INT16      yDst,
-			       CARD16     width,
-			       CARD16     height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine, *dst, d, dstMask;
-    CARD8	*maskLine, *mask, m;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    dstMask = FbFullMask (pDst->pDrawable->depth);
-    srca = src >> 24;
-    if (src == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    m = *mask++;
-	    if (m == 0xff)
-	    {
-		if (srca == 0xff)
-		    *dst = src & dstMask;
-		else
-		    *dst = fbOver (src, *dst) & dstMask;
-	    }
-	    else if (m)
-	    {
-		d = fbIn (src, m);
-		*dst = fbOver (d, *dst) & dstMask;
-	    }
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSolidMask_nx8888x8888C (pixman_operator_t   op,
-				   PicturePtr pSrc,
-				   PicturePtr pMask,
-				   PicturePtr pDst,
-				   INT16      xSrc,
-				   INT16      ySrc,
-				   INT16      xMask,
-				   INT16      yMask,
-				   INT16      xDst,
-				   INT16      yDst,
-				   CARD16     width,
-				   CARD16     height)
-{
-    CARD32	src, srca;
-    CARD32	*dstLine, *dst, d, dstMask;
-    CARD32	*maskLine, *mask, ma;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    CARD32	m, n, o, p;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    dstMask = FbFullMask (pDst->pDrawable->depth);
-    srca = src >> 24;
-    if (src == 0)
-	return;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    ma = *mask++;
-	    if (ma == 0xffffffff)
-	    {
-		if (srca == 0xff)
-		    *dst = src & dstMask;
-		else
-		    *dst = fbOver (src, *dst) & dstMask;
-	    }
-	    else if (ma)
-	    {
-		d = *dst;
-#define FbInOverC(src,srca,msk,dst,i,result) { \
-    CARD16  __a = FbGet8(msk,i); \
-    CARD32  __t, __ta; \
-    CARD32  __i; \
-    __t = FbIntMult (FbGet8(src,i), __a,__i); \
-    __ta = (CARD8) ~FbIntMult (srca, __a,__i); \
-    __t = __t + FbIntMult(FbGet8(dst,i),__ta,__i); \
-    __t = (CARD32) (CARD8) (__t | (-(__t >> 8))); \
-    result = __t << (i); \
-}
-		FbInOverC (src, srca, ma, d, 0, m);
-		FbInOverC (src, srca, ma, d, 8, n);
-		FbInOverC (src, srca, ma, d, 16, o);
-		FbInOverC (src, srca, ma, d, 24, p);
-		*dst = m|n|o|p;
-	    }
-	    dst++;
-	}
-    }
-}
-
-#define srcAlphaCombine24(a,b) genericCombine24(a,b,srca,srcia)
-static void
-fbCompositeSolidMask_nx8x0888 (pixman_operator_t   op,
-			       PicturePtr pSrc,
-			       PicturePtr pMask,
-			       PicturePtr pDst,
-			       INT16      xSrc,
-			       INT16      ySrc,
-			       INT16      xMask,
-			       INT16      yMask,
-			       INT16      xDst,
-			       INT16      yDst,
-			       CARD16     width,
-			       CARD16     height)
-{
-    CARD32	src, srca, srcia;
-    CARD8	*dstLine, *dst, *edst;
-    CARD8	*maskLine, *mask, m;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-	CARD32 rs,gs,bs,rd,gd,bd;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    srcia = 255-srca;
-    if (src == 0)
-	return;
-
-	rs=src&0xff;
-	gs=(src>>8)&0xff;
-	bs=(src>>16)&0xff;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 3);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    while (height--)
-	{
-		/* fixme: cleanup unused */
-		unsigned long wt,wd;
-		CARD32 workingiDest;
-		CARD32 *widst;
-
-		edst=dst = dstLine;
-		dstLine += dstStride;
-		mask = maskLine;
-		maskLine += maskStride;
-		w = width;
-
-#ifndef NO_MASKED_PACKED_READ
-		setupPackedReader(wd,wt,edst,widst,workingiDest);
-#endif
-
-		while (w--)
-		{
-#ifndef NO_MASKED_PACKED_READ
-			readPackedDest(rd);
-			readPackedDest(gd);
-			readPackedDest(bd);
-#else
-			rd= *edst++;
-			gd= *edst++;
-			bd= *edst++;
-#endif
-			m = *mask++;
-			if (m == 0xff)
-			{
-				if (srca == 0xff)
-				{
-					*dst++=rs;
-					*dst++=gs;
-					*dst++=bs;
-				}
-				else
-				{
-					*dst++=(srcAlphaCombine24(rs, rd)>>8);
-					*dst++=(srcAlphaCombine24(gs, gd)>>8);
-					*dst++=(srcAlphaCombine24(bs, bd)>>8);
-				}
-			}
-			else if (m)
-			{
-				int na=(srca*(int)m)>>8;
-				int nia=255-na;
-				*dst++=(genericCombine24(rs, rd, na, nia)>>8);
-				*dst++=(genericCombine24(gs, gd, na, nia)>>8);
-				*dst++=(genericCombine24(bs, bd, na, nia)>>8);
-			}
-			else
-			{
-				dst+=3;
-			}
-		}
-	}
-}
-
-static void
-fbCompositeSolidMask_nx8x0565 (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD32	src, srca8, srca5;
-    CARD16	*dstLine, *dst;
-    CARD16	d;
-    CARD32	t;
-    CARD8	*maskLine, *mask, m;
-    FbStride	dstStride, maskStride;
-    CARD16	w,src16;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    if (src == 0)
-	return;
-
-    srca8 = (src >> 24);
-    srca5 = (srca8 >> 3);
-
-    src16 = cvt8888to0565(src);
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    m = *mask++;
-	    if (m == 0)
-		dst++;
-	    else if (srca5 == (0xff >> 3))
-	    {
-		if (m == 0xff)
-		    *dst++ = src16;
-		else
-		{
-		    d = *dst;
-		    m >>= 3;
-		    inOver0565 (m, src16, d, *dst++);
-		}
-	    }
-	    else
-	    {
-		d = *dst;
-		if (m == 0xff)
-		{
-		    t = fbOver24 (src, cvt0565to0888 (d));
-		}
-		else
-		{
-		    t = fbIn (src, m);
-		    t = fbOver (t, cvt0565to0888 (d));
-		}
-		*dst++ = cvt8888to0565 (t);
-	    }
-	}
-    }
-}
-
-static void
-fbCompositeSolidMask_nx8888x0565 (pixman_operator_t      op,
-				  PicturePtr pSrc,
-				  PicturePtr pMask,
-				  PicturePtr pDst,
-				  INT16      xSrc,
-				  INT16      ySrc,
-				  INT16      xMask,
-				  INT16      yMask,
-				  INT16      xDst,
-				  INT16      yDst,
-				  CARD16     width,
-				  CARD16     height)
-{
-    CARD32	src, srca8, srca5;
-    CARD16	*dstLine, *dst;
-    CARD16	d;
-    CARD32	*maskLine, *mask;
-    CARD32	t;
-    CARD8	m;
-    FbStride	dstStride, maskStride;
-    CARD16	w, src16;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    if (src == 0)
-	return;
-
-    srca8 = src >> 24;
-    srca5 = srca8 >> 3;
-    src16 = cvt8888to0565(src);
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    m = *mask++ >> 24;
-	    if (m == 0)
-		dst++;
-	    else if (srca5 == (0xff >> 3))
-	    {
-		if (m == 0xff)
-		    *dst++ = src16;
-		else
-		{
-		    d = *dst;
-		    m >>= 3;
-		    inOver0565 (m, src16, d, *dst++);
-		}
-	    }
-	    else
-	    {
-		if (m == 0xff)
-		{
-		    d = *dst;
-		    t = fbOver24 (src, cvt0565to0888 (d));
-		    *dst++ = cvt8888to0565 (t);
-		}
-		else
-		{
-		    d = *dst;
-		    t = fbIn (src, m);
-		    t = fbOver (t, cvt0565to0888 (d));
-		    *dst++ = cvt8888to0565 (t);
-		}
-	    }
-	}
-    }
-}
-
-static void
-fbCompositeSolidMask_nx8888x0565C (pixman_operator_t      op,
-				   PicturePtr pSrc,
-				   PicturePtr pMask,
-				   PicturePtr pDst,
-				   INT16      xSrc,
-				   INT16      ySrc,
-				   INT16      xMask,
-				   INT16      yMask,
-				   INT16      xDst,
-				   INT16      yDst,
-				   CARD16     width,
-				   CARD16     height)
-{
-    CARD32	src, srca;
-    CARD16	src16;
-    CARD16	*dstLine, *dst;
-    CARD32	d;
-    CARD32	*maskLine, *mask, ma;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    CARD32	m, n, o;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    srca = src >> 24;
-    if (src == 0)
-	return;
-
-    src16 = cvt8888to0565(src);
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    ma = *mask++;
-	    if (ma == 0xffffffff)
-	    {
-		if (srca == 0xff)
-		{
-		    *dst = src16;
-		}
-		else
-		{
-		    d = *dst;
-		    d = fbOver24 (src, cvt0565to0888(d));
-		    *dst = cvt8888to0565(d);
-		}
-	    }
-	    else if (ma)
-	    {
-		d = *dst;
-		d = cvt0565to0888(d);
-		FbInOverC (src, srca, ma, d, 0, m);
-		FbInOverC (src, srca, ma, d, 8, n);
-		FbInOverC (src, srca, ma, d, 16, o);
-		d = m|n|o;
-		*dst = cvt8888to0565(d);
-	    }
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSrc_8888x8888 (pixman_operator_t  op,
-			 PicturePtr pSrc,
-			 PicturePtr pMask,
-			 PicturePtr pDst,
-			 INT16      xSrc,
-			 INT16      ySrc,
-			 INT16      xMask,
-			 INT16      yMask,
-			 INT16      xDst,
-			 INT16      yDst,
-			 CARD16     width,
-			 CARD16     height)
-{
-    CARD32	*dstLine, *dst, dstMask;
-    CARD32	*srcLine, *src, s;
-    FbStride	dstStride, srcStride;
-    CARD8	a;
-    CARD16	w;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    dstMask = FbFullMask (pDst->pDrawable->depth);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    a = s >> 24;
-	    if (a == 0xff)
-		*dst = s & dstMask;
-	    else if (a)
-		*dst = fbOver (s, *dst) & dstMask;
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSrc_8888x0888 (pixman_operator_t  op,
-			 PicturePtr pSrc,
-			 PicturePtr pMask,
-			 PicturePtr pDst,
-			 INT16      xSrc,
-			 INT16      ySrc,
-			 INT16      xMask,
-			 INT16      yMask,
-			 INT16      xDst,
-			 INT16      yDst,
-			 CARD16     width,
-			 CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD32	d;
-    CARD32	*srcLine, *src, s;
-    CARD8	a;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 3);
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    a = s >> 24;
-	    if (a)
-	    {
-		if (a == 0xff)
-		    d = s;
-		else
-		    d = fbOver24 (s, Fetch24(dst));
-		Store24(dst,d);
-	    }
-	    dst += 3;
-	}
-    }
-}
-
-static void
-fbCompositeSrc_8888x0565 (pixman_operator_t  op,
-			 PicturePtr pSrc,
-			 PicturePtr pMask,
-			 PicturePtr pDst,
-			 INT16      xSrc,
-			 INT16      ySrc,
-			 INT16      xMask,
-			 INT16      yMask,
-			 INT16      xDst,
-			 INT16      yDst,
-			 CARD16     width,
-			 CARD16     height)
-{
-    CARD16	*dstLine, *dst;
-    CARD32	d;
-    CARD32	*srcLine, *src, s;
-    CARD8	a;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    a = s >> 24;
-	    if (a)
-	    {
-		if (a == 0xff)
-		    d = s;
-		else
-		{
-		    d = *dst;
-		    d = fbOver24 (s, cvt0565to0888(d));
-		}
-		*dst = cvt8888to0565(d);
-	    }
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSrcAdd_8000x8000 (pixman_operator_t	  op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    CARD8	s, d;
-    CARD16	t;
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    if (s)
-	    {
-		if (s != 0xff)
-		{
-		    d = *dst;
-		    t = d + s;
-		    s = t | (0 - (t >> 8));
-		}
-		*dst = s;
-	    }
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSrcAdd_8888x8888 (pixman_operator_t   op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD32	*dstLine, *dst;
-    CARD32	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    CARD32	s, d;
-    CARD16	t;
-    CARD32	m,n,o,p;
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	src = srcLine;
-	srcLine += srcStride;
-	w = width;
-
-	while (w--)
-	{
-	    s = *src++;
-	    if (s)
-	    {
-		if (s != 0xffffffff)
-		{
-		    d = *dst;
-		    if (d)
-		    {
-			m = FbAdd(s,d,0,t);
-			n = FbAdd(s,d,8,t);
-			o = FbAdd(s,d,16,t);
-			p = FbAdd(s,d,24,t);
-			s = m|n|o|p;
-		    }
-		}
-		*dst = s;
-	    }
-	    dst++;
-	}
-    }
-}
-
-static void
-fbCompositeSrcAdd_8888x8x8 (pixman_operator_t   op,
-			    PicturePtr pSrc,
-			    PicturePtr pMask,
-			    PicturePtr pDst,
-			    INT16      xSrc,
-			    INT16      ySrc,
-			    INT16      xMask,
-			    INT16      yMask,
-			    INT16      xDst,
-			    INT16      yDst,
-			    CARD16     width,
-			    CARD16     height)
-{
-    CARD8	*dstLine, *dst;
-    CARD8	*maskLine, *mask;
-    FbStride	dstStride, maskStride;
-    CARD16	w;
-    CARD32	src;
-    CARD8	sa;
-
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-    fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-    fbComposeGetSolid (pSrc, pDst, src);
-    sa = (src >> 24);
-
-    while (height--)
-    {
-	dst = dstLine;
-	dstLine += dstStride;
-	mask = maskLine;
-	maskLine += maskStride;
-	w = width;
-
-	while (w--)
-	{
-	    CARD16	tmp;
-	    CARD16	a;
-	    CARD32	m, d;
-	    CARD32	r;
-
-	    a = *mask++;
-	    d = *dst;
-
-	    m = FbInU (sa, 0, a, tmp);
-	    r = FbAdd (m, d, 0, tmp);
-
-	    *dst++ = r;
-	}
-    }
-}
-
-static void
-fbCompositeSrcAdd_1000x1000 (pixman_operator_t   op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    FbBits	*dstBits, *srcBits;
-    FbStride	dstStride, srcStride;
-    int		dstBpp, srcBpp;
-    int		dstXoff, dstYoff;
-    int		srcXoff, srcYoff;
-
-    fbGetDrawable(pSrc->pDrawable, srcBits, srcStride, srcBpp, srcXoff, srcYoff);
-
-    fbGetDrawable(pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-
-    fbBlt (srcBits + srcStride * (ySrc + srcYoff),
-	   srcStride,
-	   xSrc + srcXoff,
-
-	   dstBits + dstStride * (yDst + dstYoff),
-	   dstStride,
-	   xDst + dstXoff,
-
-	   width,
-	   height,
-
-	   GXor,
-	   FB_ALLONES,
-	   srcBpp,
-
-	   FALSE,
-	   FALSE);
-}
-
-static void
-fbCompositeSolidMask_nx1xn (pixman_operator_t   op,
-			    PicturePtr pSrc,
-			    PicturePtr pMask,
-			    PicturePtr pDst,
-			    INT16      xSrc,
-			    INT16      ySrc,
-			    INT16      xMask,
-			    INT16      yMask,
-			    INT16      xDst,
-			    INT16      yDst,
-			    CARD16     width,
-			    CARD16     height)
-{
-    FbBits	*dstBits;
-    FbStip	*maskBits;
-    FbStride	dstStride, maskStride;
-    int		dstBpp, maskBpp;
-    int		dstXoff, dstYoff;
-    int		maskXoff, maskYoff;
-    FbBits	src;
-
-    fbComposeGetSolid(pSrc, pDst, src);
-
-    if ((src & 0xff000000) != 0xff000000)
-    {
-	pixman_compositeGeneral  (op, pSrc, pMask, pDst,
-			     xSrc, ySrc, xMask, yMask, xDst, yDst,
-			     width, height);
-	return;
-    }
-    FbGetStipPixels (pMask->pixels, maskBits, maskStride, maskBpp, maskXoff, maskYoff);
-    fbGetDrawable (pDst->pDrawable, dstBits, dstStride, dstBpp, dstXoff, dstYoff);
-
-    switch (dstBpp) {
-    case 32:
-	break;
-    case 24:
-	break;
-    case 16:
-	src = cvt8888to0565(src);
-	break;
-    }
-
-    src = fbReplicatePixel (src, dstBpp);
-
-    fbBltOne (maskBits + maskStride * (yMask + maskYoff),
-	      maskStride,
-	      xMask + maskXoff,
-
-	      dstBits + dstStride * (yDst + dstYoff),
-	      dstStride,
-	      (xDst + dstXoff) * dstBpp,
-	      dstBpp,
-
-	      width * dstBpp,
-	      height,
-
-	      0x0,
-	      src,
-	      FB_ALLONES,
-	      0x0);
-}
-
-/* prototype to help with merging */
-static void
-fbCompositeSrcSrc_nxn  (pixman_operator_t	op,
-			PicturePtr pSrc,
-			PicturePtr pMask,
-			PicturePtr pDst,
-			INT16      xSrc,
-			INT16      ySrc,
-			INT16      xMask,
-			INT16      yMask,
-			INT16      xDst,
-			INT16      yDst,
-			CARD16     width,
-			CARD16     height);
-/*
- * Apply a constant alpha value in an over computation
- */
-static void
-fbCompositeTrans_0565xnx0565(pixman_operator_t      op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD16	*dstLine, *dst;
-    CARD16	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    FbBits	mask;
-    CARD8	maskAlpha;
-    CARD16	s_16, d_16;
-    CARD32	s_32, d_32;
-
-    fbComposeGetSolid (pMask, pDst, mask);
-    maskAlpha = mask >> 27;
-
-    if (!maskAlpha)
-	return;
-    if (maskAlpha == 0xff)
-    {
-	fbCompositeSrcSrc_nxn (PIXMAN_OPERATOR_SRC, pSrc, pMask, pDst,
-			       xSrc, ySrc, xMask, yMask, xDst, yDst,
-			       width, height);
-	return;
-    }
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD16, srcStride, srcLine, 1);
-    fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-
-    while (height--)
-	{
-		CARD32 *isrc, *idst;
-		dst = dstLine;
-		dstLine += dstStride;
-		src = srcLine;
-		srcLine += srcStride;
-		w = width;
-
-		if(((long)src&1)==1)
-		{
-			s_16 = *src++;
-			d_16 = *dst;
-			inOver0565(maskAlpha, s_16, d_16, *dst++);
-			w--;
-		}
-		isrc=(CARD32 *)src;
-		if(((long)dst&1)==0)
-		{
-			idst=(CARD32 *)dst;
-			while (w>1)
-			{
-				s_32 = *isrc++;
-				d_32 = *idst;
-				inOver2x0565(maskAlpha,s_32,d_32,*idst++);
-				w-=2;
-			}
-			dst=(CARD16 *)idst;
-		}
-		else
-		{
-		    while (w > 1)
-		    {
-			s_32 = *isrc++;
-#if IMAGE_BYTE_ORDER == LSBFirst
-				s_16=s_32&0xffff;
-#else
-				s_16=s_32>>16;
-#endif
-				d_16 = *dst;
-				inOver0565(maskAlpha, s_16, d_16, *dst++);
-#if IMAGE_BYTE_ORDER == LSBFirst
-				s_16=s_32>>16;
-#else
-				s_16=s_32&0xffff;
-#endif
-			d_16 = *dst;
-			inOver0565(maskAlpha, s_16, d_16, *dst++);
-			w-=2;
-		    }
-		}
-		src=(CARD16 *)isrc;
-		if(w!=0)
-		{
-			s_16 = *src;
-			d_16 = *dst;
-			inOver0565(maskAlpha, s_16, d_16, *dst);
-		}
-	}
-}
-
-/* macros for "i can't believe it's not fast" packed pixel handling */
-#define alphamaskCombine24(a,b) genericCombine24(a,b,maskAlpha,maskiAlpha)
-static void
-fbCompositeTrans_0888xnx0888(pixman_operator_t      op,
-			     PicturePtr pSrc,
-			     PicturePtr pMask,
-			     PicturePtr pDst,
-			     INT16      xSrc,
-			     INT16      ySrc,
-			     INT16      xMask,
-			     INT16      yMask,
-			     INT16      xDst,
-			     INT16      yDst,
-			     CARD16     width,
-			     CARD16     height)
-{
-    CARD8	*dstLine, *dst,*idst;
-    CARD8	*srcLine, *src;
-    FbStride	dstStride, srcStride;
-    CARD16	w;
-    FbBits	mask;
-    CARD16	maskAlpha,maskiAlpha;
-
-    fbComposeGetSolid (pMask, pDst, mask);
-    maskAlpha = mask >> 24;
-	maskiAlpha= 255-maskAlpha;
-
-    if (!maskAlpha)
-	return;
-    /*
-    if (maskAlpha == 0xff)
-    {
-	fbCompositeSrc_0888x0888 (op, pSrc, pMask, pDst,
-				  xSrc, ySrc, xMask, yMask, xDst, yDst,
-				  width, height);
-	return;
-    }
-    */
-
-    fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 3);
-    fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 3);
-
-	{
-		unsigned long ws,wt;
-		CARD32 workingSource;
-		CARD32 *wsrc, *wdst, *widst;
-		CARD32 rs, rd, nd;
-		CARD8 *isrc;
-
-		/* are xSrc and xDst at the same alignment?  if not, we need to be complicated :)*/
-		/* if(0==0) */
-		if( (((xSrc*3)&3)!=((xDst*3)&3)) || ((srcStride&3)!=(dstStride&3)))
-		{
-			while (height--)
-			{
-				dst = dstLine;
-				dstLine += dstStride;
-				isrc = src = srcLine;
-				srcLine += srcStride;
-				w = width*3;
-
-				setupPackedReader(ws,wt,isrc,wsrc,workingSource);
-
-				/* get to word aligned */
-				switch(~(long)dst&3)
-				{
-					case 1:
-						readPackedSource(rs);
-						/* *dst++=alphamaskCombine24(rs, *dst)>>8; */
-						rd=*dst;  /* make gcc happy.  hope it doens't cost us too much performance*/
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-						w--; if(w==0) break;
-					case 2:
-						readPackedSource(rs);
-						rd=*dst;
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-						w--; if(w==0) break;
-					case 3:
-						readPackedSource(rs);
-						rd=*dst;
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-						w--; if(w==0) break;
-				}
-				wdst=(CARD32 *)dst;
-				while (w>3)
-				{
-					/* FIXME: write a special readPackedWord macro, which knows how to
-					 * halfword combine
-					 */
-
-#if IMAGE_BYTE_ORDER == LSBFirst
-					rd=*wdst;
-					readPackedSource(nd);
-					readPackedSource(rs);
-					nd|=rs<<8;
-					readPackedSource(rs);
-					nd|=rs<<16;
-					readPackedSource(rs);
-					nd|=rs<<24;
-#else
-					readPackedSource(nd);
-					nd<<=24;
-					readPackedSource(rs);
-					nd|=rs<<16;
-					readPackedSource(rs);
-					nd|=rs<<8;
-					readPackedSource(rs);
-					nd|=rs;
-#endif
-					inOver0888(maskAlpha, nd, rd, *wdst++)
-					w-=4;
-				}
-				dst=(CARD8 *)wdst;
-				switch(w)
-				{
-					case 3:
-						readPackedSource(rs);
-						rd=*dst;
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-					case 2:
-						readPackedSource(rs);
-						rd=*dst;
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-					case 1:
-						readPackedSource(rs);
-						rd=*dst;
-						*dst++=alphamaskCombine24(rs, rd)>>8;
-				}
-			}
-		}
-		else
-		{
-			while (height--)
-			{
-				idst=dst = dstLine;
-				dstLine += dstStride;
-				src = srcLine;
-				srcLine += srcStride;
-				w = width*3;
-				/* get to word aligned */
-				switch(~(long)src&3)
-				{
-					case 1:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-						w--; if(w==0) break;
-					case 2:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-						w--; if(w==0) break;
-					case 3:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-						w--; if(w==0) break;
-				}
-				wsrc=(CARD32 *)src;
-				widst=(CARD32 *)dst;
-
-				while(w>3)
-				{
-					rs = *wsrc++;
-					rd = *widst;
-					inOver0888(maskAlpha, rs, rd, *widst++);
-					w-=4;
-				}
-				src=(CARD8 *)wsrc;
-				dst=(CARD8 *)widst;
-				switch(w)
-				{
-					case 3:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-					case 2:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-					case 1:
-						rd=alphamaskCombine24(*src++, *dst)>>8;
-						*dst++=rd;
-				}
-			}
-		}
-	}
-}
-
-/*
- * Simple bitblt
- */
-
-static void
-fbCompositeSrcSrc_nxn  (pixman_operator_t	op,
-			PicturePtr pSrc,
-			PicturePtr pMask,
-			PicturePtr pDst,
-			INT16      xSrc,
-			INT16      ySrc,
-			INT16      xMask,
-			INT16      yMask,
-			INT16      xDst,
-			INT16      yDst,
-			CARD16     width,
-			CARD16     height)
-{
-    FbBits	*dst;
-    FbBits	*src;
-    FbStride	dstStride, srcStride;
-    int		srcXoff, srcYoff;
-    int		dstXoff, dstYoff;
-    int		srcBpp;
-    int		dstBpp;
-    Bool	reverse = FALSE;
-    Bool	upsidedown = FALSE;
-
-    fbGetDrawable(pSrc->pDrawable,src,srcStride,srcBpp,srcXoff,srcYoff);
-    fbGetDrawable(pDst->pDrawable,dst,dstStride,dstBpp,dstXoff,dstYoff);
-
-    fbBlt (src + (ySrc + srcYoff) * srcStride,
-	   srcStride,
-	   (xSrc + srcXoff) * srcBpp,
-
-	   dst + (yDst + dstYoff) * dstStride,
-	   dstStride,
-	   (xDst + dstXoff) * dstBpp,
-
-	   (width) * dstBpp,
-	   (height),
-
-	   GXcopy,
-	   FB_ALLONES,
-	   dstBpp,
-
-	   reverse,
-	   upsidedown);
-}
-
-/*
- * Solid fill
-void
-fbCompositeSolidSrc_nxn  (CARD8	op,
-			  PicturePtr pSrc,
-			  PicturePtr pMask,
-			  PicturePtr pDst,
-			  INT16      xSrc,
-			  INT16      ySrc,
-			  INT16      xMask,
-			  INT16      yMask,
-			  INT16      xDst,
-			  INT16      yDst,
-			  CARD16     width,
-			  CARD16     height)
-{
-
-}
- */
-
-# define mod(a,b)	((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
-
-void
-pixman_composite (pixman_operator_t	op,
-	     PicturePtr pSrc,
-	     PicturePtr pMask,
-	     PicturePtr pDst,
-	     int	xSrc,
-	     int	ySrc,
-	     int	xMask,
-	     int	yMask,
-	     int	xDst,
-	     int	yDst,
-	     int	width,
-	     int	height)
-{
-    pixman_region16_t	    region;
-    int		    n;
-    pixman_box16_t    *pbox;
-    CompositeFunc   func = NULL;
-    Bool	    srcRepeat = pSrc->pDrawable && pSrc->repeat == RepeatNormal;
-    Bool	    maskRepeat = FALSE;
-    Bool	    srcTransform = pSrc->transform != 0;
-    Bool	    maskTransform = FALSE;
-    Bool	    srcAlphaMap = pSrc->alphaMap != 0;
-    Bool	    maskAlphaMap = FALSE;
-    Bool	    dstAlphaMap = pDst->alphaMap != 0;
-    int		    x_msk, y_msk, x_src, y_src, x_dst, y_dst;
-    unsigned int    w, h, w_this, h_this;
-
-#ifdef USE_MMX
-    static Bool mmx_setup = FALSE;
-    if (!mmx_setup) {
-        fbComposeSetupMMX();
-        mmx_setup = TRUE;
-    }
-#endif
-
-    xDst += pDst->pDrawable->x;
-    yDst += pDst->pDrawable->y;
-    if (pSrc->pDrawable) {
-        xSrc += pSrc->pDrawable->x;
-        ySrc += pSrc->pDrawable->y;
-    }
-
-    if (srcRepeat && srcTransform &&
-	pSrc->pDrawable->width == 1 &&
-	pSrc->pDrawable->height == 1)
-	srcTransform = FALSE;
-
-    if (pMask && pMask->pDrawable)
-    {
-	xMask += pMask->pDrawable->x;
-	yMask += pMask->pDrawable->y;
-	maskRepeat = pMask->repeat == RepeatNormal;
-	maskTransform = pMask->transform != 0;
-#ifdef PIXMAN_CONVOLUTION
-	if (pMask->filter == PictFilterConvolution)
-	    maskTransform = TRUE;
-#endif
-
-	maskAlphaMap = pMask->alphaMap != 0;
-
-	if (maskRepeat && maskTransform &&
-	    pMask->pDrawable->width == 1 &&
-	    pMask->pDrawable->height == 1)
-	    maskTransform = FALSE;
-    }
-
-    if (pSrc->pDrawable && (!pMask || pMask->pDrawable)
-        && !srcTransform && !maskTransform
-        && !maskAlphaMap && !srcAlphaMap && !dstAlphaMap
-#ifdef PIXMAN_CONVOLUTION
-        && (pSrc->filter != PictFilterConvolution)
-        && (!pMask || pMask->filter != PictFilterConvolution)
-#endif
-        )
-    switch (op) {
-    case PIXMAN_OPERATOR_OVER:
-	if (pMask)
-	{
-	    if (srcRepeat &&
-		pSrc->pDrawable->width == 1 &&
-		pSrc->pDrawable->height == 1)
-	    {
-		if (PICT_FORMAT_COLOR(pSrc->format_code)) {
-		    switch (pMask->format_code) {
-		    case PICT_a8:
-			switch (pDst->format_code) {
-			case PICT_r5g6b5:
-			case PICT_b5g6r5:
-#ifdef USE_MMX
-			    if (fbHaveMMX())
-				func = fbCompositeSolidMask_nx8x0565mmx;
-			    else
-#endif
-				func = fbCompositeSolidMask_nx8x0565;
-			    break;
-			case PICT_r8g8b8:
-			case PICT_b8g8r8:
-			    func = fbCompositeSolidMask_nx8x0888;
-			    break;
-			case PICT_a8r8g8b8:
-			case PICT_x8r8g8b8:
-			case PICT_a8b8g8r8:
-			case PICT_x8b8g8r8:
-#ifdef USE_MMX
-			    if (fbHaveMMX())
-				func = fbCompositeSolidMask_nx8x8888mmx;
-			    else
-#endif
-				func = fbCompositeSolidMask_nx8x8888;
-			    break;
-			}
-			break;
-		    case PICT_a8r8g8b8:
-			if (pMask->componentAlpha) {
-			    switch (pDst->format_code) {
-			    case PICT_a8r8g8b8:
-			    case PICT_x8r8g8b8:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSolidMask_nx8888x8888Cmmx;
-				else
-#endif
-				    func = fbCompositeSolidMask_nx8888x8888C;
-				break;
-			    case PICT_r5g6b5:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSolidMask_nx8888x0565Cmmx;
-				else
-#endif
-				    func = fbCompositeSolidMask_nx8888x0565C;
-				break;
-			    }
-			}
-			else
-			{
-			    switch (pDst->format_code) {
-			    case PICT_r5g6b5:
-				func = fbCompositeSolidMask_nx8888x0565;
-				break;
-			    }
-			}
-			break;
-		    case PICT_a8b8g8r8:
-			if (pMask->componentAlpha) {
-			    switch (pDst->format_code) {
-			    case PICT_a8b8g8r8:
-			    case PICT_x8b8g8r8:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSolidMask_nx8888x8888Cmmx;
-				else
-#endif
-				    func = fbCompositeSolidMask_nx8888x8888C;
-				break;
-			    case PICT_b5g6r5:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSolidMask_nx8888x0565Cmmx;
-				else
-#endif
-				    func = fbCompositeSolidMask_nx8888x0565C;
-				break;
-			    }
-			}
-			else
-			{
-			    switch (pDst->format_code) {
-			    case PICT_b5g6r5:
-				func = fbCompositeSolidMask_nx8888x0565;
-				break;
-			    }
-			}
-			break;
-		    case PICT_a1:
-			switch (pDst->format_code) {
-			case PICT_r5g6b5:
-			case PICT_b5g6r5:
-			case PICT_r8g8b8:
-			case PICT_b8g8r8:
-			case PICT_a8r8g8b8:
-			case PICT_x8r8g8b8:
-			case PICT_a8b8g8r8:
-			case PICT_x8b8g8r8:
-			    func = fbCompositeSolidMask_nx1xn;
-			    break;
-			}
-		    }
-		}
-		if (func != pixman_compositeGeneral)
-		    srcRepeat = FALSE;
-	    }
-	    else /* has mask and non-repeating source */
-	    {
-		if (pSrc->pDrawable == pMask->pDrawable &&
-		    xSrc == xMask && ySrc == yMask &&
-		    !pMask->componentAlpha)
-		{
-		    /* source == mask: non-premultiplied data */
-		    switch (pSrc->format_code) {
-		    case PICT_x8b8g8r8:
-			switch (pMask->format_code) {
-			case PICT_a8r8g8b8:
-			case PICT_a8b8g8r8:
-			    switch (pDst->format_code) {
-			    case PICT_a8r8g8b8:
-			    case PICT_x8r8g8b8:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSrc_8888RevNPx8888mmx;
-#endif
-				break;
-			    case PICT_r5g6b5:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSrc_8888RevNPx0565mmx;
-#endif
-				break;
-			    }
-			    break;
-			}
-			break;
-		    case PICT_x8r8g8b8:
-			switch (pMask->format_code) {
-			case PICT_a8r8g8b8:
-			case PICT_a8b8g8r8:
-			    switch (pDst->format_code) {
-			    case PICT_a8b8g8r8:
-			    case PICT_x8b8g8r8:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSrc_8888RevNPx8888mmx;
-#endif
-				break;
-			    case PICT_r5g6b5:
-#ifdef USE_MMX
-				if (fbHaveMMX())
-				    func = fbCompositeSrc_8888RevNPx0565mmx;
-#endif
-				break;
-			    }
-			    break;
-			}
-			break;
-		    }
-		    break;
-		}
-		else
-		{
-		    /* non-repeating source, repeating mask => translucent window */
-		    if (maskRepeat &&
-			pMask->pDrawable->width == 1 &&
-			pMask->pDrawable->height == 1)
-		    {
-			switch (pSrc->format_code) {
-			case PICT_r5g6b5:
-			case PICT_b5g6r5:
-			    if (pDst->format_code == pSrc->format_code)
-				func = fbCompositeTrans_0565xnx0565;
-			    break;
-			case PICT_r8g8b8:
-			case PICT_b8g8r8:
-			    if (pDst->format_code == pSrc->format_code)
-				func = fbCompositeTrans_0888xnx0888;
-			    break;
-#ifdef USE_MMX
-			case PICT_x8r8g8b8:
-			    if ((pDst->format_code == PICT_a8r8g8b8 ||
-				 pDst->format_code == PICT_x8r8g8b8) &&
-				pMask->format_code == PICT_a8 && fbHaveMMX())
-				func = fbCompositeSrc_x888x8x8888mmx;
-			    break;
-			case PICT_x8b8g8r8:
-			    if ((pDst->format_code == PICT_a8b8g8r8 ||
-				 pDst->format_code == PICT_x8b8g8r8) &&
-				pMask->format_code == PICT_a8 && fbHaveMMX())
-				func = fbCompositeSrc_x888x8x8888mmx;
-			    break;
-			case PICT_a8r8g8b8:
-			    if ((pDst->format_code == PICT_a8r8g8b8 ||
-				 pDst->format_code == PICT_x8r8g8b8) &&
-				pMask->format_code == PICT_a8 && fbHaveMMX())
-				func = fbCompositeSrc_8888x8x8888mmx;
-			    break;
-			case PICT_a8b8g8r8:
-			    if ((pDst->format_code == PICT_a8b8g8r8 ||
-				 pDst->format_code == PICT_x8b8g8r8) &&
-				pMask->format_code == PICT_a8 && fbHaveMMX())
-				func = fbCompositeSrc_8888x8x8888mmx;
-			    break;
-#endif
-			}
-
-                        if (func != pixman_compositeGeneral)
-			    maskRepeat = FALSE;
-		    }
-		}
-	    }
-	}
-	else /* no mask */
-	{
-	    if (srcRepeat &&
-		pSrc->pDrawable->width == 1 &&
-		pSrc->pDrawable->height == 1)
-	    {
-		/* no mask and repeating source */
-		switch (pSrc->format_code) {
-		case PICT_a8r8g8b8:
-		    switch (pDst->format_code) {
-		    case PICT_a8r8g8b8:
-		    case PICT_x8r8g8b8:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			{
-			    srcRepeat = FALSE;
-			    func = fbCompositeSolid_nx8888mmx;
-			}
-#endif
-			break;
-		    case PICT_r5g6b5:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			{
-			    srcRepeat = FALSE;
-			    func = fbCompositeSolid_nx0565mmx;
-			}
-#endif
-			break;
-		    }
-		    break;
-		}
-	    }
-	    else
-	    {
-		/*
-		 * Formats without alpha bits are just Copy with Over
-		 */
-		if (pSrc->format_code == pDst->format_code && !PICT_FORMAT_A(pSrc->format_code))
-		{
-#ifdef USE_MMX
-			if (fbHaveMMX() &&
-			    (pSrc->format_code == PICT_x8r8g8b8 || pSrc->format_code == PICT_x8b8g8r8))
-			    func = fbCompositeCopyAreammx;
-			else
-#endif
-			    func = fbCompositeSrcSrc_nxn;
-		}
-		else switch (pSrc->format_code) {
-		case PICT_a8r8g8b8:
-		    switch (pDst->format_code) {
-		    case PICT_a8r8g8b8:
-		    case PICT_x8r8g8b8:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			    func = fbCompositeSrc_8888x8888mmx;
-			else
-#endif
-			    func = fbCompositeSrc_8888x8888;
-			break;
-		    case PICT_r8g8b8:
-			func = fbCompositeSrc_8888x0888;
-			break;
-		    case PICT_r5g6b5:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			    func = fbCompositeSrc_8888x0565mmx;
-			else
-#endif
-			    func = fbCompositeSrc_8888x0565;
-			break;
-		    }
-		    break;
-		case PICT_a8b8g8r8:
-		    switch (pDst->format_code) {
-		    case PICT_a8b8g8r8:
-		    case PICT_x8b8g8r8:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			    func = fbCompositeSrc_8888x8888mmx;
-			else
-#endif
-			    func = fbCompositeSrc_8888x8888;
-			break;
-		    case PICT_b8g8r8:
-			func = fbCompositeSrc_8888x0888;
-			break;
-		    case PICT_b5g6r5:
-#ifdef USE_MMX
-			if (fbHaveMMX())
-			    func = fbCompositeSrc_8888x0565mmx;
-			else
-#endif
-			    func = fbCompositeSrc_8888x0565;
-			break;
-		    }
-		    break;
-		}
-	    }
-	}
-	break;
-    case PIXMAN_OPERATOR_ADD:
-	if (pMask == 0)
-	{
-	    switch (pSrc->format_code) {
-	    case PICT_a8r8g8b8:
-		switch (pDst->format_code) {
-		case PICT_a8r8g8b8:
-#ifdef USE_MMX
-		    if (fbHaveMMX())
-			func = fbCompositeSrcAdd_8888x8888mmx;
-		    else
-#endif
-			func = fbCompositeSrcAdd_8888x8888;
-		    break;
-		}
-		break;
-	    case PICT_a8b8g8r8:
-		switch (pDst->format_code) {
-		case PICT_a8b8g8r8:
-#ifdef USE_MMX
-		    if (fbHaveMMX())
-			func = fbCompositeSrcAdd_8888x8888mmx;
-		    else
-#endif
-			func = fbCompositeSrcAdd_8888x8888;
-		    break;
-		}
-		break;
-	    case PICT_a8:
-		switch (pDst->format_code) {
-		case PICT_a8:
-#ifdef USE_MMX
-		    if (fbHaveMMX())
-			func = fbCompositeSrcAdd_8000x8000mmx;
-		    else
-#endif
-			func = fbCompositeSrcAdd_8000x8000;
-		    break;
-		}
-		break;
-	    case PICT_a1:
-		switch (pDst->format_code) {
-		case PICT_a1:
-		    func = fbCompositeSrcAdd_1000x1000;
-		    break;
-		}
-		break;
-	    }
-	}
-	else
-	{
-	    if ((pSrc->format_code == PICT_a8r8g8b8	||
-		 pSrc->format_code == PICT_a8b8g8r8) &&
-		srcRepeat			     &&
-		pMask->format_code == PICT_a8	     &&
-		pDst->format_code == PICT_a8)
-	    {
-#ifdef USE_MMX
-		if (fbHaveMMX())
-		{
-		    srcRepeat = FALSE;
-
-		    func = fbCompositeSrcAdd_8888x8x8mmx;
-		}
-		else
-#endif
-		    func = fbCompositeSrcAdd_8888x8x8;
-	    }
-	}
-	break;
-    case PIXMAN_OPERATOR_SRC:
-	if (pMask)
-	  {
-#ifdef USE_MMX
-	    if (srcRepeat &&
-		pSrc->pDrawable->width == 1 &&
-		pSrc->pDrawable->height == 1)
-	    {
-		if (pMask->format_code == PICT_a8)
-		{
-		    switch (pDst->format_code) {
-		    case PICT_a8r8g8b8:
-		    case PICT_x8r8g8b8:
-		    case PICT_a8b8g8r8:
-		    case PICT_x8b8g8r8:
-			if (fbHaveMMX())
-			    func = fbCompositeSolidMaskSrc_nx8x8888mmx;
-			break;
-		    }
-		}
-	    }
-#endif
-	  }
-	else
-	{
-	    if (pSrc->format_code == pDst->format_code)
-	    {
-#ifdef USE_MMX
-		if (pSrc->pDrawable != pDst->pDrawable &&
-                    (PICT_FORMAT_BPP (pSrc->format_code) == 16 ||
-                     PICT_FORMAT_BPP (pSrc->format_code) == 32))
-		    func = fbCompositeCopyAreammx;
-		else
-#endif
-		    func = fbCompositeSrcSrc_nxn;
-	    }
-	}
-	break;
-    case PIXMAN_OPERATOR_IN:
-#ifdef USE_MMX
-	if (pSrc->format_code == PICT_a8 &&
-	    pDst->format_code == PICT_a8 &&
-	    !pMask)
-	{
-	    if (fbHaveMMX())
-		func = fbCompositeIn_8x8mmx;
-	}
-	else if (srcRepeat && pMask && !pMask->componentAlpha &&
-		 (pSrc->format_code == PICT_a8r8g8b8 ||
-		  pSrc->format_code == PICT_a8b8g8r8)   &&
-		 (pMask->format_code == PICT_a8)	&&
-		 pDst->format_code == PICT_a8)
-	{
-	    if (fbHaveMMX())
-	    {
-		srcRepeat = FALSE;
-		func = fbCompositeIn_nx8x8mmx;
-	    }
-	}
-#else
-	func = NULL;
-#endif
-	break;
-    case PIXMAN_OPERATOR_CLEAR:
-    case PIXMAN_OPERATOR_DST:
-    case PIXMAN_OPERATOR_OVER_REVERSE:
-    case PIXMAN_OPERATOR_IN_REVERSE:
-    case PIXMAN_OPERATOR_OUT:
-    case PIXMAN_OPERATOR_OUT_REVERSE:
-    case PIXMAN_OPERATOR_ATOP:
-    case PIXMAN_OPERATOR_ATOP_REVERSE:
-    case PIXMAN_OPERATOR_XOR:
-    case PIXMAN_OPERATOR_SATURATE:
-    default:
-	/* For any operator not specifically handled above we default out to the general code. */
-	func = NULL;
-    }
-
-    if (!func) {
-        /* no fast path, use the general code */
-        pixman_compositeGeneral(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height);
-        return;
-    }
-
-    /* if we are transforming, we handle repeats in IcFetch[a]_transform */
-    if (srcTransform)
-	srcRepeat = 0;
-    if (maskTransform)
-	maskRepeat = 0;
-
-    pixman_region_init_rect (&region, xDst, yDst, width, height);
-
-    if (!FbComputeCompositeRegion (&region, pSrc, pMask, pDst, xSrc, ySrc,
-				   xMask, yMask, xDst, yDst, width, height))
-        goto CLEANUP_REGION;
-
-    n = pixman_region_num_rects (&region);
-    pbox = pixman_region_rects (&region);
-    while (n--)
-    {
-	h = pbox->y2 - pbox->y1;
-	y_src = pbox->y1 - yDst + ySrc;
-	y_msk = pbox->y1 - yDst + yMask;
-	y_dst = pbox->y1;
-	while (h)
-	{
-	    h_this = h;
-	    w = pbox->x2 - pbox->x1;
-	    x_src = pbox->x1 - xDst + xSrc;
-	    x_msk = pbox->x1 - xDst + xMask;
-	    x_dst = pbox->x1;
-	    if (maskRepeat)
-	    {
-		y_msk = mod (y_msk, pMask->pDrawable->height);
-		if (h_this > pMask->pDrawable->height - y_msk)
-		    h_this = pMask->pDrawable->height - y_msk;
-	    }
-	    if (srcRepeat)
-	    {
-		y_src = mod (y_src, pSrc->pDrawable->height);
-		if (h_this > pSrc->pDrawable->height - y_src)
-		    h_this = pSrc->pDrawable->height - y_src;
-	    }
-	    while (w)
-	    {
-		w_this = w;
-		if (maskRepeat)
-		{
-		    x_msk = mod (x_msk, pMask->pDrawable->width);
-		    if (w_this > pMask->pDrawable->width - x_msk)
-			w_this = pMask->pDrawable->width - x_msk;
-		}
-		if (srcRepeat)
-		{
-		    x_src = mod (x_src, pSrc->pDrawable->width);
-		    if (w_this > pSrc->pDrawable->width - x_src)
-			w_this = pSrc->pDrawable->width - x_src;
-		}
-		(*func) (op, pSrc, pMask, pDst,
-			 x_src, y_src, x_msk, y_msk, x_dst, y_dst,
-			 w_this, h_this);
-		w -= w_this;
-		x_src += w_this;
-		x_msk += w_this;
-		x_dst += w_this;
-	    }
-	    h -= h_this;
-	    y_src += h_this;
-	    y_msk += h_this;
-	    y_dst += h_this;
-	}
-	pbox++;
-    }
-
-CLEANUP_REGION:    
-    pixman_region_fini (&region);
-}
-
-/* The CPU detection code needs to be in a file not compiled with
- * "-mmmx -msse", as gcc would generate CMOV instructions otherwise
- * that would lead to SIGILL instructions on old CPUs that don't have
- * it.
- */
-#if defined(USE_MMX) && !defined(__amd64__) && !defined(__x86_64__)
-
-enum CPUFeatures {
-    NoFeatures = 0,
-    MMX = 0x1,
-    MMX_Extensions = 0x2,
-    SSE = 0x6,
-    SSE2 = 0x8,
-    CMOV = 0x10
-};
-
-static unsigned int detectCPUFeatures(void) {
-    unsigned int result, features;
-    char vendor[13];
-#ifdef _MSC_VER
-    int vendor0 = 0, vendor1, vendor2;
-#endif
-    vendor[0] = 0;
-    vendor[12] = 0;
-
-#ifdef __GNUC__
-    /* see p. 118 of amd64 instruction set manual Vol3 */
-    /* We need to be careful about the handling of %ebx and
-     * %esp here. We can't declare either one as clobbered
-     * since they are special registers (%ebx is the "PIC
-     * register" holding an offset to global data, %esp the
-     * stack pointer), so we need to make sure they have their
-     * original values when we access the output operands.
-     */
-    __asm__ ("pushf\n"
-             "pop %%eax\n"
-             "mov %%eax, %%ecx\n"
-             "xor $0x00200000, %%eax\n"
-             "push %%eax\n"
-             "popf\n"
-             "pushf\n"
-             "pop %%eax\n"
-             "mov $0x0, %%edx\n"
-             "xor %%ecx, %%eax\n"
-             "jz 1f\n"
-
-             "mov $0x00000000, %%eax\n"
-	     "push %%ebx\n"
-             "cpuid\n"
-             "mov %%ebx, %%eax\n"
-	     "pop %%ebx\n"
-             "mov %%eax, %1\n"
-             "mov %%edx, %2\n"
-             "mov %%ecx, %3\n"
-             "mov $0x00000001, %%eax\n"
-	     "push %%ebx\n"
-             "cpuid\n"
-	     "pop %%ebx\n"
-             "1:\n"
-             "mov %%edx, %0\n"
-             : "=r" (result),
-               "=m" (vendor[0]),
-               "=m" (vendor[4]),
-               "=m" (vendor[8])
-             :
-             : "%eax", "%ecx", "%edx"
-        );
-#elif defined (_MSC_VER)
-    _asm {
-      pushfd
-      pop eax
-      mov ecx, eax
-      xor eax, 00200000h
-      push eax
-      popfd
-      pushfd
-      pop eax
-      mov edx, 0
-      xor eax, ecx
-      jz nocpuid
-
-      mov eax, 0
-      push ebx
-      cpuid
-      mov eax, ebx
-      pop ebx
-      mov vendor0, eax
-      mov vendor1, edx
-      mov vendor2, ecx
-      mov eax, 1
-      push ebx
-      cpuid
-      pop ebx
-    nocpuid:
-      mov result, edx
-    }
-    memmove (vendor+0, &vendor0, 4);
-    memmove (vendor+4, &vendor1, 4);
-    memmove (vendor+8, &vendor2, 4);
-#else
-#error unsupported compiler
-#endif
-
-    features = 0;
-    if (result) {
-        /* result now contains the standard feature bits */
-        if (result & (1 << 15))
-            features |= CMOV;
-        if (result & (1 << 23))
-            features |= MMX;
-        if (result & (1 << 25))
-            features |= SSE;
-        if (result & (1 << 26))
-            features |= SSE2;
-        if ((features & MMX) && !(features & SSE) &&
-            (strcmp(vendor, "AuthenticAMD") == 0 ||
-             strcmp(vendor, "Geode by NSC") == 0)) {
-            /* check for AMD MMX extensions */
-#ifdef __GNUC__
-
-            unsigned int result;
-            __asm__("push %%ebx\n"
-                    "mov $0x80000000, %%eax\n"
-                    "cpuid\n"
-                    "xor %%edx, %%edx\n"
-                    "cmp $0x1, %%eax\n"
-                    "jge 1f\n"
-                    "mov $0x80000001, %%eax\n"
-                    "cpuid\n"
-                    "1:\n"
-                    "pop %%ebx\n"
-                    "mov %%edx, %0\n"
-                    : "=r" (result)
-                    :
-                    : "%eax", "%ecx", "%edx"
-                );
-#endif
-#ifdef _MSC_VER
-	    _asm {
-	      push ebx
-	      mov eax, 80000000h
-	      cpuid
-	      xor edx, edx
-	      cmp eax, 1
-	      jge notamd
-	      mov eax, 80000001h
-	      cpuid
-	    notamd:
-	      pop ebx
-	      mov result, edx
-	    }
-#endif
-            if (result & (1<<22))
-                features |= MMX_Extensions;
-        }
-    }
-    return features;
-}
-
-Bool
-fbHaveMMX (void)
-{
-    static Bool initialized = FALSE;
-    static Bool mmx_present;
-
-    if (!initialized)
-    {
-        unsigned int features = detectCPUFeatures();
-	mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
-        initialized = TRUE;
-    }
-
-    return mmx_present;
-}
-#endif /* USE_MMX && !amd64 */
-#endif /* RENDER */
diff --git a/pixman/src/fbpict.h b/pixman/src/fbpict.h
deleted file mode 100644
index 79bd9f5..0000000
--- a/pixman/src/fbpict.h
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- * Copyright © 2000 Keith Packard
- *             2005 Lars Knoll & Zack Rusin, Trolltech
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- * SOFTWARE.
- */
-
-#ifndef _FBPICT_H_
-#define _FBPICT_H_
-
-#include "pixman-xserver-compat.h"
-#include "renderedge.h"
-
-#define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) )
-#define FbIntDiv(a,b)	 (((CARD16) (a) * 255) / (b))
-
-#define FbGet8(v,i)   ((CARD16) (CARD8) ((v) >> i))
-
-/*
- * There are two ways of handling alpha -- either as a single unified value or
- * a separate value for each component, hence each macro must have two
- * versions.  The unified alpha version has a 'U' at the end of the name,
- * the component version has a 'C'.  Similarly, functions which deal with
- * this difference will have two versions using the same convention.
- */
-
-#define FbOverU(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),(a),(t)) + FbGet8(x,i),\
-			   (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
-
-#define FbOverC(x,y,i,a,t) ((t) = FbIntMult(FbGet8(y,i),FbGet8(a,i),(t)) + FbGet8(x,i),\
-			    (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
-
-#define FbInU(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),(a),(t)) << (i))
-
-#define FbInC(x,i,a,t) ((CARD32) FbIntMult(FbGet8(x,i),FbGet8(a,i),(t)) << (i))
-
-#define FbGen(x,y,i,ax,ay,t,u,v) ((t) = (FbIntMult(FbGet8(y,i),ay,(u)) + \
-					 FbIntMult(FbGet8(x,i),ax,(v))),\
-				  (CARD32) ((CARD8) ((t) | \
-						     (0 - ((t) >> 8)))) << (i))
-
-#define FbAdd(x,y,i,t)	((t) = FbGet8(x,i) + FbGet8(y,i), \
-			 (CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
-
-#define Alpha(x) ((x) >> 24)
-#define Red(x) (((x) >> 16) & 0xff)
-#define Green(x) (((x) >> 8) & 0xff)
-#define Blue(x) ((x) & 0xff)
-
-#define IsRGB(pict) ((pict)->image_format.red > (pict)->image_format.blue)
-
-#define fbComposeGetSolid(pict, dest, bits) { \
-    FbBits	*__bits__; \
-    FbStride	__stride__; \
-    int		__bpp__; \
-    int		__xoff__,__yoff__; \
-\
-    fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
-    switch (__bpp__) { \
-    case 32: \
-	(bits) = *(CARD32 *) __bits__; \
-	break; \
-    case 24: \
-	(bits) = Fetch24 ((CARD8 *) __bits__); \
-	break; \
-    case 16: \
-	(bits) = *(CARD16 *) __bits__; \
-	(bits) = cvt0565to0888(bits); \
-	break; \
-    case 8: \
-	(bits) = *(CARD8 *) __bits__; \
-	(bits) = (bits) << 24; \
-	break; \
-    case 1: \
-	(bits) = *(CARD32 *) __bits__; \
-	(bits) = FbLeftStipBits((bits),1) ? 0xff000000 : 0x00000000;\
-	break; \
-    default: \
-	return; \
-    } \
-    /* manage missing src alpha */ \
-    if ((pict)->image_format.alphaMask == 0) \
-	(bits) |= 0xff000000; \
-    /* Handle RGB/BGR mismatch */ \
-    if (dest && IsRGB(dest) != IsRGB(pict)) \
-        bits = (((bits & 0xff000000)) | \
-		((bits & 0x00ff0000) >> 16) | \
-		((bits & 0x0000ff00)) | \
-		((bits & 0x000000ff) << 16)); \
-}
-
-#define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\
-    FbBits	*__bits__; \
-    FbStride	__stride__; \
-    int		__bpp__; \
-    int		__xoff__,__yoff__; \
-\
-    fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \
-    (stride) = __stride__ * sizeof (FbBits) / sizeof (type); \
-    (line) = ((type *) __bits__) + (stride) * ((y) + __yoff__) + (mul) * ((x) + __xoff__); \
-}
-
-#define cvt8888to0565(s)    ((((s) >> 3) & 0x001f) | \
-			     (((s) >> 5) & 0x07e0) | \
-			     (((s) >> 8) & 0xf800))
-#define cvt0565to0888(s)    (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
-			     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
-			     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
-		     ((*((CARD16 *) (a)) << 8) | *((a)+2)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) ((v) >> 16)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
-		       (*((a)+2) = (CARD8) (v))))
-#else
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
-		     ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) (v)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) (v)),\
-		       (*((a)+2) = (CARD8) ((v) >> 16))))
-#endif
-
-/*
-  The methods below use some tricks to be able to do two color
-  components at the same time.
-*/
-
-/*
-  x_c = (x_c * a) / 255
-*/
-#define FbByteMul(x, a) do {                                      \
-        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
-        t &= 0xff00ff;                                            \
-                                                                  \
-        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;               \
-        x = (x + ((x >> 8) & 0xff00ff));                          \
-        x &= 0xff00ff00;                                          \
-        x += t;                                                   \
-    } while (0)
-
-/*
-  x_c = (x_c * a) / 255 + y
-*/
-#define FbByteMulAdd(x, a, y) do {                                \
-        CARD32 t = ((x & 0xff00ff) * a) + 0x800080;               \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                     \
-        t &= 0xff00ff;                                            \
-        t += y & 0xff00ff;                                        \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                   \
-        t &= 0xff00ff;                                            \
-                                                                  \
-        x = (((x >> 8) & 0xff00ff) * a) + 0x800080;                 \
-        x = (x + ((x >> 8) & 0xff00ff)) >> 8;                       \
-        x &= 0xff00ff;                                              \
-        x += (y >> 8) & 0xff00ff;                                   \
-        x |= 0x1000100 - ((t >> 8) & 0xff00ff);                     \
-        x &= 0xff00ff;                                              \
-        x <<= 8;                                                    \
-        x += t;                                                     \
-    } while (0)
-
-/*
-  x_c = (x_c * a + y_c * b) / 255
-*/
-#define FbByteAddMul(x, a, y, b) do {                                   \
-        CARD32 t;                                                       \
-        CARD32 r = (x >> 24) * a + (y >> 24) * b + 0x80;                \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        t = (x & 0xff00) * a + (y & 0xff00) * b + 0x8000;               \
-        t += (t >> 8);                                                  \
-        t >>= 16;                                                       \
-                                                                        \
-        t |= r << 16;                                                   \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        t &= 0xff00ff;                                                  \
-        t <<= 8;                                                        \
-                                                                        \
-        r = ((x >> 16) & 0xff) * a + ((y >> 16) & 0xff) * b + 0x80;     \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        x = (x & 0xff) * a + (y & 0xff) * b + 0x80;                     \
-        x += (x >> 8);                                                  \
-        x >>= 8;                                                        \
-        x |= r << 16;                                                   \
-        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
-        x &= 0xff00ff;                                                  \
-        x |= t;                                                         \
-} while (0)
-
-/*
-  x_c = (x_c * a + y_c *b) / 256
-*/
-#define FbByteAddMul_256(x, a, y, b) do {                               \
-        CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;             \
-        t >>= 8;                                                        \
-        t &= 0xff00ff;                                                  \
-                                                                        \
-        x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;      \
-        x &= 0xff00ff00;                                                \
-        x += t;                                                         \
-} while (0)
-/*
-  x_c = (x_c * a_c) / 255
-*/
-#define FbByteMulC(x, a) do {                                   \
-        CARD32 t;                                               \
-        CARD32 r = (x & 0xff) * (a & 0xff);                     \
-        r |= (x & 0xff0000) * ((a >> 16) & 0xff);               \
-        r += 0x800080;                                          \
-        r = (r + ((r >> 8) & 0xff00ff)) >> 8;                   \
-        r &= 0xff00ff;                                          \
-                                                                \
-        x >>= 8;                                                \
-        t = (x & 0xff) * ((a >> 8) & 0xff);                     \
-        t |= (x & 0xff0000) * (a >> 24);                        \
-        t += 0x800080;                                          \
-        t = t + ((t >> 8) & 0xff00ff);                          \
-        x = r | (t & 0xff00ff00);                               \
-                                                                \
-    } while (0)
-
-/*
-  x_c = (x_c * a) / 255 + y
-*/
-#define FbByteMulAddC(x, a, y) do {                                \
-        CARD32 t;                                                  \
-        CARD32 r = (x & 0xff) * (a & 0xff);                        \
-        r |= (x & 0xff0000) * ((a >> 16) & 0xff);                  \
-        r += 0x800080;                                             \
-        r = (r + ((r >> 8) & 0xff00ff)) >> 8;                      \
-        r &= 0xff00ff;                                             \
-        r += y & 0xff00ff;                                         \
-        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                    \
-        r &= 0xff00ff;                                             \
-                                                                   \
-        x >>= 8;                                                   \
-        t = (x & 0xff) * ((a >> 8) & 0xff);                        \
-        t |= (x & 0xff0000) * (a >> 24);                              \
-        t += 0x800080;                                                \
-        t = (t + ((t >> 8) & 0xff00ff)) >> 8;                         \
-        t &= 0xff00ff;                                                \
-        t += (y >> 8) & 0xff00ff;                                     \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                       \
-        t &= 0xff00ff;                                                \
-        x = r | (t << 8);                                             \
-    } while (0)
-
-/*
-  x_c = (x_c * a_c + y_c * b) / 255
-*/
-#define FbByteAddMulC(x, a, y, b) do {                                  \
-        CARD32 t;                                                       \
-        CARD32 r = (x >> 24) * (a >> 24) + (y >> 24) * b + 0x80;        \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        t = (x & 0xff00) * ((a >> 8) & 0xff) + (y & 0xff00) * b + 0x8000; \
-        t += (t >> 8);                                                  \
-        t >>= 16;                                                       \
-                                                                        \
-        t |= r << 16;                                                   \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        t &= 0xff00ff;                                                  \
-        t <<= 8;                                                        \
-                                                                        \
-        r = ((x >> 16) & 0xff) * ((a >> 16) & 0xff) + ((y >> 16) & 0xff) * b + 0x80; \
-        r += (r >> 8);                                                  \
-        r >>= 8;                                                        \
-                                                                        \
-        x = (x & 0xff) * (a & 0xff) + (y & 0xff) * b + 0x80;            \
-        x += (x >> 8);                                                  \
-        x >>= 8;                                                        \
-        x |= r << 16;                                                   \
-        x |= 0x1000100 - ((x >> 8) & 0xff00ff);                         \
-        x &= 0xff00ff;                                                  \
-        x |= t;                                                         \
-} while (0)
-
-/*
-  x_c = min(x_c + y_c, 255)
-*/
-#define FbByteAdd(x, y) do {                                            \
-        CARD32 t;                                                       \
-        CARD32 r = (x & 0xff00ff) + (y & 0xff00ff);                     \
-        r |= 0x1000100 - ((r >> 8) & 0xff00ff);                         \
-        r &= 0xff00ff;                                                  \
-                                                                        \
-        t = ((x >> 8) & 0xff00ff) + ((y >> 8) & 0xff00ff);              \
-        t |= 0x1000100 - ((t >> 8) & 0xff00ff);                         \
-        r |= (t & 0xff00ff) << 8;                                       \
-        x = r;                                                          \
-    } while (0)
-
-#define div_255(x) (((x) + 0x80 + (((x) + 0x80) >> 8)) >> 8)
-
-#if defined(__i386__) && defined(__GNUC__)
-#define FASTCALL __attribute__((regparm(3)))
-#else
-#define FASTCALL
-#endif
-
-typedef struct _FbComposeData {
-    CARD8	op;
-    PicturePtr	src;
-    PicturePtr	mask;
-    PicturePtr	dest;
-    INT16	xSrc;
-    INT16	ySrc;
-    INT16	xMask;
-    INT16	yMask;
-    INT16	xDest;
-    INT16	yDest;
-    CARD16	width;
-    CARD16	height;
-} FbComposeData;
-
-typedef FASTCALL void (*CombineMaskU) (CARD32 *src, const CARD32 *mask, int width);
-typedef FASTCALL void (*CombineFuncU) (CARD32 *dest, const CARD32 *src, int width);
-typedef FASTCALL void (*CombineFuncC) (CARD32 *dest, CARD32 *src, CARD32 *mask, int width);
-
-typedef struct _FbComposeFunctions {
-    CombineFuncU *combineU;
-    CombineFuncC *combineC;
-    CombineMaskU combineMaskU;
-} FbComposeFunctions;
-
-#endif /* _FBPICT_H_ */
diff --git a/pixman/src/fbtrap.c b/pixman/src/fbtrap.c
deleted file mode 100644
index 201c1f7..0000000
--- a/pixman/src/fbtrap.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-#ifdef RENDER
-
-/* XXX: Haven't added addTraps to libpixman yet. */
-#if 0
-void
-fbAddTraps (PicturePtr	pPicture,
-	    INT16	x_off,
-	    INT16	y_off,
-	    int		ntrap,
-	    xTrap	*traps)
-{
-    FbBits	*buf;
-    int		bpp;
-    int		width;
-    int		stride;
-    int		height;
-    int		pxoff, pyoff;
-
-    xFixed	x_off_fixed;
-    xFixed	y_off_fixed;
-    RenderEdge  l, r;
-    xFixed	t, b;
-
-    fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
-
-    width = pPicture->pDrawable->width;
-    height = pPicture->pDrawable->height;
-    x_off += pxoff;
-    y_off += pyoff;
-
-    x_off_fixed = IntToxFixed(y_off);
-    y_off_fixed = IntToxFixed(y_off);
-
-    while (ntrap--)
-    {
-	t = traps->top.y + y_off_fixed;
-	if (t < 0)
-	    t = 0;
-	t = RenderSampleCeilY (t, bpp);
-
-	b = traps->bot.y + y_off_fixed;
-	if (xFixedToInt (b) >= height)
-	    b = IntToxFixed (height) - 1;
-	b = RenderSampleFloorY (b, bpp);
-
-	if (b >= t)
-	{
-	    /* initialize edge walkers */
-	    RenderEdgeInit (&l, bpp, t,
-			    traps->top.l + x_off_fixed,
-			    traps->top.y + y_off_fixed,
-			    traps->bot.l + x_off_fixed,
-			    traps->bot.y + y_off_fixed);
-
-	    RenderEdgeInit (&r, bpp, t,
-			    traps->top.r + x_off_fixed,
-			    traps->top.y + y_off_fixed,
-			    traps->bot.r + x_off_fixed,
-			    traps->bot.y + y_off_fixed);
-
-	    fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
-	}
-	traps++;
-    }
-}
-#endif
-
-void
-fbRasterizeTrapezoid (PicturePtr    pPicture,
-		      const xTrapezoid  *trap,
-		      int	    x_off,
-		      int	    y_off)
-{
-    FbBits	*buf;
-    int		bpp;
-    int		width;
-    int		stride;
-    int		height;
-    int		pxoff, pyoff;
-
-    xFixed	x_off_fixed;
-    xFixed	y_off_fixed;
-    RenderEdge	l, r;
-    xFixed	t, b;
-
-    fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
-
-    width = pPicture->pDrawable->width;
-    height = pPicture->pDrawable->height;
-    x_off += pxoff;
-    y_off += pyoff;
-
-    x_off_fixed = IntToxFixed(x_off);
-    y_off_fixed = IntToxFixed(y_off);
-    t = trap->top + y_off_fixed;
-    if (t < 0)
-	t = 0;
-    t = RenderSampleCeilY (t, bpp);
-
-    b = trap->bottom + y_off_fixed;
-    if (xFixedToInt (b) >= height)
-	b = IntToxFixed (height) - 1;
-    b = RenderSampleFloorY (b, bpp);
-
-    if (b >= t)
-    {
-	/* initialize edge walkers */
-	RenderLineFixedEdgeInit (&l, bpp, t, &trap->left, x_off, y_off);
-	RenderLineFixedEdgeInit (&r, bpp, t, &trap->right, x_off, y_off);
-
-	fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
-    }
-}
-
-/* XXX: Haven't add addTriangles to libpixman yet. */
-#if 0
-static int
-_GreaterY (xPointFixed *a, xPointFixed *b)
-{
-    if (a->y == b->y)
-	return a->x > b->x;
-    return a->y > b->y;
-}
-
-/*
- * Note that the definition of this function is a bit odd because
- * of the X coordinate space (y increasing downwards).
- */
-static int
-_Clockwise (xPointFixed *ref, xPointFixed *a, xPointFixed *b)
-{
-    xPointFixed	ad, bd;
-
-    ad.x = a->x - ref->x;
-    ad.y = a->y - ref->y;
-    bd.x = b->x - ref->x;
-    bd.y = b->y - ref->y;
-
-    return ((xFixed_32_32) bd.y * ad.x - (xFixed_32_32) ad.y * bd.x) < 0;
-}
-
-/* FIXME -- this could be made more efficient */
-void
-fbAddTriangles (PicturePtr  pPicture,
-		INT16	    x_off,
-		INT16	    y_off,
-		int	    ntri,
-		xTriangle   *tris)
-{
-    xPointFixed	    *top, *left, *right, *tmp;
-    xTrapezoid	    trap;
-
-    for (; ntri; ntri--, tris++)
-    {
-	top = &tris->p1;
-	left = &tris->p2;
-	right = &tris->p3;
-	if (_GreaterY (top, left)) {
-	    tmp = left; left = top; top = tmp;
-	}
-	if (_GreaterY (top, right)) {
-	    tmp = right; right = top; top = tmp;
-	}
-	if (_Clockwise (top, right, left)) {
-	    tmp = right; right = left; left = tmp;
-	}
-
-	/*
-	 * Two cases:
-	 *
-	 *          +               +
-	 *         / \             / \
-	 *        /   \           /   \
-	 *       /     +         +     \
-	 *      /    --           --    \
-	 *     /   --               --   \
-	 *    / ---                   --- \
-	 *   +--                         --+
-	 */
-
-	trap.top = top->y;
-	trap.left.p1 = *top;
-	trap.left.p2 = *left;
-	trap.right.p1 = *top;
-	trap.right.p2 = *right;
-	if (right->y < left->y)
-	    trap.bottom = right->y;
-	else
-	    trap.bottom = left->y;
-	fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
-	if (right->y < left->y)
-	{
-	    trap.top = right->y;
-	    trap.bottom = left->y;
-	    trap.right.p1 = *right;
-	    trap.right.p2 = *left;
-	}
-	else
-	{
-	    trap.top = left->y;
-	    trap.bottom = right->y;
-	    trap.left.p1 = *left;
-	    trap.left.p2 = *right;
-	}
-	fbRasterizeTrapezoid (pPicture, &trap, x_off, y_off);
-    }
-}
-#endif
-
-#endif /* RENDER */
diff --git a/pixman/src/icblt.c b/pixman/src/icblt.c
deleted file mode 100644
index 69d1945..0000000
--- a/pixman/src/icblt.c
+++ /dev/null
@@ -1,951 +0,0 @@
-/*
- * Id: $
- *
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-#define InitializeShifts(sx,dx,ls,rs) { \
-    if (sx != dx) { \
-	if (sx > dx) { \
-	    ls = sx - dx; \
-	    rs = FB_UNIT - ls; \
-	} else { \
-	    rs = dx - sx; \
-	    ls = FB_UNIT - rs; \
-	} \
-    } \
-}
-
-void
-fbBlt (FbBits   *srcLine,
-       FbStride	srcStride,
-       int	srcX,
-
-       FbBits   *dstLine,
-       FbStride dstStride,
-       int	dstX,
-
-       int	width,
-       int	height,
-
-       int	alu,
-       FbBits	pm,
-       int	bpp,
-
-       Bool	reverse,
-       Bool	upsidedown)
-{
-    FbBits  *src, *dst;
-    int	    leftShift, rightShift;
-    FbBits  startmask, endmask;
-    FbBits  bits, bits1;
-    int	    n, nmiddle;
-    Bool    destInvarient;
-    int	    startbyte, endbyte;
-    FbDeclareMergeRop ();
-
-    /* are we just copying multiples of 8 bits?  if so, run, forrest, run!
-       the memcpy()'s should be pluggable ala mplayer|xine - perhaps we can get
-       one of the above to give up their code for us.
-     */
-    if((pm==FB_ALLONES) && (alu==GXcopy) && !reverse && (srcX&7)==0 && (dstX&7)==0 && (width&7)==0)
-    {
-		CARD8 *isrc=(CARD8 *)srcLine;
-		CARD8 *idst=(CARD8 *)dstLine;
-		int sstride=srcStride*sizeof(FbBits);
-		int dstride=dstStride*sizeof(FbBits);
-		int j;
-		width>>=3;
-		isrc+=(srcX>>3);
-		idst+=(dstX>>3);
-		if(!upsidedown)
-			for(j=0;j<height;j++)
-				memcpy(idst+j*dstride, isrc+j*sstride, width);
-		else
-			for(j=(height-1);j>=0;j--)
-				memcpy(idst+j*dstride, isrc+j*sstride, width);
-
-		return;
-    }
-
-#ifdef FB_24BIT
-    if (bpp == 24 && !FbCheck24Pix (pm))
-    {
-	fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
-		 width, height, alu, pm, reverse, upsidedown);
-	return;
-    }
-#endif
-    FbInitializeMergeRop(alu, pm);
-    destInvarient = FbDestInvarientMergeRop();
-    if (upsidedown)
-    {
-	srcLine += (height - 1) * (srcStride);
-	dstLine += (height - 1) * (dstStride);
-	srcStride = -srcStride;
-	dstStride = -dstStride;
-    }
-    FbMaskBitsBytes (dstX, width, destInvarient, startmask, startbyte,
-		     nmiddle, endmask, endbyte);
-    if (reverse)
-    {
-	srcLine += ((srcX + width - 1) >> FB_SHIFT) + 1;
-	dstLine += ((dstX + width - 1) >> FB_SHIFT) + 1;
-	srcX = (srcX + width - 1) & FB_MASK;
-	dstX = (dstX + width - 1) & FB_MASK;
-    }
-    else
-    {
-	srcLine += srcX >> FB_SHIFT;
-	dstLine += dstX >> FB_SHIFT;
-	srcX &= FB_MASK;
-	dstX &= FB_MASK;
-    }
-    if (srcX == dstX)
-    {
-	while (height--)
-	{
-	    src = srcLine;
-	    srcLine += srcStride;
-	    dst = dstLine;
-	    dstLine += dstStride;
-	    if (reverse)
-	    {
-		if (endmask)
-		{
-		    bits = *--src;
-		    --dst;
-		    FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
-		}
-		n = nmiddle;
-		if (destInvarient)
-		{
-		    while (n--)
-			*--dst = FbDoDestInvarientMergeRop(*--src);
-		}
-		else
-		{
-		    while (n--)
-		    {
-			bits = *--src;
-			--dst;
-			*dst = FbDoMergeRop (bits, *dst);
-		    }
-		}
-		if (startmask)
-		{
-		    bits = *--src;
-		    --dst;
-		    FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
-		}
-	    }
-	    else
-	    {
-		if (startmask)
-		{
-		    bits = *src++;
-		    FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
-		    dst++;
-		}
-		n = nmiddle;
-		if (destInvarient)
-		{
-#if 0
-		    /*
-		     * This provides some speedup on screen->screen blts
-		     * over the PCI bus, usually about 10%.  But fb
-		     * isn't usually used for this operation...
-		     */
-		    if (_ca2 + 1 == 0 && _cx2 == 0)
-		    {
-			FbBits	t1, t2, t3, t4;
-			while (n >= 4)
-			{
-			    t1 = *src++;
-			    t2 = *src++;
-			    t3 = *src++;
-			    t4 = *src++;
-			    *dst++ = t1;
-			    *dst++ = t2;
-			    *dst++ = t3;
-			    *dst++ = t4;
-			    n -= 4;
-			}
-		    }
-#endif
-		    while (n--)
-			*dst++ = FbDoDestInvarientMergeRop(*src++);
-		}
-		else
-		{
-		    while (n--)
-		    {
-			bits = *src++;
-			*dst = FbDoMergeRop (bits, *dst);
-			dst++;
-		    }
-		}
-		if (endmask)
-		{
-		    bits = *src;
-		    FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
-		}
-	    }
-	}
-    }
-    else
-    {
-	if (srcX > dstX)
-	{
-	    leftShift = srcX - dstX;
-	    rightShift = FB_UNIT - leftShift;
-	}
-	else
-	{
-	    rightShift = dstX - srcX;
-	    leftShift = FB_UNIT - rightShift;
-	}
-	while (height--)
-	{
-	    src = srcLine;
-	    srcLine += srcStride;
-	    dst = dstLine;
-	    dstLine += dstStride;
-
-	    bits1 = 0;
-	    if (reverse)
-	    {
-		if (srcX < dstX)
-		    bits1 = *--src;
-		if (endmask)
-		{
-		    bits = FbScrRight(bits1, rightShift);
-		    if (FbScrRight(endmask, leftShift))
-		    {
-			bits1 = *--src;
-			bits |= FbScrLeft(bits1, leftShift);
-		    }
-		    --dst;
-		    FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
-		}
-		n = nmiddle;
-		if (destInvarient)
-		{
-		    while (n--)
-		    {
-			bits = FbScrRight(bits1, rightShift);
-			bits1 = *--src;
-			bits |= FbScrLeft(bits1, leftShift);
-			--dst;
-			*dst = FbDoDestInvarientMergeRop(bits);
-		    }
-		}
-		else
-		{
-		    while (n--)
-		    {
-			bits = FbScrRight(bits1, rightShift);
-			bits1 = *--src;
-			bits |= FbScrLeft(bits1, leftShift);
-			--dst;
-			*dst = FbDoMergeRop(bits, *dst);
-		    }
-		}
-		if (startmask)
-		{
-		    bits = FbScrRight(bits1, rightShift);
-		    if (FbScrRight(startmask, leftShift))
-		    {
-			bits1 = *--src;
-			bits |= FbScrLeft(bits1, leftShift);
-		    }
-		    --dst;
-		    FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
-		}
-	    }
-	    else
-	    {
-		if (srcX > dstX)
-		    bits1 = *src++;
-		if (startmask)
-		{
-		    bits = FbScrLeft(bits1, leftShift);
-		    bits1 = *src++;
-		    bits |= FbScrRight(bits1, rightShift);
-		    FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
-		    dst++;
-		}
-		n = nmiddle;
-		if (destInvarient)
-		{
-		    while (n--)
-		    {
-			bits = FbScrLeft(bits1, leftShift);
-			bits1 = *src++;
-			bits |= FbScrRight(bits1, rightShift);
-			*dst = FbDoDestInvarientMergeRop(bits);
-			dst++;
-		    }
-		}
-		else
-		{
-		    while (n--)
-		    {
-			bits = FbScrLeft(bits1, leftShift);
-			bits1 = *src++;
-			bits |= FbScrRight(bits1, rightShift);
-			*dst = FbDoMergeRop(bits, *dst);
-			dst++;
-		    }
-		}
-		if (endmask)
-		{
-		    bits = FbScrLeft(bits1, leftShift);
-		    if (FbScrLeft(endmask, rightShift))
-		    {
-			bits1 = *src;
-			bits |= FbScrRight(bits1, rightShift);
-		    }
-		    FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask);
-		}
-	    }
-	}
-    }
-}
-
-#ifdef FB_24BIT
-
-#undef DEBUG_BLT24
-#ifdef DEBUG_BLT24
-
-static unsigned long
-getPixel (char *src, int x)
-{
-    unsigned long   l;
-
-    l = 0;
-    memcpy (&l, src + x * 3, 3);
-    return l;
-}
-#endif
-
-static void
-fbBlt24Line (FbBits	    *src,
-	     int	    srcX,
-
-	     FbBits	    *dst,
-	     int	    dstX,
-
-	     int	    width,
-
-	     int	    alu,
-	     FbBits	    pm,
-
-	     Bool	    reverse)
-{
-#ifdef DEBUG_BLT24
-    char    *origDst = (char *) dst;
-    FbBits  *origLine = dst + ((dstX >> FB_SHIFT) - 1);
-    int	    origNlw = ((width + FB_MASK) >> FB_SHIFT) + 3;
-    int	    origX = dstX / 24;
-#endif
-
-    int	    leftShift, rightShift;
-    FbBits  startmask, endmask;
-    int	    n;
-
-    FbBits  bits, bits1;
-    FbBits  mask;
-
-    int	    rot;
-    FbDeclareMergeRop ();
-
-    FbInitializeMergeRop (alu, FB_ALLONES);
-    FbMaskBits(dstX, width, startmask, n, endmask);
-#ifdef DEBUG_BLT24
-    ErrorF ("dstX %d width %d reverse %d\n", dstX, width, reverse);
-#endif
-    if (reverse)
-    {
-	src += ((srcX + width - 1) >> FB_SHIFT) + 1;
-	dst += ((dstX + width - 1) >> FB_SHIFT) + 1;
-	rot = FbFirst24Rot (((dstX + width - 8) & FB_MASK));
-	rot = FbPrev24Rot(rot);
-#ifdef DEBUG_BLT24
-	ErrorF ("dstX + width - 8: %d rot: %d\n", (dstX + width - 8) & FB_MASK, rot);
-#endif
-	srcX = (srcX + width - 1) & FB_MASK;
-	dstX = (dstX + width - 1) & FB_MASK;
-    }
-    else
-    {
-	src += srcX >> FB_SHIFT;
-	dst += dstX >> FB_SHIFT;
-	srcX &= FB_MASK;
-	dstX &= FB_MASK;
-	rot = FbFirst24Rot (dstX);
-#ifdef DEBUG_BLT24
-	ErrorF ("dstX: %d rot: %d\n", dstX, rot);
-#endif
-    }
-    mask = FbRot24(pm,rot);
-#ifdef DEBUG_BLT24
-    ErrorF ("pm 0x%x mask 0x%x\n", pm, mask);
-#endif
-    if (srcX == dstX)
-    {
-	if (reverse)
-	{
-	    if (endmask)
-	    {
-		bits = *--src;
-		--dst;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
-		mask = FbPrev24Pix (mask);
-	    }
-	    while (n--)
-	    {
-		bits = *--src;
-		--dst;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask);
-		mask = FbPrev24Pix (mask);
-	    }
-	    if (startmask)
-	    {
-		bits = *--src;
-		--dst;
-		*dst = FbDoMaskMergeRop(bits, *dst, mask & startmask);
-	    }
-	}
-	else
-	{
-	    if (startmask)
-	    {
-		bits = *src++;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = *src++;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask);
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    if (endmask)
-	    {
-		bits = *src;
-		*dst = FbDoMaskMergeRop(bits, *dst, mask & endmask);
-	    }
-	}
-    }
-    else
-    {
-	if (srcX > dstX)
-	{
-	    leftShift = srcX - dstX;
-	    rightShift = FB_UNIT - leftShift;
-	}
-	else
-	{
-	    rightShift = dstX - srcX;
-	    leftShift = FB_UNIT - rightShift;
-	}
-
-	bits1 = 0;
-	if (reverse)
-	{
-	    if (srcX < dstX)
-		bits1 = *--src;
-	    if (endmask)
-	    {
-		bits = FbScrRight(bits1, rightShift);
-		if (FbScrRight(endmask, leftShift))
-		{
-		    bits1 = *--src;
-		    bits |= FbScrLeft(bits1, leftShift);
-		}
-		--dst;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
-		mask = FbPrev24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = FbScrRight(bits1, rightShift);
-		bits1 = *--src;
-		bits |= FbScrLeft(bits1, leftShift);
-		--dst;
-		*dst = FbDoMaskMergeRop(bits, *dst, mask);
-		mask = FbPrev24Pix(mask);
-	    }
-	    if (startmask)
-	    {
-		bits = FbScrRight(bits1, rightShift);
-		if (FbScrRight(startmask, leftShift))
-		{
-		    bits1 = *--src;
-		    bits |= FbScrLeft(bits1, leftShift);
-		}
-		--dst;
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
-	    }
-	}
-	else
-	{
-	    if (srcX > dstX)
-		bits1 = *src++;
-	    if (startmask)
-	    {
-		bits = FbScrLeft(bits1, leftShift);
-		bits1 = *src++;
-		bits |= FbScrRight(bits1, rightShift);
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    while (n--)
-	    {
-		bits = FbScrLeft(bits1, leftShift);
-		bits1 = *src++;
-		bits |= FbScrRight(bits1, rightShift);
-		*dst = FbDoMaskMergeRop(bits, *dst, mask);
-		dst++;
-		mask = FbNext24Pix(mask);
-	    }
-	    if (endmask)
-	    {
-		bits = FbScrLeft(bits1, leftShift);
-		if (FbScrLeft(endmask, rightShift))
-		{
-		    bits1 = *src;
-		    bits |= FbScrRight(bits1, rightShift);
-		}
-		*dst = FbDoMaskMergeRop (bits, *dst, mask & endmask);
-	    }
-	}
-    }
-#ifdef DEBUG_BLT24
-    {
-	int firstx, lastx, x;
-
-	firstx = origX;
-	if (firstx)
-	    firstx--;
-	lastx = origX + width/24 + 1;
-	for (x = firstx; x <= lastx; x++)
-	    ErrorF ("%06x ", getPixel (origDst, x));
-	ErrorF ("\n");
-	while (origNlw--)
-	    ErrorF ("%08x ", *origLine++);
-	ErrorF ("\n");
-    }
-#endif
-}
-
-void
-fbBlt24 (FbBits	    *srcLine,
-	 FbStride   srcStride,
-	 int	    srcX,
-
-	 FbBits	    *dstLine,
-	 FbStride   dstStride,
-	 int	    dstX,
-
-	 int	    width,
-	 int	    height,
-
-	 int	    alu,
-	 FbBits	    pm,
-
-	 Bool	    reverse,
-	 Bool	    upsidedown)
-{
-    if (upsidedown)
-    {
-	srcLine += (height-1) * srcStride;
-	dstLine += (height-1) * dstStride;
-	srcStride = -srcStride;
-	dstStride = -dstStride;
-    }
-    while (height--)
-    {
-	fbBlt24Line (srcLine, srcX, dstLine, dstX, width, alu, pm, reverse);
-	srcLine += srcStride;
-	dstLine += dstStride;
-    }
-#ifdef DEBUG_BLT24
-    ErrorF ("\n");
-#endif
-}
-#endif /* FB_24BIT */
-
-#if FB_SHIFT == FB_STIP_SHIFT + 1
-
-/*
- * Could be generalized to FB_SHIFT > FB_STIP_SHIFT + 1 by
- * creating an ring of values stepped through for each line
- */
-
-void
-fbBltOdd (FbBits    *srcLine,
-	  FbStride  srcStrideEven,
-	  FbStride  srcStrideOdd,
-	  int	    srcXEven,
-	  int	    srcXOdd,
-
-	  FbBits    *dstLine,
-	  FbStride  dstStrideEven,
-	  FbStride  dstStrideOdd,
-	  int	    dstXEven,
-	  int	    dstXOdd,
-
-	  int	    width,
-	  int	    height,
-
-	  int	    alu,
-	  FbBits    pm,
-	  int	    bpp)
-{
-    FbBits  *src;
-    int	    leftShiftEven, rightShiftEven;
-    FbBits  startmaskEven, endmaskEven;
-    int	    nmiddleEven;
-
-    FbBits  *dst;
-    int	    leftShiftOdd, rightShiftOdd;
-    FbBits  startmaskOdd, endmaskOdd;
-    int	    nmiddleOdd;
-
-    int	    leftShift, rightShift;
-    FbBits  startmask, endmask;
-    int	    nmiddle;
-
-    int	    srcX, dstX;
-
-    FbBits  bits, bits1;
-    int	    n;
-
-    Bool    destInvarient;
-    Bool    even;
-    FbDeclareMergeRop ();
-
-    FbInitializeMergeRop (alu, pm);
-    destInvarient = FbDestInvarientMergeRop();
-
-    srcLine += srcXEven >> FB_SHIFT;
-    dstLine += dstXEven >> FB_SHIFT;
-    srcXEven &= FB_MASK;
-    dstXEven &= FB_MASK;
-    srcXOdd &= FB_MASK;
-    dstXOdd &= FB_MASK;
-
-    FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven);
-    FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd);
-
-    even = TRUE;
-    InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven);
-    InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd);
-    while (height--)
-    {
-	src = srcLine;
-	dst = dstLine;
-	if (even)
-	{
-	    srcX = srcXEven;
-	    dstX = dstXEven;
-	    startmask = startmaskEven;
-	    endmask = endmaskEven;
-	    nmiddle = nmiddleEven;
-	    leftShift = leftShiftEven;
-	    rightShift = rightShiftEven;
-	    srcLine += srcStrideEven;
-	    dstLine += dstStrideEven;
-	    even = FALSE;
-	}
-	else
-	{
-	    srcX = srcXOdd;
-	    dstX = dstXOdd;
-	    startmask = startmaskOdd;
-	    endmask = endmaskOdd;
-	    nmiddle = nmiddleOdd;
-	    leftShift = leftShiftOdd;
-	    rightShift = rightShiftOdd;
-	    srcLine += srcStrideOdd;
-	    dstLine += dstStrideOdd;
-	    even = TRUE;
-	}
-	if (srcX == dstX)
-	{
-	    if (startmask)
-	    {
-		bits = *src++;
-		*dst = FbDoMaskMergeRop (bits, *dst, startmask);
-		dst++;
-	    }
-	    n = nmiddle;
-	    if (destInvarient)
-	    {
-		while (n--)
-		{
-		    bits = *src++;
-		    *dst = FbDoDestInvarientMergeRop(bits);
-		    dst++;
-		}
-	    }
-	    else
-	    {
-		while (n--)
-		{
-		    bits = *src++;
-		    *dst = FbDoMergeRop (bits, *dst);
-		    dst++;
-		}
-	    }
-	    if (endmask)
-	    {
-		bits = *src;
-		*dst = FbDoMaskMergeRop(bits, *dst, endmask);
-	    }
-	}
-	else
-	{
-	    bits = 0;
-	    if (srcX > dstX)
-		bits = *src++;
-	    if (startmask)
-	    {
-		bits1 = FbScrLeft(bits, leftShift);
-		bits = *src++;
-		bits1 |= FbScrRight(bits, rightShift);
-		*dst = FbDoMaskMergeRop (bits1, *dst, startmask);
-		dst++;
-	    }
-	    n = nmiddle;
-	    if (destInvarient)
-	    {
-		while (n--)
-		{
-		    bits1 = FbScrLeft(bits, leftShift);
-		    bits = *src++;
-		    bits1 |= FbScrRight(bits, rightShift);
-		    *dst = FbDoDestInvarientMergeRop(bits1);
-		    dst++;
-		}
-	    }
-	    else
-	    {
-		while (n--)
-		{
-		    bits1 = FbScrLeft(bits, leftShift);
-		    bits = *src++;
-		    bits1 |= FbScrRight(bits, rightShift);
-		    *dst = FbDoMergeRop(bits1, *dst);
-		    dst++;
-		}
-	    }
-	    if (endmask)
-	    {
-		bits1 = FbScrLeft(bits, leftShift);
-		if (FbScrLeft(endmask, rightShift))
-		{
-		    bits = *src;
-		    bits1 |= FbScrRight(bits, rightShift);
-		}
-		*dst = FbDoMaskMergeRop (bits1, *dst, endmask);
-	    }
-	}
-    }
-}
-
-#ifdef FB_24BIT
-void
-fbBltOdd24 (FbBits	*srcLine,
-	    FbStride	srcStrideEven,
-	    FbStride	srcStrideOdd,
-	    int		srcXEven,
-	    int		srcXOdd,
-
-	    FbBits	*dstLine,
-	    FbStride	dstStrideEven,
-	    FbStride	dstStrideOdd,
-	    int		dstXEven,
-	    int		dstXOdd,
-
-	    int		width,
-	    int		height,
-
-	    int		alu,
-	    FbBits	pm)
-{
-    Bool    even = TRUE;
-
-    while (height--)
-    {
-	if (even)
-	{
-	    fbBlt24Line (srcLine, srcXEven, dstLine, dstXEven,
-			 width, alu, pm, FALSE);
-	    srcLine += srcStrideEven;
-	    dstLine += dstStrideEven;
-	    even = FALSE;
-	}
-	else
-	{
-	    fbBlt24Line (srcLine, srcXOdd, dstLine, dstXOdd,
-			 width, alu, pm, FALSE);
-	    srcLine += srcStrideOdd;
-	    dstLine += dstStrideOdd;
-	    even = TRUE;
-	}
-    }
-#if 0
-    fprintf (stderr, "\n");
-#endif
-}
-#endif
-
-#endif
-
-#if FB_STIP_SHIFT != FB_SHIFT
-void
-fbSetBltOdd (FbStip	*stip,
-	     FbStride	stipStride,
-	     int	srcX,
-	     FbBits	**bits,
-	     FbStride	*strideEven,
-	     FbStride	*strideOdd,
-	     int	*srcXEven,
-	     int	*srcXOdd)
-{
-    int	    srcAdjust;
-    int	    strideAdjust;
-
-    /*
-     * bytes needed to align source
-     */
-    srcAdjust = (((int) stip) & (FB_MASK >> 3));
-    /*
-     * FbStip units needed to align stride
-     */
-    strideAdjust = stipStride & (FB_MASK >> FB_STIP_SHIFT);
-
-    *bits = (FbBits *) ((char *) stip - srcAdjust);
-    if (srcAdjust)
-    {
-	*strideEven = FbStipStrideToBitsStride (stipStride + 1);
-	*strideOdd = FbStipStrideToBitsStride (stipStride);
-
-	*srcXEven = srcX + (srcAdjust << 3);
-	*srcXOdd = srcX + (srcAdjust << 3) - (strideAdjust << FB_STIP_SHIFT);
-    }
-    else
-    {
-	*strideEven = FbStipStrideToBitsStride (stipStride);
-	*strideOdd = FbStipStrideToBitsStride (stipStride + 1);
-
-	*srcXEven = srcX;
-	*srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT);
-    }
-}
-#endif
-
-void
-fbBltStip (FbStip   *src,
-	   FbStride srcStride,	    /* in FbStip units, not FbBits units */
-	   int	    srcX,
-
-	   FbStip   *dst,
-	   FbStride dstStride,	    /* in FbStip units, not FbBits units */
-	   int	    dstX,
-
-	   int	    width,
-	   int	    height,
-
-	   int	    alu,
-	   FbBits   pm,
-	   int	    bpp)
-{
-#if FB_STIP_SHIFT != FB_SHIFT
-    if (FB_STIP_ODDSTRIDE(srcStride) || FB_STIP_ODDPTR(src) ||
-	FB_STIP_ODDSTRIDE(dstStride) || FB_STIP_ODDPTR(dst))
-    {
-	FbStride    srcStrideEven, srcStrideOdd;
-	FbStride    dstStrideEven, dstStrideOdd;
-	int	    srcXEven, srcXOdd;
-	int	    dstXEven, dstXOdd;
-	FbBits	    *s, *d;
-	int	    sx, dx;
-
-	src += srcX >> FB_STIP_SHIFT;
-	srcX &= FB_STIP_MASK;
-	dst += dstX >> FB_STIP_SHIFT;
-	dstX &= FB_STIP_MASK;
-
-	fbSetBltOdd (src, srcStride, srcX,
-		     &s,
-		     &srcStrideEven, &srcStrideOdd,
-		     &srcXEven, &srcXOdd);
-
-	fbSetBltOdd (dst, dstStride, dstX,
-		     &d,
-		     &dstStrideEven, &dstStrideOdd,
-		     &dstXEven, &dstXOdd);
-
-#ifdef FB_24BIT
-	if (bpp == 24 && !FbCheck24Pix (pm))
-	{
-	    fbBltOdd24  (s, srcStrideEven, srcStrideOdd,
-			 srcXEven, srcXOdd,
-
-			 d, dstStrideEven, dstStrideOdd,
-			 dstXEven, dstXOdd,
-
-			 width, height, alu, pm);
-	}
-	else
-#endif
-	{
-	    fbBltOdd (s, srcStrideEven, srcStrideOdd,
-		      srcXEven, srcXOdd,
-
-		      d, dstStrideEven, dstStrideOdd,
-		      dstXEven, dstXOdd,
-
-		      width, height, alu, pm, bpp);
-	}
-    }
-    else
-#endif
-    {
-	fbBlt ((FbBits *) src, FbStipStrideToBitsStride (srcStride),
-	       srcX,
-	       (FbBits *) dst, FbStipStrideToBitsStride (dstStride),
-	       dstX,
-	       width, height,
-	       alu, pm, bpp, FALSE, FALSE);
-    }
-}
diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c
deleted file mode 100644
index bdf42b6..0000000
--- a/pixman/src/icbltone.c
+++ /dev/null
@@ -1,743 +0,0 @@
-/*
- * Id: $
- *
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-/*
- *  Example: srcX = 13 dstX = 8	(FB unit 32 dstBpp 8)
- *
- *	**** **** **** **** **** **** **** ****
- *			^
- *	********  ********  ********  ********
- *		  ^
- *  leftShift = 12
- *  rightShift = 20
- *
- *  Example: srcX = 0 dstX = 8 (FB unit 32 dstBpp 8)
- *
- *	**** **** **** **** **** **** **** ****
- *	^
- *	********  ********  ********  ********
- *		  ^
- *
- *  leftShift = 24
- *  rightShift = 8
- */
-
-#define LoadBits {\
-    if (leftShift) { \
-	bitsRight = *src++; \
-	bits = (FbStipLeft (bitsLeft, leftShift) | \
-		FbStipRight(bitsRight, rightShift)); \
-	bitsLeft = bitsRight; \
-    } else \
-	bits = *src++; \
-}
-
-#ifndef FBNOPIXADDR
-
-#define LaneCases1(n,a)	    case n: (void)FbLaneCase(n,a); break
-#define LaneCases2(n,a)	    LaneCases1(n,a); LaneCases1(n+1,a)
-#define LaneCases4(n,a)	    LaneCases2(n,a); LaneCases2(n+2,a)
-#define LaneCases8(n,a)	    LaneCases4(n,a); LaneCases4(n+4,a)
-#define LaneCases16(n,a)    LaneCases8(n,a); LaneCases8(n+8,a)
-#define LaneCases32(n,a)    LaneCases16(n,a); LaneCases16(n+16,a)
-#define LaneCases64(n,a)    LaneCases32(n,a); LaneCases32(n+32,a)
-#define LaneCases128(n,a)   LaneCases64(n,a); LaneCases64(n+64,a)
-#define LaneCases256(n,a)   LaneCases128(n,a); LaneCases128(n+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a)	    LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a)	    LaneCases16(0,a)
-#endif
-
-#if FB_SHIFT == 6
-static uint8_t const fb8Lane[256] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
-22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
-60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
-79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
-98, 99, 100, 101, 102,103,104,105,106,107,108,109,110,111,112,113,114,115,
-116, 117, 118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,
-134, 135, 136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,
-152, 153, 154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,
-170, 171, 172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,
-188, 189, 190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,
-206, 207, 208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
-224, 225, 226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,
-242, 243, 244,245,246,247,248,249,250,251,252,253,254,255,
-};
-
-static uint8_t const fb16Lane[256] = {
-    0x00, 0x03, 0x0c, 0x0f,
-    0x30, 0x33, 0x3c, 0x3f,
-    0xc0, 0xc3, 0xcc, 0xcf,
-    0xf0, 0xf3, 0xfc, 0xff,
-};
-
-static uint8_t const fb32Lane[16] = {
-    0x00, 0x0f, 0xf0, 0xff,
-};
-#endif
-
-#if FB_SHIFT == 5
-static uint8_t const fb8Lane[16] = {
-    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
-};
-
-static uint8_t const fb16Lane[16] = {
-    0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-
-static uint8_t const fb32Lane[16] = {
-    0, 15,  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-};
-#endif
-
-static const uint8_t *
-fbLaneTable(int bpp)
-{
-    switch (bpp) {
-    case 8:
-	return fb8Lane;
-    case 16:
-	return fb16Lane;
-    case 32:
-	return fb32Lane;
-    }
-    return NULL;
-}
-#endif
-
-void
-fbBltOne (FbStip    *src,
-	  FbStride  srcStride,	    /* FbStip units per scanline */
-	  int	    srcX,	    /* bit position of source */
-	  FbBits    *dst,
-	  FbStride  dstStride,	    /* FbBits units per scanline */
-	  int	    dstX,	    /* bit position of dest */
-	  int	    dstBpp,	    /* bits per destination unit */
-
-	  int	    width,	    /* width in bits of destination */
-	  int	    height,	    /* height in scanlines */
-
-	  FbBits    fgand,	    /* rrop values */
-	  FbBits    fgxor,
-	  FbBits    bgand,
-	  FbBits    bgxor)
-{
-    const FbBits    *fbBits;
-    int		    pixelsPerDst;		/* dst pixels per FbBits */
-    int		    unitsPerSrc;		/* src patterns per FbStip */
-    int		    leftShift, rightShift;	/* align source with dest */
-    FbBits	    startmask, endmask;		/* dest scanline masks */
-    FbStip	    bits=0, bitsLeft, bitsRight;/* source bits */
-    FbStip	    left;
-    FbBits	    mask;
-    int		    nDst;			/* dest longwords (w.o. end) */
-    int		    w;
-    int		    n, nmiddle;
-    int		    dstS;			/* stipple-relative dst X coordinate */
-    Bool	    copy;			/* accelerate dest-invariant */
-    Bool	    transparent;		/* accelerate 0 nop */
-    int		    srcinc;			/* source units consumed */
-    Bool	    endNeedsLoad = FALSE;	/* need load for endmask */
-#ifndef FBNOPIXADDR
-    const CARD8	    *fbLane;
-#endif
-    int		    startbyte, endbyte;
-
-#ifdef FB_24BIT
-    if (dstBpp == 24)
-    {
-	fbBltOne24 (src, srcStride, srcX,
-		    dst, dstStride, dstX, dstBpp,
-		    width, height,
-		    fgand, fgxor, bgand, bgxor);
-	return;
-    }
-#endif
-
-    /*
-     * Number of destination units in FbBits == number of stipple pixels
-     * used each time
-     */
-    pixelsPerDst = FB_UNIT / dstBpp;
-
-    /*
-     * Number of source stipple patterns in FbStip
-     */
-    unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
-
-    copy = FALSE;
-    transparent = FALSE;
-    if (bgand == 0 && fgand == 0)
-	copy = TRUE;
-    else if (bgand == FB_ALLONES && bgxor == 0)
-	transparent = TRUE;
-
-    /*
-     * Adjust source and dest to nearest FbBits boundary
-     */
-    src += srcX >> FB_STIP_SHIFT;
-    dst += dstX >> FB_SHIFT;
-    srcX &= FB_STIP_MASK;
-    dstX &= FB_MASK;
-
-    FbMaskBitsBytes(dstX, width, copy,
-		    startmask, startbyte, nmiddle, endmask, endbyte);
-
-    /*
-     * Compute effective dest alignment requirement for
-     * source -- must align source to dest unit boundary
-     */
-    dstS = dstX / dstBpp;
-    /*
-     * Compute shift constants for effective alignement
-     */
-    if (srcX >= dstS)
-    {
-	leftShift = srcX - dstS;
-	rightShift = FB_STIP_UNIT - leftShift;
-    }
-    else
-    {
-	rightShift = dstS - srcX;
-	leftShift = FB_STIP_UNIT - rightShift;
-    }
-    /*
-     * Get pointer to stipple mask array for this depth
-     */
-    fbBits = NULL;	/* unused */
-    if (pixelsPerDst <= 8)
-	fbBits = fbStippleTable(pixelsPerDst);
-#ifndef FBNOPIXADDR
-    fbLane = NULL;
-    if (transparent && fgand == 0 && dstBpp >= 8)
-	fbLane = fbLaneTable(dstBpp);
-#endif
-
-    /*
-     * Compute total number of destination words written, but
-     * don't count endmask
-     */
-    nDst = nmiddle;
-    if (startmask)
-	nDst++;
-
-    dstStride -= nDst;
-
-    /*
-     * Compute total number of source words consumed
-     */
-
-    srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc;
-
-    if (srcX > dstS)
-	srcinc++;
-    if (endmask)
-    {
-	endNeedsLoad = nDst % unitsPerSrc == 0;
-	if (endNeedsLoad)
-	    srcinc++;
-    }
-
-    srcStride -= srcinc;
-
-    /*
-     * Copy rectangle
-     */
-    while (height--)
-    {
-	w = nDst;	    /* total units across scanline */
-	n = unitsPerSrc;    /* units avail in single stipple */
-	if (n > w)
-	    n = w;
-
-	bitsLeft = 0;
-	if (srcX > dstS)
-	    bitsLeft = *src++;
-	if (n)
-	{
-	    /*
-	     * Load first set of stipple bits
-	     */
-	    LoadBits;
-
-	    /*
-	     * Consume stipple bits for startmask
-	     */
-	    if (startmask)
-	    {
-#if FB_UNIT > 32
-		if (pixelsPerDst == 16)
-		    mask = FbStipple16Bits(FbLeftStipBits(bits,16));
-		else
-#endif
-		    mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-#ifndef FBNOPIXADDR
-		if (fbLane)
-		{
-		    fbTransparentSpan (dst, mask & startmask, fgxor, 1);
-		}
-		else
-#endif
-		{
-		    if (mask || !transparent)
-			FbDoLeftMaskByteStippleRRop (dst, mask,
-						     fgand, fgxor, bgand, bgxor,
-						     startbyte, startmask);
-		}
-		bits = FbStipLeft (bits, pixelsPerDst);
-		dst++;
-		n--;
-		w--;
-	    }
-	    /*
-	     * Consume stipple bits across scanline
-	     */
-	    for (;;)
-	    {
-		w -= n;
-		if (copy)
-		{
-		    while (n--)
-		    {
-#if FB_UNIT > 32
-			if (pixelsPerDst == 16)
-			    mask = FbStipple16Bits(FbLeftStipBits(bits,16));
-			else
-#endif
-			    mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-			*dst = FbOpaqueStipple (mask, fgxor, bgxor);
-			dst++;
-			bits = FbStipLeft(bits, pixelsPerDst);
-		    }
-		}
-		else
-		{
-#ifndef FBNOPIXADDR
-		    if (fbLane)
-		    {
-			while (bits && n)
-			{
-			    switch (fbLane[FbLeftStipBits(bits,pixelsPerDst)]) {
-				LaneCases((CARD8 *) dst);
-			    }
-			    bits = FbStipLeft(bits,pixelsPerDst);
-			    dst++;
-			    n--;
-			}
-			dst += n;
-		    }
-		    else
-#endif
-		    {
-			while (n--)
-			{
-			    left = FbLeftStipBits(bits,pixelsPerDst);
-			    if (left || !transparent)
-			    {
-				mask = fbBits[left];
-				*dst = FbStippleRRop (*dst, mask,
-						      fgand, fgxor, bgand, bgxor);
-			    }
-			    dst++;
-			    bits = FbStipLeft(bits, pixelsPerDst);
-			}
-		    }
-		}
-		if (!w)
-		    break;
-		/*
-		 * Load another set and reset number of available units
-		 */
-		LoadBits;
-		n = unitsPerSrc;
-		if (n > w)
-		    n = w;
-	    }
-	}
-	/*
-	 * Consume stipple bits for endmask
-	 */
-	if (endmask)
-	{
-	    if (endNeedsLoad)
-	    {
-		LoadBits;
-	    }
-#if FB_UNIT > 32
-	    if (pixelsPerDst == 16)
-		mask = FbStipple16Bits(FbLeftStipBits(bits,16));
-	    else
-#endif
-		mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-#ifndef FBNOPIXADDR
-	    if (fbLane)
-	    {
-		fbTransparentSpan (dst, mask & endmask, fgxor, 1);
-	    }
-	    else
-#endif
-	    {
-		if (mask || !transparent)
-		    FbDoRightMaskByteStippleRRop (dst, mask,
-						  fgand, fgxor, bgand, bgxor,
-						  endbyte, endmask);
-	    }
-	}
-	dst += dstStride;
-	src += srcStride;
-    }
-}
-
-#ifdef FB_24BIT
-
-/*
- * Crufty macros to initialize the mask array, most of this
- * is to avoid compile-time warnings about shift overflow
- */
-
-#if BITMAP_BIT_ORDER == MSBFirst
-#define Mask24Pos(x,r) ((x)*24-(r))
-#else
-#define Mask24Pos(x,r) ((x)*24-((r) ? 24 - (r) : 0))
-#endif
-
-#define Mask24Neg(x,r)	(Mask24Pos(x,r) < 0 ? -Mask24Pos(x,r) : 0)
-#define Mask24Check(x,r)    (Mask24Pos(x,r) < 0 ? 0 : \
-			     Mask24Pos(x,r) >= FB_UNIT ? 0 : Mask24Pos(x,r))
-
-#define Mask24(x,r) (Mask24Pos(x,r) < FB_UNIT ? \
-		     (Mask24Pos(x,r) < 0 ? \
-		      0xffffff >> Mask24Neg (x,r) : \
-		      0xffffff << Mask24Check(x,r)) : 0)
-
-#define SelMask24(b,n,r)	((((b) >> n) & 1) * Mask24(n,r))
-
-/*
- * Untested for MSBFirst or FB_UNIT == 32
- */
-
-#if FB_UNIT == 64
-#define C4_24(b,r) \
-    (SelMask24(b,0,r) | \
-     SelMask24(b,1,r) | \
-     SelMask24(b,2,r) | \
-     SelMask24(b,3,r))
-
-#define FbStip24New(rot)    (2 + (rot != 0))
-#define FbStip24Len	    4
-
-static const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
-    /* rotate 0 */
-    {
-	C4_24( 0, 0), C4_24( 1, 0), C4_24( 2, 0), C4_24( 3, 0),
-	C4_24( 4, 0), C4_24( 5, 0), C4_24( 6, 0), C4_24( 7, 0),
-	C4_24( 8, 0), C4_24( 9, 0), C4_24(10, 0), C4_24(11, 0),
-	C4_24(12, 0), C4_24(13, 0), C4_24(14, 0), C4_24(15, 0),
-    },
-    /* rotate 8 */
-    {
-	C4_24( 0, 8), C4_24( 1, 8), C4_24( 2, 8), C4_24( 3, 8),
-	C4_24( 4, 8), C4_24( 5, 8), C4_24( 6, 8), C4_24( 7, 8),
-	C4_24( 8, 8), C4_24( 9, 8), C4_24(10, 8), C4_24(11, 8),
-	C4_24(12, 8), C4_24(13, 8), C4_24(14, 8), C4_24(15, 8),
-    },
-    /* rotate 16 */
-    {
-	C4_24( 0,16), C4_24( 1,16), C4_24( 2,16), C4_24( 3,16),
-	C4_24( 4,16), C4_24( 5,16), C4_24( 6,16), C4_24( 7,16),
-	C4_24( 8,16), C4_24( 9,16), C4_24(10,16), C4_24(11,16),
-	C4_24(12,16), C4_24(13,16), C4_24(14,16), C4_24(15,16),
-    }
-};
-
-#endif
-
-#if FB_UNIT == 32
-#define C2_24(b,r)  \
-    (SelMask24(b,0,r) | \
-     SelMask24(b,1,r))
-
-#define FbStip24Len	    2
-#if BITMAP_BIT_ORDER == MSBFirst
-#define FbStip24New(rot)    (1 + (rot == 0))
-#else
-#define FbStip24New(rot)    (1 + (rot == 8))
-#endif
-
-static const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
-    /* rotate 0 */
-    {
-	C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0),
-    },
-    /* rotate 8 */
-    {
-	C2_24( 0, 8), C2_24 ( 1, 8), C2_24 ( 2, 8), C2_24 ( 3, 8),
-    },
-    /* rotate 16 */
-    {
-	C2_24( 0,16), C2_24 ( 1,16), C2_24 ( 2,16), C2_24 ( 3,16),
-    }
-};
-#endif
-
-#if BITMAP_BIT_ORDER == LSBFirst
-
-#define FbMergeStip24Bits(left, right, new) \
-	(FbStipLeft (left, new) | FbStipRight ((right), (FbStip24Len - (new))))
-
-#define FbMergePartStip24Bits(left, right, llen, rlen) \
-	(left | FbStipRight(right, llen))
-
-#else
-
-#define FbMergeStip24Bits(left, right, new) \
-	((FbStipLeft (left, new) & ((1 << FbStip24Len) - 1)) | right)
-
-#define FbMergePartStip24Bits(left, right, llen, rlen) \
-	(FbStipLeft(left, rlen) | right)
-
-#endif
-
-#define fbFirstStipBits(len,stip) {\
-    int	__len = (len); \
-    if (len <= remain) { \
-	stip = FbLeftStipBits(bits, len); \
-    } else { \
-	stip = FbLeftStipBits(bits, remain); \
-	bits = *src++; \
-	__len = (len) - remain; \
-	stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
-				     remain, __len); \
-	remain = FB_STIP_UNIT; \
-    } \
-    bits = FbStipLeft (bits, __len); \
-    remain -= __len; \
-}
-
-#define fbInitStipBits(offset,len,stip) {\
-    bits = FbStipLeft (*src++,offset); \
-    remain = FB_STIP_UNIT - offset; \
-    fbFirstStipBits(len,stip); \
-    stip = FbMergeStip24Bits (0, stip, len); \
-}
-
-#define fbNextStipBits(rot,stip) {\
-    int	    __new = FbStip24New(rot); \
-    FbStip  __right; \
-    fbFirstStipBits(__new, __right); \
-    stip = FbMergeStip24Bits (stip, __right, __new); \
-    rot = FbNext24Rot (rot); \
-}
-
-/*
- * Use deep mask tables that incorporate rotation, pull
- * a variable number of bits out of the stipple and
- * reuse the right bits as needed for the next write
- *
- * Yes, this is probably too much code, but most 24-bpp screens
- * have no acceleration so this code is used for stipples, copyplane
- * and text
- */
-void
-fbBltOne24 (FbStip	*srcLine,
-	    FbStride	srcStride,  /* FbStip units per scanline */
-	    int		srcX,	    /* bit position of source */
-	    FbBits	*dst,
-	    FbStride	dstStride,  /* FbBits units per scanline */
-	    int		dstX,	    /* bit position of dest */
-	    int		dstBpp,	    /* bits per destination unit */
-
-	    int		width,	    /* width in bits of destination */
-	    int		height,	    /* height in scanlines */
-
-	    FbBits	fgand,	    /* rrop values */
-	    FbBits	fgxor,
-	    FbBits	bgand,
-	    FbBits	bgxor)
-{
-    FbStip	*src;
-    FbBits	leftMask, rightMask, mask;
-    int		nlMiddle, nl;
-    FbStip	stip, bits;
-    int		remain;
-    int		dstS;
-    int		firstlen;
-    int		rot0, rot;
-    int		nDst;
-
-    srcLine += srcX >> FB_STIP_SHIFT;
-    dst += dstX >> FB_SHIFT;
-    srcX &= FB_STIP_MASK;
-    dstX &= FB_MASK;
-    rot0 = FbFirst24Rot (dstX);
-
-    FbMaskBits (dstX, width, leftMask, nlMiddle, rightMask);
-
-    dstS = (dstX + 23) / 24;
-    firstlen = FbStip24Len - dstS;
-
-    nDst = nlMiddle;
-    if (leftMask)
-	nDst++;
-    dstStride -= nDst;
-
-    /* opaque copy */
-    if (bgand == 0 && fgand == 0)
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX,firstlen, stip);
-	    if (leftMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		*dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask,
-							      FbRot24(fgxor, rot),
-							      FbRot24(bgxor, rot))
-					     & leftMask);
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		mask = fbStipple24Bits[rot>>3][stip];
-		*dst = FbOpaqueStipple (mask,
-					FbRot24(fgxor, rot),
-					FbRot24(bgxor, rot));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    if (rightMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		*dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask,
-							       FbRot24(fgxor, rot),
-							       FbRot24(bgxor, rot))
-					      & rightMask);
-	    }
-	    dst += dstStride;
-	    src += srcStride;
-	}
-    }
-    /* transparent copy */
-    else if (bgand == FB_ALLONES && bgxor == 0 && fgand == 0)
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX, firstlen, stip);
-	    if (leftMask)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
-		    *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
-		}
-		dst++;
-		fbNextStipBits (rot, stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot>>3][stip];
-		    *dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask);
-		}
-		dst++;
-		fbNextStipBits (rot, stip);
-	    }
-	    if (rightMask)
-	    {
-		if (stip)
-		{
-		    mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
-		    *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask);
-		}
-	    }
-	    dst += dstStride;
-	}
-    }
-    else
-    {
-	while (height--)
-	{
-	    rot = rot0;
-	    src = srcLine;
-	    srcLine += srcStride;
-	    fbInitStipBits (srcX, firstlen, stip);
-	    if (leftMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		*dst = FbStippleRRopMask (*dst, mask,
-					  FbRot24(fgand, rot),
-					  FbRot24(fgxor, rot),
-					  FbRot24(bgand, rot),
-					  FbRot24(bgxor, rot),
-					  leftMask);
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    nl = nlMiddle;
-	    while (nl--)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		*dst = FbStippleRRop (*dst, mask,
-				      FbRot24(fgand, rot),
-				      FbRot24(fgxor, rot),
-				      FbRot24(bgand, rot),
-				      FbRot24(bgxor, rot));
-		dst++;
-		fbNextStipBits(rot,stip);
-	    }
-	    if (rightMask)
-	    {
-		mask = fbStipple24Bits[rot >> 3][stip];
-		*dst = FbStippleRRopMask (*dst, mask,
-					  FbRot24(fgand, rot),
-					  FbRot24(fgxor, rot),
-					  FbRot24(bgand, rot),
-					  FbRot24(bgxor, rot),
-					  rightMask);
-	    }
-	    dst += dstStride;
-	}
-    }
-}
-#endif
diff --git a/pixman/src/iccolor.c b/pixman/src/iccolor.c
deleted file mode 100644
index df11fa9..0000000
--- a/pixman/src/iccolor.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#include "pixmanint.h"
-
-#ifdef ICINT_NEED_IC_ONES
-/* Fall back on HACKMEM 169.  */
-int
-_FbOnes (unsigned int mask)
-{
-    register int y;
-
-    y = (mask >> 1) &033333333333;
-    y = mask - y - ((y >>1) & 033333333333);
-    return (((y + (y >> 3)) & 030707070707) % 077);
-}
-#endif
-
-void
-pixman_color_to_pixel (const pixman_format_t	*format,
-		const pixman_color_t	*color,
-		pixman_bits_t		*pixel)
-{
-    uint32_t	    r, g, b, a;
-
-    r = color->red >> (16 - _FbOnes (format->redMask));
-    g = color->green >> (16 - _FbOnes (format->greenMask));
-    b = color->blue >> (16 - _FbOnes (format->blueMask));
-    a = color->alpha >> (16 - _FbOnes (format->alphaMask));
-    r = r << format->red;
-    g = g << format->green;
-    b = b << format->blue;
-    a = a << format->alpha;
-    *pixel = r|g|b|a;
-}
-
-static uint16_t
-FbFillColor (uint32_t pixel, int bits)
-{
-    while (bits < 16)
-    {
-	pixel |= pixel << bits;
-	bits <<= 1;
-    }
-    return (uint16_t) pixel;
-}
-
-void
-pixman_pixel_to_color (const pixman_format_t	*format,
-		const pixman_bits_t	pixel,
-		pixman_color_t		*color)
-{
-    uint32_t	    r, g, b, a;
-
-    r = (pixel >> format->red) & format->redMask;
-    g = (pixel >> format->green) & format->greenMask;
-    b = (pixel >> format->blue) & format->blueMask;
-    a = (pixel >> format->alpha) & format->alphaMask;
-    color->red = FbFillColor (r, _FbOnes (format->redMask));
-    color->green = FbFillColor (r, _FbOnes (format->greenMask));
-    color->blue = FbFillColor (r, _FbOnes (format->blueMask));
-    color->alpha = FbFillColor (r, _FbOnes (format->alphaMask));
-}
diff --git a/pixman/src/icformat.c b/pixman/src/icformat.c
deleted file mode 100644
index a7b2954..0000000
--- a/pixman/src/icformat.c
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#include "pixmanint.h"
-
-#define Mask(n)	((n) == 32 ? 0xffffffff : (unsigned) ((1 << (n))-1))
-
-int
-pixman_format_init (pixman_format_t *format, pixman_format_name_t name)
-{
-    switch (name) {
-    case PIXMAN_FORMAT_NAME_ARGB32:
-	pixman_format_init_masks (format, 32,
-				  0xff000000,
-				  0x00ff0000,
-				  0x0000ff00,
-				  0x000000ff);
-	break;
-
-    case PIXMAN_FORMAT_NAME_RGB24:
-	pixman_format_init_masks (format, 32,
-				  0x0,
-				  0xff0000,
-				  0x00ff00,
-				  0x0000ff);
-	break;
-
-    case PIXMAN_FORMAT_NAME_A8:
-	pixman_format_init_masks (format, 8,
-		                  0xff,
-				  0,
-				  0,
-				  0);
-	break;
-
-    case PIXMAN_FORMAT_NAME_A1:
-	pixman_format_init_masks (format, 1,
-	                          0x1,
-				  0,
-				  0,
-				  0);
-	break;
-
-    case PIXMAN_FORMAT_NAME_RGB16_565:
-	pixman_format_init_masks (format, 16,
-				  0x0,
-				  0xf800,
-				  0x07e0,
-				  0x001f);
-	break;
-
-    case PIXMAN_FORMAT_NAME_ABGR32:
-	pixman_format_init_masks (format, 32,
-				  0xff000000,
-				  0x000000ff,
-				  0x0000ff00,
-				  0x00ff0000);
-	break;
-
-    case PIXMAN_FORMAT_NAME_BGR24:
-	pixman_format_init_masks (format, 32,
-				  0x0,
-				  0x000000ff,
-				  0x0000ff00,
-				  0x00ff0000);
-	break;
-
-    default:
-	return 0;
-    }
-
-    return 1;
-}
-
-/* XXX: There's some nonsense going on here. The macros above help
-   pixman_format_create_masks to encode a format into an int, while
-   immediately afterwards pixman_format_init_code goes through the effort of
-   decoding it. This should all be disentagled, (it's probably
-   possible to just eliminate the encoding macros altogether). */
-void
-pixman_format_init_masks (pixman_format_t *format,
-	                    int bpp,
-			    int alpha_mask,
-			    int red_mask,
-			    int green_mask,
-			    int blue_mask)
-{
-    int type;
-    int format_code;
-
-    if (red_mask == 0 && green_mask == 0 && blue_mask == 0)
-	type = PICT_TYPE_A;
-    else if (red_mask > blue_mask)
-	type = PICT_TYPE_ARGB;
-    else
-	type = PICT_TYPE_ABGR;
-
-    format_code = PICT_FORMAT (bpp, type,
-			       _FbOnes (alpha_mask),
-			       _FbOnes (red_mask),
-			       _FbOnes (green_mask),
-			       _FbOnes (blue_mask));
-
-    pixman_format_init_code (format, format_code);
-}
-
-void
-pixman_format_init_code (pixman_format_t *format, int format_code)
-{
-    memset (format, 0, sizeof (pixman_format_t));
-
-/* XXX: What do we want to lodge in here?
-    format->id = FakeClientID (0);
-*/
-    format->format_code = format_code;
-
-    switch (PICT_FORMAT_TYPE(format_code)) {
-    case PICT_TYPE_ARGB:
-
-	format->alphaMask = Mask(PICT_FORMAT_A(format_code));
-	if (format->alphaMask)
-	    format->alpha = (PICT_FORMAT_R(format_code) +
-			     PICT_FORMAT_G(format_code) +
-			     PICT_FORMAT_B(format_code));
-
-	format->redMask = Mask(PICT_FORMAT_R(format_code));
-	format->red = (PICT_FORMAT_G(format_code) +
-		       PICT_FORMAT_B(format_code));
-
-	format->greenMask = Mask(PICT_FORMAT_G(format_code));
-	format->green = PICT_FORMAT_B(format_code);
-
-	format->blueMask = Mask(PICT_FORMAT_B(format_code));
-	format->blue = 0;
-	break;
-
-    case PICT_TYPE_ABGR:
-
-	format->alphaMask = Mask(PICT_FORMAT_A(format_code));
-	if (format->alphaMask)
-	    format->alpha = (PICT_FORMAT_B(format_code) +
-			     PICT_FORMAT_G(format_code) +
-			     PICT_FORMAT_R(format_code));
-
-	format->blueMask = Mask(PICT_FORMAT_B(format_code));
-	format->blue = (PICT_FORMAT_G(format_code) +
-			PICT_FORMAT_R(format_code));
-
-	format->greenMask = Mask(PICT_FORMAT_G(format_code));
-	format->green = PICT_FORMAT_R(format_code);
-
-	format->redMask = Mask(PICT_FORMAT_R(format_code));
-	format->red = 0;
-	break;
-
-    case PICT_TYPE_A:
-
-	format->alpha = 0;
-	format->alphaMask = Mask(PICT_FORMAT_A(format_code));
-
-	/* remaining fields already set to zero */
-	break;
-    }
-
-    format->depth = _FbOnes ((format->alphaMask << format->alpha) |
-			     (format->redMask << format->red) |
-			     (format->blueMask << format->blue) |
-			     (format->greenMask << format->green));
-}
-
-void
-pixman_format_get_masks (pixman_format_t *format,
-                         unsigned int *bpp,
-                         unsigned int *alpha_mask,
-                         unsigned int *red_mask,
-                         unsigned int *green_mask,
-                         unsigned int *blue_mask)
-{
-    *bpp = PICT_FORMAT_BPP (format->format_code);
-
-    if (format->alphaMask)
-	*alpha_mask = format->alphaMask << format->alpha;
-    else
-	*alpha_mask = 0;
-
-    if (format->redMask)
-	*red_mask = format->redMask << format->red;
-    else
-	*red_mask = 0;
-
-    if (format->greenMask)
-	*green_mask = format->greenMask << format->green;
-    else
-	*green_mask = 0;
-
-    if (format->blueMask)
-	*blue_mask = format->blueMask << format->blue;
-    else
-	*blue_mask = 0;
-}
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
deleted file mode 100644
index 61a84c5..0000000
--- a/pixman/src/icimage.c
+++ /dev/null
@@ -1,744 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-pixman_image_t *
-pixman_image_create (pixman_format_t	*format,
-	       int	width,
-	       int	height)
-{
-    pixman_image_t	*image;
-    FbPixels	*pixels;
-
-    pixels = FbPixelsCreate (width, height, format->depth);
-    if (pixels == NULL)
-	return NULL;
-
-    image = pixman_image_createForPixels (pixels, format);
-    if (image == NULL) {
-	FbPixelsDestroy (pixels);
-	return NULL;
-    }
-
-    image->owns_pixels = 1;
-
-    return image;
-}
-
-pixman_image_t *
-pixman_image_create_for_data (FbBits *data, pixman_format_t *format, int width, int height, int bpp, int stride)
-{
-    pixman_image_t	*image;
-    FbPixels	*pixels;
-
-    pixels = FbPixelsCreateForData (data, width, height, format->depth, bpp, stride);
-    if (pixels == NULL)
-	return NULL;
-
-    image = pixman_image_createForPixels (pixels, format);
-    if (image == NULL) {
-	FbPixelsDestroy (pixels);
-	return NULL;
-    }
-
-    image->owns_pixels = 1;
-
-    return image;
-}
-
-pixman_image_t *
-pixman_image_createForPixels (FbPixels	*pixels,
-			pixman_format_t	*format)
-{
-    pixman_image_t		*image;
-
-    image = malloc (sizeof (pixman_image_t));
-    if (!image)
-    {
-	return NULL;
-    }
-
-    image->pixels = pixels;
-    image->image_format = *format;
-    image->format_code = format->format_code;
-/* XXX: What's all this about?
-    if (pDrawable->type == DRAWABLE_PIXMAP)
-    {
-	++((PixmapPtr)pDrawable)->refcnt;
-	image->pNext = 0;
-    }
-    else
-    {
-	image->pNext = GetPictureWindow(((WindowPtr) pDrawable));
-	SetPictureWindow(((WindowPtr) pDrawable), image);
-    }
-*/
-
-    pixman_image_init (image);
-
-    return image;
-}
-
-static CARD32 xRenderColorToCard32(pixman_color_t c)
-{
-    return
-        (c.alpha >> 8 << 24) |
-        (c.red >> 8 << 16) |
-        (c.green & 0xff00) |
-        (c.blue >> 8);
-}
-
-static uint32_t premultiply(uint32_t x)
-{
-    uint32_t a = x >> 24;
-    uint32_t t = (x & 0xff00ff) * a + 0x800080;
-    t = (t + ((t >> 8) & 0xff00ff)) >> 8;
-    t &= 0xff00ff;
-
-    x = ((x >> 8) & 0xff) * a + 0x80;
-    x = (x + ((x >> 8) & 0xff));
-    x &= 0xff00;
-    x |= t | (a << 24);
-    return x;
-}
-
-static uint32_t INTERPOLATE_PIXEL_256(uint32_t x, uint32_t a, uint32_t y, uint32_t b)
-{
-    CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b;
-    t >>= 8;
-    t &= 0xff00ff;
-
-    x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b;
-    x &= 0xff00ff00;
-    x |= t;
-    return x;
-}
-
-uint32_t
-pixman_gradient_color (pixman_gradient_stop_t *stop1,
-		       pixman_gradient_stop_t *stop2,
-		       uint32_t		      x)
-{
-    uint32_t current_color, next_color;
-    int	     dist, idist;
-
-    current_color = xRenderColorToCard32 (stop1->color);
-    next_color    = xRenderColorToCard32 (stop2->color);
-
-    dist  = (int) (256 * (x - stop1->x) / (stop2->x - stop1->x));
-    idist = 256 - dist;
-
-    return premultiply (INTERPOLATE_PIXEL_256 (current_color, idist,
-					       next_color, dist));
-}
-
-static int
-_pixman_init_gradient (pixman_gradient_image_t	    *gradient,
-		       const pixman_gradient_stop_t *stops,
-		       int			    n_stops)
-{
-    pixman_fixed16_16_t dpos;
-    int			i;
-
-    if (n_stops <= 0)
-	return 1;
-
-    dpos = -1;
-    for (i = 0; i < n_stops; i++)
-    {
-	if (stops[i].x < dpos || stops[i].x > (1 << 16))
-	    return 1;
-
-	dpos = stops[i].x;
-    }
-
-    gradient->class	     = SourcePictClassUnknown;
-    gradient->stopRange	     = 0xffff;
-    gradient->colorTable     = NULL;
-    gradient->colorTableSize = 0;
-
-    return 0;
-}
-
-static pixman_image_t *
-_pixman_create_source_image (void)
-{
-    pixman_image_t *image;
-
-    image = (pixman_image_t *) malloc (sizeof (pixman_image_t));
-    if (image == NULL)
-	return NULL;
-    image->pDrawable   = NULL;
-    image->pixels      = NULL;
-    image->format_code = PICT_a8r8g8b8;
-
-    pixman_image_init (image);
-
-    return image;
-}
-
-pixman_image_t *
-pixman_image_create_linear_gradient (const pixman_linear_gradient_t *gradient,
-				     const pixman_gradient_stop_t   *stops,
-				     int			    n_stops)
-{
-    pixman_linear_gradient_image_t *linear;
-    pixman_image_t		   *image;
-
-    if (n_stops < 2)
-	return NULL;
-
-    image = _pixman_create_source_image ();
-    if (!image)
-	return NULL;
-
-    linear = malloc (sizeof (pixman_linear_gradient_image_t) +
-		     sizeof (pixman_gradient_stop_t) * n_stops);
-    if (!linear)
-    {
-	free (image);
-	return NULL;
-    }
-
-    linear->stops  = (pixman_gradient_stop_t *) (linear + 1);
-    linear->nstops = n_stops;
-
-    memcpy (linear->stops, stops, sizeof (pixman_gradient_stop_t) * n_stops);
-
-    linear->type = SourcePictTypeLinear;
-    linear->p1   = gradient->p1;
-    linear->p2   = gradient->p2;
-
-    image->pSourcePict = (pixman_source_image_t *) linear;
-
-    if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops))
-    {
-	free (linear);
-	free (image);
-	return NULL;
-    }
-
-    return image;
-}
-
-pixman_image_t *
-pixman_image_create_radial_gradient (const pixman_radial_gradient_t *gradient,
-				     const pixman_gradient_stop_t   *stops,
-				     int			    n_stops)
-{
-    pixman_radial_gradient_image_t *radial;
-    pixman_image_t		   *image;
-
-    if (n_stops < 2)
-	return NULL;
-
-    image = _pixman_create_source_image ();
-    if (!image)
-	return NULL;
-
-    radial = malloc (sizeof (pixman_radial_gradient_image_t) +
-		     sizeof (pixman_gradient_stop_t) * n_stops);
-    if (!radial)
-    {
-	free (image);
-	return NULL;
-    }
-
-    radial->stops  = (pixman_gradient_stop_t *) (radial + 1);
-    radial->nstops = n_stops;
-
-    memcpy (radial->stops, stops, sizeof (pixman_gradient_stop_t) * n_stops);
-
-    radial->type = SourcePictTypeRadial;
-    radial->c1 = gradient->c1;
-    radial->c2 = gradient->c2;
-    radial->cdx = xFixedToDouble (gradient->c2.x - gradient->c1.x);
-    radial->cdy = xFixedToDouble (gradient->c2.y - gradient->c1.y);
-    radial->dr = xFixedToDouble (gradient->c2.radius - gradient->c1.radius);
-    radial->A = (  radial->cdx * radial->cdx
-		 + radial->cdy * radial->cdy
-		 - radial->dr  * radial->dr);
-
-    image->pSourcePict = (pixman_source_image_t *) radial;
-
-    if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops))
-    {
-	free (radial);
-	free (image);
-	return NULL;
-    }
-
-    return image;
-}
-
-void
-pixman_image_init (pixman_image_t *image)
-{
-    image->refcnt = 1;
-    image->repeat = PIXMAN_REPEAT_NONE;
-    image->graphicsExposures = 0;
-    image->subWindowMode = ClipByChildren;
-    image->polyEdge = PolyEdgeSharp;
-    image->polyMode = PolyModePrecise;
-    /*
-     * In the server this was 0 because the composite clip list
-     * can be referenced from a window (and often is)
-     */
-    image->hasCompositeClip = 0;
-    image->hasSourceClip = 0;
-    image->clientClipType = CT_NONE;
-    image->componentAlpha = 0;
-    image->compositeClipSource = 0;
-
-    image->alphaMap = NULL;
-    image->alphaOrigin.x = 0;
-    image->alphaOrigin.y = 0;
-
-    image->clipOrigin.x = 0;
-    image->clipOrigin.y = 0;
-
-    image->dither = 0L;
-
-    image->stateChanges = (1 << (CPLastBit+1)) - 1;
-/* XXX: What to lodge here?
-    image->serialNumber = GC_CHANGE_SERIAL_BIT;
-*/
-
-    if (image->pixels) {
-	pixman_region_init_rect (&image->compositeClip,
-				 0, 0, image->pixels->width,
-				 image->pixels->height);
-	image->hasCompositeClip = 1;
-
-	pixman_region_init_rect (&image->sourceClip,
-				 0, 0, image->pixels->width,
-				 image->pixels->height);
-	image->hasSourceClip = 1;
-    }
-
-    image->transform = NULL;
-
-    image->filter = PIXMAN_FILTER_NEAREST;
-    image->filter_params = NULL;
-    image->filter_nparams = 0;
-
-    image->owns_pixels = 0;
-
-    image->pSourcePict = NULL;
-}
-
-void
-pixman_image_set_component_alpha (pixman_image_t	*image,
-				  int		component_alpha)
-{
-    if (image)
-	image->componentAlpha = component_alpha;
-}
-
-int
-pixman_image_set_transform (pixman_image_t		*image,
-		     pixman_transform_t	*transform)
-{
-    static const pixman_transform_t	identity = { {
-	{ xFixed1, 0x00000, 0x00000 },
-	{ 0x00000, xFixed1, 0x00000 },
-	{ 0x00000, 0x00000, xFixed1 },
-    } };
-
-    if (transform && memcmp (transform, &identity, sizeof (pixman_transform_t)) == 0)
-	transform = NULL;
-
-    if (transform)
-    {
-	if (!image->transform)
-	{
-	    image->transform = malloc (sizeof (pixman_transform_t));
-	    if (!image->transform)
-		return 1;
-	}
-	*image->transform = *transform;
-    }
-    else
-    {
-	if (image->transform)
-	{
-	    free (image->transform);
-	    image->transform = NULL;
-	}
-    }
-    return 0;
-}
-
-void
-pixman_image_set_repeat (pixman_image_t		*image,
-			 pixman_repeat_t	repeat)
-{
-    if (image)
-	image->repeat = repeat;
-}
-
-void
-pixman_image_set_filter (pixman_image_t	*image,
-		  pixman_filter_t	filter)
-{
-    if (image)
-	image->filter = filter;
-}
-
-int
-pixman_image_get_width (pixman_image_t	*image)
-{
-    if (image->pixels)
-	return image->pixels->width;
-
-    return 0;
-}
-
-int
-pixman_image_get_height (pixman_image_t	*image)
-{
-    if (image->pixels)
-	return image->pixels->height;
-
-    return 0;
-}
-
-int
-pixman_image_get_depth (pixman_image_t	*image)
-{
-    if (image->pixels)
-	return image->pixels->depth;
-
-    return 0;
-}
-
-int
-pixman_image_get_stride (pixman_image_t	*image)
-{
-    if (image->pixels)
-	return image->pixels->stride;
-
-    return 0;
-}
-
-pixman_format_t *
-pixman_image_get_format (pixman_image_t	*image)
-{
-    return &image->image_format;
-}
-
-FbBits *
-pixman_image_get_data (pixman_image_t	*image)
-{
-    if (image->pixels)
-	return image->pixels->data;
-
-    return NULL;
-}
-
-void
-pixman_image_destroy (pixman_image_t *image)
-{
-    pixman_image_destroyClip (image);
-
-    if (image->hasCompositeClip) {
-	pixman_region_fini (&image->compositeClip);
-	image->hasCompositeClip = 0;
-    }
-
-    if (image->hasSourceClip) {
-	pixman_region_fini (&image->sourceClip);
-	image->hasSourceClip = 0;
-    }
-
-    if (image->owns_pixels) {
-	FbPixelsDestroy (image->pixels);
-	image->pixels = NULL;
-    }
-
-    if (image->transform) {
-	free (image->transform);
-	image->transform = NULL;
-    }
-
-    if (image->pSourcePict) {
-	free (image->pSourcePict);
-	image->pSourcePict = NULL;
-    }
-
-    free (image);
-}
-
-void
-pixman_image_destroyClip (pixman_image_t *image)
-{
-    if (CT_NONE != image->clientClipType)
-	pixman_region_fini (&image->clientClip);
-
-    image->clientClipType = CT_NONE;
-}
-
-int
-pixman_image_set_clip_region (pixman_image_t	*image,
-			      pixman_region16_t	*region)
-{
-    pixman_image_destroyClip (image);
-
-    if (region) {
-        pixman_region_init (&image->clientClip);
-	if (pixman_region_copy (&image->clientClip, region) !=
-		PIXMAN_REGION_STATUS_SUCCESS) {
-	    pixman_region_fini (&image->clientClip);
-	    return 1;
-	}
-	image->clientClipType = CT_REGION;
-    }
-
-    image->stateChanges |= CPClipMask;
-    if (image->pSourcePict)
-	return 0;
-
-    if (image->hasCompositeClip)
-        pixman_region_fini (&image->compositeClip);
-
-    pixman_region_init_rect (&image->compositeClip, 0, 0,
-                             image->pixels->width,
-                             image->pixels->height);
-
-    image->hasCompositeClip = 1;
-
-    if (region) {
-	pixman_region_translate (&image->compositeClip,
-				 - image->clipOrigin.x,
-				 - image->clipOrigin.y);
-	if (pixman_region_intersect (&image->compositeClip,
-				 &image->compositeClip,
-				 region) != PIXMAN_REGION_STATUS_SUCCESS) {
-	    pixman_image_destroyClip (image);
-	    pixman_region_fini (&image->compositeClip);
-	    image->hasCompositeClip = 0;
-	    return 1;
-	}
-	pixman_region_translate (&image->compositeClip,
-				 image->clipOrigin.x,
-				 image->clipOrigin.y);
-    }
-
-    return 0;
-}
-
-#define BOUND(v)	(int16_t) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v))
-
-static inline int
-FbClipImageReg (pixman_region16_t	*region,
-		pixman_region16_t	*clip,
-		int		dx,
-		int		dy)
-{
-    int ret = 1;
-    if (pixman_region_num_rects (region) == 1 &&
-	pixman_region_num_rects (clip) == 1)
-    {
-	pixman_box16_t *pRbox = pixman_region_rects (region);
-	pixman_box16_t *pCbox = pixman_region_rects (clip);
-	int	v;
-
-	if (pRbox->x1 < (v = pCbox->x1 + dx))
-	    pRbox->x1 = BOUND(v);
-	if (pRbox->x2 > (v = pCbox->x2 + dx))
-	    pRbox->x2 = BOUND(v);
-	if (pRbox->y1 < (v = pCbox->y1 + dy))
-	    pRbox->y1 = BOUND(v);
-	if (pRbox->y2 > (v = pCbox->y2 + dy))
-	    pRbox->y2 = BOUND(v);
-	if (pRbox->x1 >= pRbox->x2 ||
-	    pRbox->y1 >= pRbox->y2)
-	{
-	    pixman_region_empty (region);
-	}
-    }
-    else
-    {
-	pixman_region_status_t status;
-
-	pixman_region_translate (region, dx, dy);
-	status = pixman_region_intersect (region, clip, region);
-	ret = status == PIXMAN_REGION_STATUS_SUCCESS;
-	pixman_region_translate (region, -dx, -dy);
-    }
-    return ret;
-}
-
-static inline int
-FbClipImageSrc (pixman_region16_t	*region,
-		pixman_image_t		*image,
-		int		dx,
-		int		dy)
-{
-    /* XXX what to do with clipping from transformed pictures? */
-    if (image->transform)
-	return 1;
-
-    /* XXX davidr hates this, wants to never use source-based clipping */
-    if (image->repeat != PIXMAN_REPEAT_NONE || image->pSourcePict) {
-	int ret = 1;
-	/* XXX no source clipping */
-	if (image->compositeClipSource &&
-	    image->clientClipType != CT_NONE) {
-	    pixman_region_status_t status;
-
-	    pixman_region_translate (region,
-			   dx - image->clipOrigin.x,
-			   dy - image->clipOrigin.y);
-	    status = pixman_region_intersect (region,
-		                              &image->clientClip,
-					      region);
-	    ret = status == PIXMAN_REGION_STATUS_SUCCESS;
-	    pixman_region_translate (region,
-			   - (dx - image->clipOrigin.x),
-			   - (dy - image->clipOrigin.y));
-	}
-
-	return ret;
-    } else {
-	pixman_region16_t *clip;
-
-	if (image->compositeClipSource) {
-	    clip = (image->hasCompositeClip ? &image->compositeClip : NULL);
-	} else {
-	    clip = (image->hasSourceClip ? &image->sourceClip : NULL);
-        }
-
-	return FbClipImageReg (region, clip, dx, dy);
-    }
-
-    return 1;
-}
-
-int
-FbComputeCompositeRegion (pixman_region16_t	*region,
-			  pixman_image_t	*iSrc,
-			  pixman_image_t	*iMask,
-			  pixman_image_t	*iDst,
-			  int16_t		xSrc,
-			  int16_t		ySrc,
-			  int16_t		xMask,
-			  int16_t		yMask,
-			  int16_t		xDst,
-			  int16_t		yDst,
-			  uint16_t	width,
-			  uint16_t	height)
-{
-    int		v;
-    int x1, y1, x2, y2;
-
-    /* XXX: This code previously directly set the extents of the
-       region here. I need to decide whether removing that has broken
-       this. Also, it might be necessary to just make the pixman_region16_t
-       data structure transparent anyway in which case I can just put
-       the code back. */
-    x1 = xDst;
-    v = xDst + width;
-    x2 = BOUND(v);
-    y1 = yDst;
-    v = yDst + height;
-    y2 = BOUND(v);
-
-    /* Check for empty operation */
-    if (x1 >= x2 || y1 >= y2) {
-	pixman_region_empty (region);
-	return 1;
-    }
-
-    /* clip against src */
-    if (!FbClipImageSrc (region, iSrc, xDst - xSrc, yDst - ySrc))
-	return 0;
-
-    if (iSrc->alphaMap &&
-	!FbClipImageSrc (region, iSrc->alphaMap,
-                         xDst - (xSrc + iSrc->alphaOrigin.x),
-                         yDst - (ySrc + iSrc->alphaOrigin.y)))
-        return 0;
-
-    /* clip against mask */
-    if (iMask) {
-	if (!FbClipImageSrc (region, iMask, xDst - xMask, yDst - yMask))
-	    return 0;
-
-	if (iMask->alphaMap &&
-	    !FbClipImageSrc (region, iMask->alphaMap,
-                             xDst - (xMask + iMask->alphaOrigin.x),
-                             yDst - (yMask + iMask->alphaOrigin.y)))
-            return 0;
-    }
-
-    if (!FbClipImageReg (region,
-                         iDst->hasCompositeClip ?
-                         &iDst->compositeClip : NULL,
-                         0, 0))
-	return 0;
-
-    if (iDst->alphaMap &&
-        !FbClipImageReg (region,
-                         iDst->hasCompositeClip ?
-                         &iDst->alphaMap->compositeClip : NULL,
-                         -iDst->alphaOrigin.x, -iDst->alphaOrigin.y))
-        return 0;
-
-    return 1;
-}
-
-int
-miIsSolidAlpha (pixman_image_t *src)
-{
-    char	line[1];
-
-    /* Alpha-only */
-    if (PICT_FORMAT_TYPE (src->format_code) != PICT_TYPE_A)
-	return 0;
-    /* repeat */
-    if (!src->repeat)
-	return 0;
-    /* 1x1 */
-    if (src->pixels->width != 1 || src->pixels->height != 1)
-	return 0;
-    line[0] = 1;
-    /* XXX: For the next line, fb has:
-	(*pScreen->GetImage) (src->pixels, 0, 0, 1, 1, ZPixmap, ~0L, line);
-       Is the following simple assignment sufficient?
-    */
-    line[0] = src->pixels->data[0];
-    switch (src->pixels->bpp) {
-    case 1:
-	return (uint8_t) line[0] == 1 || (uint8_t) line[0] == 0x80;
-    case 4:
-	return (uint8_t) line[0] == 0xf || (uint8_t) line[0] == 0xf0;
-    case 8:
-	return (uint8_t) line[0] == 0xff;
-    default:
-	return 0;
-    }
-}
diff --git a/pixman/src/icimage.h b/pixman/src/icimage.h
deleted file mode 100644
index b983429..0000000
--- a/pixman/src/icimage.h
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright © 2000 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-/* XXX: This whole file should be moved up into incint.h (and cleaned
-   up considerably as well) */
-
-#ifndef _ICIMAGE_H_
-#define _ICIMAGE_H_
-
-/* #include "glyphstr.h" */
-/* #include "scrnintstr.h" */
-
-/* XXX: Hmmm... what's needed from here?
-#include "resource.h"
-*/
-
-/*
-typedef struct _IndexFormat {
-    VisualPtr	    pVisual;
-    ColormapPtr	    pColormap;
-    int		    nvalues;
-    xIndexValue	    *pValues;
-    void	    *devPrivate;
-} IndexFormatRec;
-*/
-
-/*
-typedef struct pixman_format {
-    uint32_t	    id;
-    uint32_t	    format;
-    unsigned char   type;
-    unsigned char   depth;
-    DirectFormatRec direct;
-    IndexFormatRec  index;
-} pixman_format_t;
-*/
-
-#define PICT_GRADIENT_STOPTABLE_SIZE 1024
-
-#define SourcePictTypeSolidFill 0
-#define SourcePictTypeLinear    1
-#define SourcePictTypeRadial    2
-#define SourcePictTypeConical   3
-
-#define SourcePictClassUnknown    0
-#define SourcePictClassHorizontal 1
-#define SourcePictClassVertical   2
-
-typedef struct _pixman_solid_fill_image {
-    unsigned int type;
-    unsigned int class;
-    uint32_t	 color;
-} pixman_solid_fill_image_t;
-
-typedef struct _pixman_gradient_image {
-    unsigned int	   type;
-    unsigned int	   class;
-    pixman_gradient_stop_t *stops;
-    int			   nstops;
-    int			   stopRange;
-    uint32_t		   *colorTable;
-    int			   colorTableSize;
-} pixman_gradient_image_t;
-
-typedef struct _pixman_linear_gradient_image {
-    unsigned int	   type;
-    unsigned int	   class;
-    pixman_gradient_stop_t *stops;
-    int			   nstops;
-    int			   stopRange;
-    uint32_t		   *colorTable;
-    int			   colorTableSize;
-    pixman_point_fixed_t   p1;
-    pixman_point_fixed_t   p2;
-} pixman_linear_gradient_image_t;
-
-typedef struct _pixman_radial_gradient_image {
-    unsigned int	   type;
-    unsigned int	   class;
-    pixman_gradient_stop_t *stops;
-    int			   nstops;
-    int			   stopRange;
-    uint32_t		   *colorTable;
-    int			   colorTableSize;
-    pixman_circle_t	   c1;
-    pixman_circle_t	   c2;
-    double		   cdx;
-    double		   cdy;
-    double		   dr;
-    double		   A;
-} pixman_radial_gradient_image_t;
-
-typedef struct _pixman_conical_gradient_image {
-    unsigned int	   type;
-    unsigned int	   class;
-    pixman_gradient_stop_t *stops;
-    int			   nstops;
-    int			   stopRange;
-    uint32_t		   *colorTable;
-    int			   colorTableSize;
-    pixman_point_fixed_t   center;
-    pixman_fixed16_16_t	   angle;
-} pixman_conical_gradient_image_t;
-
-typedef union _pixman_source_image {
-    unsigned int		    type;
-    pixman_solid_fill_image_t	    solidFill;
-    pixman_gradient_image_t	    gradient;
-    pixman_linear_gradient_image_t  linear;
-    pixman_radial_gradient_image_t  radial;
-    pixman_conical_gradient_image_t conical;
-} pixman_source_image_t;
-
-typedef pixman_source_image_t *SourcePictPtr;
-
-struct pixman_image {
-    FbPixels	    *pixels;
-    pixman_format_t	    image_format;
-    int		    format_code;
-    int		    refcnt;
-
-    unsigned int    repeat : 2;
-    unsigned int    graphicsExposures : 1;
-    unsigned int    subWindowMode : 1;
-    unsigned int    polyEdge : 1;
-    unsigned int    polyMode : 1;
-    unsigned int    hasCompositeClip : 1;
-    unsigned int    hasSourceClip : 1;
-    unsigned int    clientClipType : 2;
-    unsigned int    componentAlpha : 1;
-    unsigned int    compositeClipSource : 1;
-    unsigned int    unused : 20;
-
-    struct pixman_image *alphaMap;
-    FbPoint	    alphaOrigin;
-
-    FbPoint 	    clipOrigin;
-
-    unsigned long   dither;
-
-    unsigned long   stateChanges;
-    unsigned long   serialNumber;
-
-    pixman_region16_t       clientClip;
-    pixman_region16_t	    compositeClip;
-    pixman_region16_t	    sourceClip;
-
-    pixman_transform_t     *transform;
-
-    pixman_filter_t	    filter;
-    pixman_fixed16_16_t    *filter_params;
-    int		    filter_nparams;
-
-    int		    owns_pixels;
-
-    pixman_source_image_t *pSourcePict;
-};
-
-#endif /* _ICIMAGE_H_ */
-
-#ifndef _IC_MIPICT_H_
-#define _IC_MIPICT_H_
-
-#define IC_MAX_INDEXED	256 /* XXX depth must be <= 8 */
-
-#if IC_MAX_INDEXED <= 256
-typedef uint8_t FbIndexType;
-#endif
-
-/* XXX: We're not supporting indexed operations, right? */
-typedef struct _FbIndexed {
-    int	color;
-    uint32_t	rgba[IC_MAX_INDEXED];
-    FbIndexType	ent[32768];
-} FbIndexedRec, *FbIndexedPtr;
-
-#define FbCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \
-			     (((s) >> 6) & 0x03e0) | \
-			     (((s) >> 9) & 0x7c00))
-#define FbIndexToEnt15(icf,rgb15) ((icf)->ent[rgb15])
-#define FbIndexToEnt24(icf,rgb24) FbIndexToEnt15(icf,FbCvtR8G8B8to15(rgb24))
-
-#define FbIndexToEntY24(icf,rgb24) ((icf)->ent[CvtR8G8B8toY15(rgb24)])
-
-/*
-pixman_private int
-FbCreatePicture (PicturePtr pPicture);
-*/
-
-pixman_private void
-pixman_image_init (pixman_image_t *image);
-
-pixman_private void
-pixman_image_destroyClip (pixman_image_t *image);
-
-/*
-pixman_private void
-FbValidatePicture (PicturePtr pPicture,
-		   Mask       mask);
-*/
-
-/* XXX: What should this be?
-pixman_private int
-FbClipPicture (pixman_region16_t    *region,
-	       pixman_image_t	    *image,
-	       int16_t	    xReg,
-	       int16_t	    yReg,
-	       int16_t	    xPict,
-	       int16_t	    yPict);
-*/
-
-pixman_private int
-FbComputeCompositeRegion (pixman_region16_t	*region,
-			  pixman_image_t	*iSrc,
-			  pixman_image_t	*iMask,
-			  pixman_image_t	*iDst,
-			  int16_t		xSrc,
-			  int16_t		ySrc,
-			  int16_t		xMask,
-			  int16_t		yMask,
-			  int16_t		xDst,
-			  int16_t		yDst,
-			  uint16_t	width,
-			  uint16_t	height);
-
-pixman_private int
-miIsSolidAlpha (pixman_image_t *src);
-
-/*
-pixman_private int
-FbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats);
-*/
-
-/*
-pixman_private void
-FbGlyphs (pixman_operator_t	op,
-	  PicturePtr	pSrc,
-	  PicturePtr	pDst,
-	  PictFormatPtr	maskFormat,
-	  int16_t		xSrc,
-	  int16_t		ySrc,
-	  int		nlist,
-	  GlyphListPtr	list,
-	  GlyphPtr	*glyphs);
-*/
-
-/*
-pixman_private void
-pixman_compositeRects (pixman_operator_t	op,
-		  PicturePtr	pDst,
-		  xRenderColor  *color,
-		  int		nRect,
-		  xRectangle    *rects);
-*/
-
-pixman_private pixman_image_t *
-FbCreateAlphaPicture (pixman_image_t	*dst,
-		      pixman_format_t	*format,
-		      uint16_t	width,
-		      uint16_t	height);
-
-typedef void	(*CompositeFunc) (pixman_operator_t   op,
-				  pixman_image_t    *iSrc,
-				  pixman_image_t    *iMask,
-				  pixman_image_t    *iDst,
-				  int16_t      xSrc,
-				  int16_t      ySrc,
-				  int16_t      xMask,
-				  int16_t      yMask,
-				  int16_t      xDst,
-				  int16_t      yDst,
-				  uint16_t     width,
-				  uint16_t     height);
-
-typedef struct _FbCompositeOperand FbCompositeOperand;
-
-typedef uint32_t (*pixman_compositeFetch)(FbCompositeOperand *op);
-typedef void (*pixman_compositeStore) (FbCompositeOperand *op, uint32_t value);
-
-typedef void (*pixman_compositeStep) (FbCompositeOperand *op);
-typedef void (*pixman_compositeSet) (FbCompositeOperand *op, int x, int y);
-
-struct _FbCompositeOperand {
-    union {
-	struct {
-	    pixman_bits_t		*top_line;
-	    int			left_offset;
-
-	    int			start_offset;
-	    pixman_bits_t		*line;
-	    uint32_t		offset;
-	    FbStride		stride;
-	    int			bpp;
-	} drawable;
-	struct {
-	    int			alpha_dx;
-	    int			alpha_dy;
-	} external;
-	struct {
-	    int			top_y;
-	    int			left_x;
-	    int			start_x;
-	    int			x;
-	    int			y;
-	    pixman_transform_t		*transform;
-	    pixman_filter_t		filter;
-	    int                         repeat;
-	    int                         width;
-	    int                         height;
-	} transform;
-    } u;
-    pixman_compositeFetch	fetch;
-    pixman_compositeFetch	fetcha;
-    pixman_compositeStore	store;
-    pixman_compositeStep	over;
-    pixman_compositeStep	down;
-    pixman_compositeSet	set;
-/* XXX: We're not supporting indexed operations, right?
-    FbIndexedPtr	indexed;
-*/
-    pixman_region16_t		*dst_clip;
-    pixman_region16_t		*src_clip;
-};
-
-typedef void (*FbCombineFunc) (FbCompositeOperand	*src,
-			       FbCompositeOperand	*msk,
-			       FbCompositeOperand	*dst);
-
-typedef struct _FbAccessMap {
-    uint32_t		format_code;
-    pixman_compositeFetch	fetch;
-    pixman_compositeFetch	fetcha;
-    pixman_compositeStore	store;
-} FbAccessMap;
-
-/* iccompose.c */
-
-typedef struct _FbCompSrc {
-    uint32_t	value;
-    uint32_t	alpha;
-} FbCompSrc;
-
-pixman_private int
-fbBuildCompositeOperand (pixman_image_t	    *image,
-			 FbCompositeOperand op[4],
-			 int16_t		    x,
-			 int16_t		    y,
-			 int		    transform,
-			 int		    alpha);
-
-pixman_private void
-pixman_compositeGeneral (pixman_operator_t	op,
-			 pixman_image_t	*iSrc,
-			 pixman_image_t	*iMask,
-			 pixman_image_t	*iDst,
-			 int16_t	xSrc,
-			 int16_t	ySrc,
-			 int16_t	xMask,
-			 int16_t	yMask,
-			 int16_t	xDst,
-			 int16_t	yDst,
-			 uint16_t	width,
-			 uint16_t	height);
-
-#endif /* _IC_MIPICT_H_ */
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
deleted file mode 100644
index 97de1a6..0000000
--- a/pixman/src/icint.h
+++ /dev/null
@@ -1,1070 +0,0 @@
-/*
- * Copyright © 2003 Carl Worth
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Carl Worth not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Carl Worth makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * CARL WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL CARL WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _ICINT_H_
-#define _ICINT_H_
-
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include "pixman.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-#undef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#undef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
-/* C89 has implementation-defined behavior for % with negative operands.
-   C99 has well-defined behavior which is that / with integers rounds toward zero
-       and a%b is defined so that (a/b)*b + a%b == a.
-
-   The C99 version gives negative remainders rather than the modulus
-   in [0 .. b-1] that we want. This macro avoids using % with negative
-   operands to avoid both problems.
-
-   a and b are integers. b > 0.
-*/
-#define MOD(a, b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-(a) - 1) % (b) - 1)
-
-typedef struct _FbPoint {
-	int16_t    x,y ;
-} FbPoint;
-
-typedef unsigned int	Mask;
-
-#define GXcopy		0x3
-#define GXor		0x7
-#define ClipByChildren  0
-#define PolyEdgeSharp   0
-#define PolyModePrecise 0
-#define CPClipMask      (1 << 6)
-#define CPLastBit       11
-
-/* Define any names that the server code will be expecting in
- * terms of libpixman names. */
-
-typedef uint8_t			CARD8;
-typedef uint16_t		CARD16;
-typedef uint32_t		CARD32;
-typedef int16_t			INT16;
-
-typedef int			Bool;
-#define FALSE 0
-#define TRUE  1
-
-typedef pixman_bits_t		FbBits;
-typedef pixman_image_t*		PicturePtr;
-typedef pixman_box16_t		BoxRec;
-typedef pixman_box16_t*		BoxPtr;
-
-typedef pixman_point_fixed_t	xPointFixed;
-typedef pixman_line_fixed_t	xLineFixed;
-typedef pixman_trapezoid_t	xTrapezoid;
-typedef pixman_triangle_t	xTriangle;
-
-/* These few definitions avoid me needing to include servermd.h and misc.h from Xserver/include */
-#ifndef BITMAP_SCANLINE_PAD
-#define BITMAP_SCANLINE_PAD  32
-#define LOG2_BITMAP_PAD		5
-#define LOG2_BYTES_PER_SCANLINE_PAD	2
-#endif
-
-#define LSBFirst 0
-#define MSBFirst 1
-
-#ifdef WORDS_BIGENDIAN
-#  define IMAGE_BYTE_ORDER MSBFirst
-#  define BITMAP_BIT_ORDER MSBFirst
-#else
-#  define IMAGE_BYTE_ORDER LSBFirst
-#  define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#define MAXSHORT SHRT_MAX
-#define MINSHORT SHRT_MIN
-
-/* XXX: What do we need from here?
-#include "picture.h"
-*/
-
-#include "pixman.h"
-
-/* XXX: Most of this file is straight from fb.h and I imagine we can
-   drop quite a bit of it. Once the real ic code starts to come
-   together I can probably figure out what is not needed here. */
-
-#define FB_UNIT	    (1 << FB_SHIFT)
-#define FB_HALFUNIT (1 << (FB_SHIFT-1))
-#define FB_MASK	    (FB_UNIT - 1)
-#define FB_ALLONES  ((pixman_bits_t) -1)
-
-/* whether to bother to include 24bpp support */
-#ifndef ICNO24BIT
-#define FB_24BIT
-#endif
-
-/*
- * Unless otherwise instructed, ic includes code to advertise 24bpp
- * windows with 32bpp image format for application compatibility
- */
-
-#ifdef FB_24BIT
-#ifndef ICNO24_32
-#define FB_24_32BIT
-#endif
-#endif
-
-#define FB_STIP_SHIFT	LOG2_BITMAP_PAD
-#define FB_STIP_UNIT	(1 << FB_STIP_SHIFT)
-#define FB_STIP_MASK	(FB_STIP_UNIT - 1)
-#define FB_STIP_ALLONES	((FbStip) -1)
-
-#define FB_STIP_ODDSTRIDE(s)	(((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
-#define FB_STIP_ODDPTR(p)	((((long) (p)) & (FB_MASK >> 3)) != 0)
-
-#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
-#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
-
-#define FbFullMask(n)   ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-
-typedef uint32_t	    FbStip;
-typedef int		    FbStride;
-
-#ifdef FB_DEBUG
-extern void fbValidateDrawable(DrawablePtr d);
-extern void fbInitializeDrawable(DrawablePtr d);
-extern void fbSetBits (FbStip *bits, int stride, FbStip data);
-#define FB_HEAD_BITS   (FbStip) (0xbaadf00d)
-#define FB_TAIL_BITS   (FbStip) (0xbaddf0ad)
-#else
-#define fbValidateDrawable(d)
-#define fdInitializeDrawable(d)
-#endif
-
-#if BITMAP_BIT_ORDER == LSBFirst
-#define FbScrLeft(x,n)	((x) >> (n))
-#define FbScrRight(x,n)	((x) << (n))
-/* #define FbLeftBits(x,n)	((x) & ((((FbBits) 1) << (n)) - 1)) */
-#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
-#define FbStipMoveLsb(x,s,n)	(FbStipRight (x,(s)-(n)))
-#define FbPatternOffsetBits	0
-#else
-#define FbScrLeft(x,n)	((x) << (n))
-#define FbScrRight(x,n)	((x) >> (n))
-/* #define FbLeftBits(x,n)	((x) >> (FB_UNIT - (n))) */
-#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
-#define FbStipMoveLsb(x,s,n)	(x)
-#define FbPatternOffsetBits	(sizeof (FbBits) - 1)
-#endif
-
-#define FbStipLeft(x,n)	FbScrLeft(x,n)
-#define FbStipRight(x,n) FbScrRight(x,n)
-
-#define FbRotLeft(x,n)	FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
-#define FbRotRight(x,n)	FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
-
-#define FbRotStipLeft(x,n)  FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
-#define FbRotStipRight(x,n)  FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
-
-#define FbLeftMask(x)	    ( ((x) & FB_MASK) ? \
-			     FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
-#define FbRightMask(x)	    ( ((FB_UNIT - (x)) & FB_MASK) ? \
-			     FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
-
-#define FbLeftStipMask(x)   ( ((x) & FB_STIP_MASK) ? \
-			     FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
-#define FbRightStipMask(x)  ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
-			     FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
-
-#define FbBitsMask(x,w)	(FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
-			 FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
-
-#define FbStipMask(x,w)	(FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
-			 FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
-
-#define FbMaskBits(x,w,l,n,r) { \
-    n = (w); \
-    r = FbRightMask((x)+n); \
-    l = FbLeftMask(x); \
-    if (l) { \
-	n -= FB_UNIT - ((x) & FB_MASK); \
-	if (n < 0) { \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	} \
-    } \
-    n >>= FB_SHIFT; \
-}
-
-#ifdef ICNOPIXADDR
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
-    *dst = FbDoMaskRRop(*dst,and,xor,l); \
-}
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
-    *dst = FbDoMaskRRop(*dst,and,xor,r); \
-}
-#else
-
-#define FbByteMaskInvalid   0x10
-
-#define FbPatternOffset(o,t)  ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
-
-#define FbPtrOffset(p,o,t)		((t *) ((CARD8 *) (p) + (o)))
-#define FbSelectPatternPart(xor,o,t)	((xor) >> (FbPatternOffset (o,t) << 3))
-#define FbStorePart(dst,off,t,xor)	(*FbPtrOffset(dst,off,t) = \
-					 FbSelectPart(xor,off,t))
-#ifndef FbSelectPart
-#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
-#endif
-
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
-    n = (w); \
-    lb = 0; \
-    rb = 0; \
-    r = FbRightMask((x)+n); \
-    if (r) { \
-	/* compute right byte length */ \
-	if ((copy) && (((x) + n) & 7) == 0) { \
-	    rb = (((x) + n) & FB_MASK) >> 3; \
-	} else { \
-	    rb = FbByteMaskInvalid; \
-	} \
-    } \
-    l = FbLeftMask(x); \
-    if (l) { \
-	/* compute left byte length */ \
-	if ((copy) && ((x) & 7) == 0) { \
-	    lb = ((x) & FB_MASK) >> 3; \
-	} else { \
-	    lb = FbByteMaskInvalid; \
-	} \
-	/* subtract out the portion painted by leftMask */ \
-	n -= FB_UNIT - ((x) & FB_MASK); \
-	if (n < 0) { \
-	    if (lb != FbByteMaskInvalid) { \
-		if (rb == FbByteMaskInvalid) { \
-		    lb = FbByteMaskInvalid; \
-		} else if (rb) { \
-		    lb |= (rb - lb) << (FB_SHIFT - 3); \
-		    rb = 0; \
-		} \
-	    } \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	}\
-    } \
-    n >>= FB_SHIFT; \
-}
-
-#if FB_SHIFT == 6
-#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
-    case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 4): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break;
-
-#define FbDoRightMaskByteRRop6Cases(dst,xor) \
-    case 4: \
-	FbStorePart(dst,0,CARD32,xor); \
-	break; \
-    case 5: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD8,xor); \
-	break; \
-    case 6: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD16,xor); \
-	break; \
-    case 7: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD16,xor); \
-	FbStorePart(dst,6,CARD8,xor); \
-	break;
-#else
-#define FbDoLeftMaskByteRRop6Cases(dst,xor)
-#define FbDoRightMaskByteRRop6Cases(dst,xor)
-#endif
-
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
-    switch (lb) { \
-    FbDoLeftMaskByteRRop6Cases(dst,xor) \
-    case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case sizeof (FbBits) - 3: \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-    case sizeof (FbBits) - 2: \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
-	break; \
-    case sizeof (FbBits) - 1: \
-	FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
-	break; \
-    default: \
-	*dst = FbDoMaskRRop(*dst, and, xor, l); \
-	break; \
-    } \
-}
-
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
-    switch (rb) { \
-    case 1: \
-	FbStorePart(dst,0,CARD8,xor); \
-	break; \
-    case 2: \
-	FbStorePart(dst,0,CARD16,xor); \
-	break; \
-    case 3: \
-	FbStorePart(dst,0,CARD16,xor); \
-	FbStorePart(dst,2,CARD8,xor); \
-	break; \
-    FbDoRightMaskByteRRop6Cases(dst,xor) \
-    default: \
-	*dst = FbDoMaskRRop (*dst, and, xor, r); \
-    } \
-}
-#endif
-
-#define FbMaskStip(x,w,l,n,r) { \
-    n = (w); \
-    r = FbRightStipMask((x)+n); \
-    l = FbLeftStipMask(x); \
-    if (l) { \
-	n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
-	if (n < 0) { \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	} \
-    } \
-    n >>= FB_STIP_SHIFT; \
-}
-
-/*
- * These macros are used to transparently stipple
- * in copy mode; the expected usage is with 'n' constant
- * so all of the conditional parts collapse into a minimal
- * sequence of partial word writes
- *
- * 'n' is the bytemask of which bytes to store, 'a' is the address
- * of the FbBits base unit, 'o' is the offset within that unit
- *
- * The term "lane" comes from the hardware term "byte-lane" which
- */
-
-#define FbLaneCase1(n,a,o)  ((n) == 0x01 ? \
-			     (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
-			      fgxor) : 0)
-#define FbLaneCase2(n,a,o)  ((n) == 0x03 ? \
-			     (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
-			      fgxor) : \
-			     ((void)FbLaneCase1((n)&1,a,o), \
-				    FbLaneCase1((n)>>1,a,(o)+1)))
-#define FbLaneCase4(n,a,o)  ((n) == 0x0f ? \
-			     (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
-			      fgxor) : \
-			     ((void)FbLaneCase2((n)&3,a,o), \
-				    FbLaneCase2((n)>>2,a,(o)+2)))
-#define FbLaneCase8(n,a,o)  ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
-			     ((void)FbLaneCase4((n)&15,a,o), \
-				    FbLaneCase4((n)>>4,a,(o)+4)))
-
-#if FB_SHIFT == 6
-#define FbLaneCase(n,a)   FbLaneCase8(n,(CARD8 *) (a),0)
-#endif
-
-#if FB_SHIFT == 5
-#define FbLaneCase(n,a)   FbLaneCase4(n,(CARD8 *) (a),0)
-#endif
-
-/* Rotate a filled pixel value to the specified alignement */
-#define FbRot24(p,b)	    (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
-#define FbRot24Stip(p,b)    (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
-
-/* step a filled pixel value to the next/previous FB_UNIT alignment */
-#define FbNext24Pix(p)	(FbRot24(p,(24-FB_UNIT%24)))
-#define FbPrev24Pix(p)	(FbRot24(p,FB_UNIT%24))
-#define FbNext24Stip(p)	(FbRot24(p,(24-FB_STIP_UNIT%24)))
-#define FbPrev24Stip(p)	(FbRot24(p,FB_STIP_UNIT%24))
-
-/* step a rotation value to the next/previous rotation value */
-#if FB_UNIT == 64
-#define FbNext24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
-#define FbPrev24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x)		(((x) + 8) % 24)
-#else
-#define FbFirst24Rot(x)		((x) % 24)
-#endif
-
-#endif
-
-#if FB_UNIT == 32
-#define FbNext24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x)		(((x) + 16) % 24)
-#else
-#define FbFirst24Rot(x)		((x) % 24)
-#endif
-#endif
-
-#define FbNext24RotStip(r)        ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24RotStip(r)        ((r) == 16 ? 0 : (r) + 8)
-
-/* Whether 24-bit specific code is needed for this filled pixel value */
-#define FbCheck24Pix(p)	((p) == FbNext24Pix(p))
-
-#define FbGetPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff) { \
-    (pointer) = icpixels->data; \
-    (_stride_) = icpixels->stride / sizeof(pixman_bits_t); \
-    (_bpp_) = icpixels->bpp; \
-    (xoff) = icpixels->x; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
-    (yoff) = icpixels->y; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
-}
-
-#define FbGetStipPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff) { \
-    (pointer) = (FbStip *) icpixels->data; \
-    (_stride_) = icpixels->stride / sizeof(FbStip); \
-    (_bpp_) = icpixels->bpp; \
-    (xoff) = icpixels->x; \
-    (yoff) = icpixels->y; \
-}
-
-#ifdef FB_OLD_SCREEN
-#define BitsPerPixel(d) (\
-    ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
-    (PixmapWidthPaddingInfo[d].padRoundUp+1)))
-#endif
-
-#define FbPowerOfTwo(w)	    (((w) & ((w) - 1)) == 0)
-/*
- * Accelerated tiles are power of 2 width <= FB_UNIT
- */
-#define FbEvenTile(w)	    ((w) <= FB_UNIT && FbPowerOfTwo(w))
-/*
- * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
- * with dstBpp a power of 2 as well
- */
-#define FbEvenStip(w,bpp)   ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
-
-/*
- * icblt.c
- */
-pixman_private void
-fbBlt (pixman_bits_t   *src,
-       FbStride	srcStride,
-       int	srcX,
-
-       FbBits   *dst,
-       FbStride dstStride,
-       int	dstX,
-
-       int	width,
-       int	height,
-
-       int	alu,
-       FbBits	pm,
-       int	bpp,
-
-       Bool	reverse,
-       Bool	upsidedown);
-
-pixman_private void
-fbBlt24 (pixman_bits_t	    *srcLine,
-	 FbStride   srcStride,
-	 int	    srcX,
-
-	 FbBits	    *dstLine,
-	 FbStride   dstStride,
-	 int	    dstX,
-
-	 int	    width,
-	 int	    height,
-
-	 int	    alu,
-	 FbBits	    pm,
-
-	 Bool	    reverse,
-	 Bool	    upsidedown);
-
-pixman_private void
-fbBltStip (FbStip   *src,
-	   FbStride srcStride,	    /* in FbStip units, not FbBits units */
-	   int	    srcX,
-
-	   FbStip   *dst,
-	   FbStride dstStride,	    /* in FbStip units, not FbBits units */
-	   int	    dstX,
-
-	   int	    width,
-	   int	    height,
-
-	   int	    alu,
-	   FbBits   pm,
-	   int	    bpp);
-
-/*
- * icbltone.c
- */
-pixman_private void
-fbBltOne (FbStip   *src,
-	  FbStride srcStride,
-	  int	   srcX,
-	  FbBits   *dst,
-	  FbStride dstStride,
-	  int	   dstX,
-	  int	   dstBpp,
-
-	  int	   width,
-	  int	   height,
-
-	  FbBits   fgand,
-	  FbBits   fbxor,
-	  FbBits   bgand,
-	  FbBits   bgxor);
-
-#ifdef FB_24BIT
-pixman_private void
-fbBltOne24 (FbStip    *src,
-	  FbStride  srcStride,	    /* FbStip units per scanline */
-	  int	    srcX,	    /* bit position of source */
-	  FbBits    *dst,
-	  FbStride  dstStride,	    /* FbBits units per scanline */
-	  int	    dstX,	    /* bit position of dest */
-	  int	    dstBpp,	    /* bits per destination unit */
-
-	  int	    width,	    /* width in bits of destination */
-	  int	    height,	    /* height in scanlines */
-
-	  FbBits    fgand,	    /* rrop values */
-	  FbBits    fgxor,
-	  FbBits    bgand,
-	  FbBits    bgxor);
-#endif
-
-/*
- * icstipple.c
- */
-
-pixman_private void
-fbTransparentSpan (pixman_bits_t   *dst,
-		   pixman_bits_t   stip,
-		   pixman_bits_t   fgxor,
-		   int	    n);
-
-pixman_private void
-fbEvenStipple (pixman_bits_t   *dst,
-	       FbStride dstStride,
-	       int	dstX,
-	       int	dstBpp,
-
-	       int	width,
-	       int	height,
-
-	       FbStip   *stip,
-	       FbStride	stipStride,
-	       int	stipHeight,
-
-	       FbBits   fgand,
-	       FbBits   fgxor,
-	       FbBits   bgand,
-	       FbBits   bgxor,
-
-	       int	xRot,
-	       int	yRot);
-
-pixman_private void
-fbOddStipple (pixman_bits_t	*dst,
-	      FbStride	dstStride,
-	      int	dstX,
-	      int	dstBpp,
-
-	      int	width,
-	      int	height,
-
-	      FbStip	*stip,
-	      FbStride	stipStride,
-	      int	stipWidth,
-	      int	stipHeight,
-
-	      FbBits	fgand,
-	      FbBits	fgxor,
-	      FbBits	bgand,
-	      FbBits	bgxor,
-
-	      int	xRot,
-	      int	yRot);
-
-pixman_private void
-fbStipple (pixman_bits_t   *dst,
-	   FbStride dstStride,
-	   int	    dstX,
-	   int	    dstBpp,
-
-	   int	    width,
-	   int	    height,
-
-	   FbStip   *stip,
-	   FbStride stipStride,
-	   int	    stipWidth,
-	   int	    stipHeight,
-	   Bool	    even,
-
-	   FbBits   fgand,
-	   FbBits   fgxor,
-	   FbBits   bgand,
-	   FbBits   bgxor,
-
-	   int	    xRot,
-	   int	    yRot);
-
-typedef struct _FbPixels {
-    pixman_bits_t		*data;
-    unsigned int	width;
-    unsigned int	height;
-    unsigned int	depth;
-    unsigned int	bpp;
-    unsigned int	stride;
-    int			x;
-    int			y;
-    unsigned int	refcnt;
-} FbPixels;
-
-/* XXX: This is to avoid including colormap.h from the server includes */
-typedef uint32_t Pixel;
-
-/* icutil.c */
-pixman_private pixman_bits_t
-fbReplicatePixel (Pixel p, int bpp);
-
-/* fbtrap.c */
-
-pixman_private void
-fbRasterizeTrapezoid (pixman_image_t		*pMask,
-		      const pixman_trapezoid_t  *pTrap,
-		      int		x_off,
-		      int		y_off);
-
-/* XXX: This is to avoid including gc.h from the server includes */
-/* clientClipType field in GC */
-#define CT_NONE			0
-/* #define CT_PIXMAP		1 (not used anymore) */
-#define CT_REGION		2
-#define CT_UNSORTED		6
-#define CT_YSORTED		10
-#define CT_YXSORTED		14
-#define CT_YXBANDED		18
-
-#include "icimage.h"
-
-/* iccolor.c */
-
-/* GCC 3.4 supports a "population count" builtin, which on many targets is
-   implemented with a single instruction.  There is a fallback definition
-   in libgcc in case a target does not have one, which should be just as
-   good as the static function below.  */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-static inline int
-_FbOnes(unsigned int mask)
-{
-	return __builtin_popcount(mask);
-}
-#else
-# define ICINT_NEED_IC_ONES
-pixman_private int
-_FbOnes(unsigned int mask);
-#endif
-
-/* icformat.c */
-
-pixman_private void
-pixman_format_init_code (pixman_format_t *format, int format_code);
-
-/* icimage.c */
-
-pixman_private pixman_image_t *
-pixman_image_createForPixels (FbPixels	*pixels,
-			pixman_format_t	*format);
-
-pixman_private uint32_t
-pixman_gradient_color (pixman_gradient_stop_t *stop1,
-		       pixman_gradient_stop_t *stop2,
-		       uint32_t		      x);
-
-#define PictureGradientColor pixman_gradient_color
-
-/* icpixels.c */
-
-pixman_private FbPixels *
-FbPixelsCreate (int width, int height, int depth);
-
-pixman_private FbPixels *
-FbPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride);
-
-pixman_private void
-FbPixelsDestroy (FbPixels *pixels);
-
-/* ictransform.c */
-
-pixman_private int
-pixman_transform_point (pixman_transform_t	*transform,
-		  pixman_vector_t	*vector);
-
-#include "icrop.h"
-
-/* XXX: For now, I'm just wholesale pasting Xserver/render/picture.h here: */
-#ifndef _PICTURE_H_
-#define _PICTURE_H_
-
-typedef struct _DirectFormat	*DirectFormatPtr;
-typedef struct _PictFormat	*PictFormatPtr;
-
-/*
- * While the protocol is generous in format support, the
- * sample implementation allows only packed RGB and GBR
- * representations for data to simplify software rendering,
- */
-#define PICT_FORMAT(bpp,type,a,r,g,b)	(((bpp) << 24) |  \
-					 ((type) << 16) | \
-					 ((a) << 12) | \
-					 ((r) << 8) | \
-					 ((g) << 4) | \
-					 ((b)))
-
-/*
- * gray/color formats use a visual index instead of argb
- */
-#define PICT_VISFORMAT(bpp,type,vi)	(((bpp) << 24) |  \
-					 ((type) << 16) | \
-					 ((vi)))
-
-#define PICT_FORMAT_BPP(f)	(((f) >> 24)       )
-#define PICT_FORMAT_TYPE(f)	(((f) >> 16) & 0xff)
-#define PICT_FORMAT_A(f)	(((f) >> 12) & 0x0f)
-#define PICT_FORMAT_R(f)	(((f) >>  8) & 0x0f)
-#define PICT_FORMAT_G(f)	(((f) >>  4) & 0x0f)
-#define PICT_FORMAT_B(f)	(((f)      ) & 0x0f)
-#define PICT_FORMAT_RGB(f)	(((f)      ) & 0xfff)
-#define PICT_FORMAT_VIS(f)	(((f)      ) & 0xffff)
-
-#define PICT_TYPE_OTHER	0
-#define PICT_TYPE_A	1
-#define PICT_TYPE_ARGB	2
-#define PICT_TYPE_ABGR	3
-#define PICT_TYPE_COLOR	4
-#define PICT_TYPE_GRAY	5
-
-#define PICT_FORMAT_COLOR(f)	(PICT_FORMAT_TYPE(f) & 2)
-
-/* 32bpp formats */
-#define PICT_a8r8g8b8	PICT_FORMAT(32,PICT_TYPE_ARGB,8,8,8,8)
-#define PICT_x8r8g8b8	PICT_FORMAT(32,PICT_TYPE_ARGB,0,8,8,8)
-#define PICT_a8b8g8r8	PICT_FORMAT(32,PICT_TYPE_ABGR,8,8,8,8)
-#define PICT_x8b8g8r8	PICT_FORMAT(32,PICT_TYPE_ABGR,0,8,8,8)
-
-/* 24bpp formats */
-#define PICT_r8g8b8	PICT_FORMAT(24,PICT_TYPE_ARGB,0,8,8,8)
-#define PICT_b8g8r8	PICT_FORMAT(24,PICT_TYPE_ABGR,0,8,8,8)
-
-/* 16bpp formats */
-#define PICT_r5g6b5	PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,6,5)
-#define PICT_b5g6r5	PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,6,5)
-
-#define PICT_a1r5g5b5	PICT_FORMAT(16,PICT_TYPE_ARGB,1,5,5,5)
-#define PICT_x1r5g5b5	PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,5,5)
-#define PICT_a1b5g5r5	PICT_FORMAT(16,PICT_TYPE_ABGR,1,5,5,5)
-#define PICT_x1b5g5r5	PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,5,5)
-#define PICT_a4r4g4b4	PICT_FORMAT(16,PICT_TYPE_ARGB,4,4,4,4)
-#define PICT_x4r4g4b4	PICT_FORMAT(16,PICT_TYPE_ARGB,0,4,4,4)
-#define PICT_a4b4g4r4	PICT_FORMAT(16,PICT_TYPE_ABGR,4,4,4,4)
-#define PICT_x4b4g4r4	PICT_FORMAT(16,PICT_TYPE_ABGR,0,4,4,4)
-
-/* 8bpp formats */
-#define PICT_a8		PICT_FORMAT(8,PICT_TYPE_A,8,0,0,0)
-#define PICT_r3g3b2	PICT_FORMAT(8,PICT_TYPE_ARGB,0,3,3,2)
-#define PICT_b2g3r3	PICT_FORMAT(8,PICT_TYPE_ABGR,0,3,3,2)
-#define PICT_a2r2g2b2	PICT_FORMAT(8,PICT_TYPE_ARGB,2,2,2,2)
-#define PICT_a2b2g2r2	PICT_FORMAT(8,PICT_TYPE_ABGR,2,2,2,2)
-
-#define PICT_c8		PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
-#define PICT_g8		PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
-
-/* 4bpp formats */
-#define PICT_a4		PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
-#define PICT_r1g2b1	PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)
-#define PICT_b1g2r1	PICT_FORMAT(4,PICT_TYPE_ABGR,0,1,2,1)
-#define PICT_a1r1g1b1	PICT_FORMAT(4,PICT_TYPE_ARGB,1,1,1,1)
-#define PICT_a1b1g1r1	PICT_FORMAT(4,PICT_TYPE_ABGR,1,1,1,1)
-
-#define PICT_c4		PICT_FORMAT(4,PICT_TYPE_COLOR,0,0,0,0)
-#define PICT_g4		PICT_FORMAT(4,PICT_TYPE_GRAY,0,0,0,0)
-
-/* 1bpp formats */
-#define PICT_a1		PICT_FORMAT(1,PICT_TYPE_A,1,0,0,0)
-
-#define PICT_g1		PICT_FORMAT(1,PICT_TYPE_GRAY,0,0,0,0)
-
-/*
- * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
- * selection of colors allocated for drawing to Pictures.  The default
- * policy depends on the size of the colormap:
- *
- * Size		Default Policy
- * ----------------------------
- *  < 64	PolicyMono
- *  < 256	PolicyGray
- *  256		PolicyColor (only on PseudoColor)
- *
- * The actual allocation code lives in miindex.c, and so is
- * austensibly server dependent, but that code does:
- *
- * PolicyMono	    Allocate no additional colors, use black and white
- * PolicyGray	    Allocate 13 gray levels (11 cells used)
- * PolicyColor	    Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
- * PolicyAll	    Allocate as big a cube as possible, fill with gray (all)
- *
- * Here's a picture to help understand how many colors are
- * actually allocated (this is just the gray ramp):
- *
- *                 gray level
- * all   0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
- * b/w   0000                                                        ffff
- * 4x4x4                     5555                aaaa
- * extra      1555 2aaa 4000      6aaa 8000 9555      bfff d555 eaaa
- *
- * The default colormap supplies two gray levels (black/white), the
- * 4x4x4 cube allocates another two and nine more are allocated to fill
- * in the 13 levels.  When the 4x4x4 cube is not allocated, a total of
- * 11 cells are allocated.
- */
-
-#define PictureCmapPolicyInvalid    -1
-#define PictureCmapPolicyDefault    0
-#define PictureCmapPolicyMono	    1
-#define PictureCmapPolicyGray	    2
-#define PictureCmapPolicyColor	    3
-#define PictureCmapPolicyAll	    4
-
-extern pixman_private int PictureCmapPolicy;
-
-int	PictureParseCmapPolicy (const char *name);
-
-/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
-
-#ifdef WIN32
-typedef __int64		xFixed_32_32;
-#else
-#  if defined(__alpha__) || defined(__alpha) || \
-      defined(ia64) || defined(__ia64__) || \
-      defined(__sparc64__) || \
-      defined(__s390x__) || \
-      defined(x86_64) || defined (__x86_64__)
-typedef long		xFixed_32_32;
-# else
-#  if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || \
-     ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ > 7)))
-__extension__
-#  endif
-typedef long long int	xFixed_32_32;
-# endif
-#endif
-
-typedef xFixed_32_32		xFixed_48_16;
-typedef uint32_t		xFixed_1_31;
-typedef uint32_t		xFixed_1_16;
-typedef int32_t		xFixed_16_16;
-
-/*
- * An unadorned "xFixed" is the same as xFixed_16_16,
- * (since it's quite common in the code)
- */
-typedef	xFixed_16_16	xFixed;
-#define XFIXED_BITS	16
-
-#define xFixedToInt(f)	(int) ((f) >> XFIXED_BITS)
-#define IntToxFixed(i)	((xFixed) (i) << XFIXED_BITS)
-#define xFixedE		((xFixed) 1)
-#define xFixed1		(IntToxFixed(1))
-#define xFixedToDouble(f) (double) ((f) / (double) xFixed1)
-#define xFixed1MinusE	(xFixed1 - xFixedE)
-#define xFixedFrac(f)	((f) & xFixed1MinusE)
-#define xFixedFloor(f)	((f) & ~xFixed1MinusE)
-#define xFixedCeil(f)	xFixedFloor((f) + xFixed1MinusE)
-
-#define xFixedFraction(f)	((f) & xFixed1MinusE)
-#define xFixedMod2(f)		((f) & (xFixed1 | xFixed1MinusE))
-
-/* whether 't' is a well defined not obviously empty trapezoid */
-#define xTrapezoidValid(t)  ((t)->left.p1.y != (t)->left.p2.y && \
-			     (t)->right.p1.y != (t)->right.p2.y && \
-			     (int) ((t)->bottom - (t)->top) > 0)
-
-/*
- * Standard NTSC luminance conversions:
- *
- *  y = r * 0.299 + g * 0.587 + b * 0.114
- *
- * Approximate this for a bit more speed:
- *
- *  y = (r * 153 + g * 301 + b * 58) / 512
- *
- * This gives 17 bits of luminance; to get 15 bits, lop the low two
- */
-
-#define CvtR8G8B8toY15(s)	(((((s) >> 16) & 0xff) * 153 + \
-				  (((s) >>  8) & 0xff) * 301 + \
-				  (((s)      ) & 0xff) * 58) >> 2)
-
-#endif /* _PICTURE_H_ */
-
-/* Macros needed by fbpict.c */
-
-#define cvt8888to0565(s)    ((((s) >> 3) & 0x001f) | \
-			     (((s) >> 5) & 0x07e0) | \
-			     (((s) >> 8) & 0xf800))
-#define cvt0565to0888(s)    (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
-			     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
-			     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
-		     ((*((CARD16 *) (a)) << 8) | *((a)+2)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) ((v) >> 16)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
-		       (*((a)+2) = (CARD8) (v))))
-#else
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
-		     ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) (v)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) (v)),\
-		       (*((a)+2) = (CARD8) ((v) >> 16))))
-#endif
-
-#endif /* _ICINT_H_ */
diff --git a/pixman/src/icpixels.c b/pixman/src/icpixels.c
deleted file mode 100644
index 8975971..0000000
--- a/pixman/src/icpixels.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-static void
-FbPixelsInit (FbPixels *pixels, pixman_bits_t *buf, int width, int height, int depth, int bpp, int stride);
-
-static unsigned int
-pixman_bits_per_pixel (unsigned int depth);
-
-static unsigned int
-pixman_bits_per_pixel (unsigned int depth)
-{
-    if (depth > 8)
-	if (depth > 16)
-	    return 32;
-	else
-	    return 16;
-    else
-	if (depth > 4)
-	    return 8;
-	else if (depth > 1)
-	    return 4;
-	else
-	    return 1;
-}
-
-FbPixels *
-FbPixelsCreate (int width, int height, int depth)
-{
-    FbPixels		*pixels;
-    pixman_bits_t		*buf;
-    unsigned int	buf_size;
-    unsigned int	bpp;
-    unsigned int	stride;
-    unsigned int	adjust;
-    unsigned int	base;
-
-    bpp = pixman_bits_per_pixel (depth);
-    stride = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (pixman_bits_t);
-    buf_size = height * stride;
-    base = sizeof (FbPixels);
-    adjust = 0;
-    if (base & 7)
-	adjust = 8 - (base & 7);
-    buf_size += adjust;
-
-    pixels = calloc(base + buf_size, 1);
-    if (!pixels)
-	return NULL;
-
-    buf = (pixman_bits_t *) ((char *)pixels + base + adjust);
-
-    FbPixelsInit (pixels, buf, width, height, depth, bpp, stride);
-
-    return pixels;
-}
-
-FbPixels *
-FbPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride)
-{
-    FbPixels *pixels;
-
-    pixels = malloc (sizeof (FbPixels));
-    if (pixels == NULL)
-	return NULL;
-
-    FbPixelsInit (pixels, data, width, height, depth, bpp, stride);
-
-    return pixels;
-}
-
-static void
-FbPixelsInit (FbPixels *pixels, pixman_bits_t *buf, int width, int height, int depth, int bpp, int stride)
-{
-    pixels->data = buf;
-    pixels->width = width;
-    pixels->height = height;
-    pixels->depth = depth;
-    pixels->bpp = bpp;
-    pixels->stride = stride;
-    pixels->x = 0;
-    pixels->y = 0;
-    pixels->refcnt = 1;
-}
-
-void
-FbPixelsDestroy (FbPixels *pixels)
-{
-    if(--pixels->refcnt)
-	return;
-
-    free(pixels);
-}
diff --git a/pixman/src/icrect.c b/pixman/src/icrect.c
deleted file mode 100644
index 2ce5896..0000000
--- a/pixman/src/icrect.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright © 2000 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-typedef void	(*FillFunc) (pixman_image_t *dst,
-			     int16_t	     xDst,
-			     int16_t	     yDst,
-			     uint16_t	     width,
-			     uint16_t	     height,
-			     pixman_bits_t  *pixel);
-
-static void
-pixman_fill_rect_1bpp (pixman_image_t *dst,
-		       int16_t	       xDst,
-		       int16_t	       yDst,
-		       uint16_t	       width,
-		       uint16_t	       height,
-		       pixman_bits_t  *pixel)
-{
-    uint32_t value = *pixel ? 0xffffffff : 0;
-    char *line;
-
-    line = (char *)dst->pixels->data
-	   + yDst * dst->pixels->stride;
-
-    if ((width + xDst - 1) / 32 == xDst / 32) {
-        uint32_t mask = 0;
-        int pos = xDst / 32;
-        int i;
-
-        for (i = xDst; i < width; i++)
-#if BITMAP_BIT_ORDER == MSBFirst
-            mask |= 1 << (0x1f - i);
-#else
-            mask |= 1 << i;
-#endif
-
-        while (height-- > 0) {
-            uint32_t *cur = (uint32_t *) line;
-            cur [pos] = (cur [pos] & ~mask) | (value & mask);
-	    line += dst->pixels->stride;
-        }
-    } else {
-        uint32_t smask = 0, emask = 0;
-        int end = ((xDst + width) / 32);
-        int i;
-
-        if (xDst % 32)
-            for (i = (xDst % 32); i < 32; i++)
-#if BITMAP_BIT_ORDER == MSBFirst
-                smask |= 1 << (0x1f - i);
-#else
-                smask |= 1 << i;
-#endif
-
-        if ((width + xDst) % 32)
-            for (i = 0; i < (width + xDst) % 32; i++)
-#if BITMAP_BIT_ORDER == MSBFirst
-                emask |= 1 << (0x1f - i);
-#else
-                emask |= 1 << i;
-#endif
-
-        while (height-- > 0) {
-            uint32_t *cur = (uint32_t *) line;
-            int start = (xDst / 32);
-
-            if (smask) {
-                cur [start] = (cur [start] & ~smask) | (value & smask);
-                start++;
-            }
-
-            if (emask)
-                cur [end] = (cur [end] & ~emask) | (value & emask);
-
-            if (end > start)
-                memset (cur + start, value, (end - start) * 4);
-	    line += dst->pixels->stride;
-        }
-    }
-}
-
-static void
-pixman_fill_rect_8bpp (pixman_image_t *dst,
-		       int16_t	       xDst,
-		       int16_t	       yDst,
-		       uint16_t	       width,
-		       uint16_t	       height,
-		       pixman_bits_t  *pixel)
-{
-    int value = (int) (*pixel);
-    char *line;
-
-    line = (char *)dst->pixels->data +
-	xDst + yDst * dst->pixels->stride;
-    while (height-- > 0) {
-	memset (line, value, width);
-	line += dst->pixels->stride;
-    }
-}
-
-static void
-pixman_fill_rect_32bpp (pixman_image_t *dst,
-			int16_t	        xDst,
-			int16_t	        yDst,
-			uint16_t	width,
-			uint16_t	height,
-			pixman_bits_t  *pixel)
-{
-    uint32_t int_pixel;
-    char *line;
-    char *data;
-    int w;
-
-    line = (char *)dst->pixels->data +
-	xDst * 4 + yDst * dst->pixels->stride;
-
-    int_pixel = *(uint32_t *)pixel;
-    while (height-- > 0) {
-	data = line;
-	w = width;
-	while (w-- > 0) {
-	    *(uint32_t *)data = int_pixel;
-	    data += 4;
-	}
-	line += dst->pixels->stride;
-    }
-}
-
-static void
-pixman_fill_rect_general (pixman_image_t *dst,
-			  int16_t	  xDst,
-			  int16_t	  yDst,
-			  uint16_t	  width,
-			  uint16_t	  height,
-			  pixman_bits_t  *pixel)
-{
-    int pixel_size;
-    char *line;
-    char *data;
-    int w;
-
-    pixel_size = dst->pixels->bpp >> 3;
-
-    line = (char *)dst->pixels->data +
-	xDst * pixel_size + yDst * dst->pixels->stride;
-
-    while (height-- > 0) {
-	data = line;
-	w = width;
-	while (w-- > 0) {
-	    memcpy (data, pixel, pixel_size);
-	    data += pixel_size;
-	}
-	line += dst->pixels->stride;
-    }
-}
-
-static int
-pixman_color_rects (pixman_image_t	 *dst,
-	      pixman_image_t	 *clipPict,
-	      pixman_color_t	 *color,
-	      int	 nRect,
-	      pixman_rectangle_t *rects,
-	      int	 xoff,
-	      int	 yoff)
-{
-    pixman_bits_t       pixel;
-    pixman_region16_t   clip;
-    pixman_region16_t   rects_as_region;
-    pixman_box16_t     *clipped_rects;
-    int	                i, n_clipped_rects;
-    FillFunc            func;
-    pixman_region_status_t status;
-
-    pixman_color_to_pixel (&dst->image_format,
-			   color,
-			   &pixel);
-
-    /* offset to the right place on the destination image */
-    xoff -= dst->pixels->x;
-    yoff -= dst->pixels->y;
-
-    pixman_region_init_rect (&clip,
-                             dst->pixels->x, dst->pixels->y,
-			     dst->pixels->width, dst->pixels->height);
-
-    status = pixman_region_intersect (&clip, &clip,
-	                              clipPict->hasCompositeClip ?
-                                      &clipPict->compositeClip :
-				      NULL);
-    if (status != PIXMAN_REGION_STATUS_SUCCESS)
-    {
-	pixman_region_fini (&clip);
-	return 1;
-    }
-    if (clipPict->alphaMap)
-    {
-	pixman_region_translate (&clip,
-				 -clipPict->alphaOrigin.x,
-				 -clipPict->alphaOrigin.y);
-	status = pixman_region_intersect (&clip, &clip,
-		                          clipPict->alphaMap->hasCompositeClip ?
-					  &clipPict->alphaMap->compositeClip :
-					  NULL);
-	if (status != PIXMAN_REGION_STATUS_SUCCESS)
-	{
-	    pixman_region_fini (&clip);
-	    return 1;
-	}
-	pixman_region_translate (&clip,
-				 clipPict->alphaOrigin.x,
-				 clipPict->alphaOrigin.y);
-    }
-
-    if (xoff || yoff)
-    {
-	for (i = 0; i < nRect; i++)
-	{
-	    rects[i].x -= xoff;
-	    rects[i].y -= yoff;
-	}
-    }
-
-    pixman_region_init (&rects_as_region);
-
-    for (i = 0; i < nRect; i++)
-    {
-	status = pixman_region_union_rect (&rects_as_region, &rects_as_region,
-				           rects[i].x, rects[i].y,
-					   rects[i].width, rects[i].height);
-	if (status != PIXMAN_REGION_STATUS_SUCCESS)
-	{
-	    break;
-	}
-    }
-
-    /* any earlier failure will also trigger a failure here... */
-    status = pixman_region_intersect (&rects_as_region,
-	                              &rects_as_region,
-				      &clip);
-    pixman_region_fini (&clip);
-    if (status != PIXMAN_REGION_STATUS_SUCCESS)
-    {
-	pixman_region_fini (&rects_as_region);
-	return 1;
-    }
-
-    n_clipped_rects = pixman_region_num_rects (&rects_as_region);
-    clipped_rects = pixman_region_rects (&rects_as_region);
-
-    if (dst->pixels->bpp == 8)
-	func = pixman_fill_rect_8bpp;
-    else if (dst->pixels->bpp == 32)
-	func = pixman_fill_rect_32bpp;
-    else if (dst->pixels->bpp == 1)
-	func = pixman_fill_rect_1bpp;
-    else
-	func = pixman_fill_rect_general;
-
-    for (i = 0; i < n_clipped_rects; i++) {
-	(*func) (dst,
-		 clipped_rects[i].x1,
-		 clipped_rects[i].y1,
-		 clipped_rects[i].x2 - clipped_rects[i].x1,
-		 clipped_rects[i].y2 - clipped_rects[i].y1,
-		 &pixel);
-    }
-
-    pixman_region_fini (&rects_as_region);
-
-    if (xoff || yoff)
-    {
-	for (i = 0; i < nRect; i++)
-	{
-	    rects[i].x += xoff;
-	    rects[i].y += yoff;
-	}
-    }
-
-    return 0;
-}
-
-int pixman_fill_rectangle (pixman_operator_t	op,
-		      pixman_image_t		*dst,
-		      const pixman_color_t	*color,
-		      int		x,
-		      int		y,
-		      unsigned int	width,
-		      unsigned int	height)
-{
-    pixman_rectangle_t rect;
-
-    rect.x = x;
-    rect.y = y;
-    rect.width = width;
-    rect.height = height;
-
-    return pixman_fill_rectangles (op, dst, color, &rect, 1);
-}
-
-int
-pixman_fill_rectangles (pixman_operator_t		op,
-		  pixman_image_t		*dst,
-		  const pixman_color_t		*color,
-		  const pixman_rectangle_t	*rects,
-		  int			nRects)
-{
-    int ret = 1;
-    pixman_color_t color_s = *color;
-
-    if (color_s.alpha == 0xffff)
-    {
-	if (op == PIXMAN_OPERATOR_OVER)
-	    op = PIXMAN_OPERATOR_SRC;
-    }
-    if (op == PIXMAN_OPERATOR_CLEAR)
-	color_s.red = color_s.green = color_s.blue = color_s.alpha = 0;
-
-    if (op == PIXMAN_OPERATOR_SRC || op == PIXMAN_OPERATOR_CLEAR)
-    {
-      /* We cast away the constness of rects here, because pixman_color_rects
-	 temporarily modifies it */
-	ret = pixman_color_rects (dst, dst,
-	                          &color_s,
-				  nRects, (pixman_rectangle_t *)rects,
-				  0, 0);
-	if (!ret && dst->alphaMap)
-	    ret = pixman_color_rects (dst->alphaMap, dst,
-			              &color_s,
-				      nRects, (pixman_rectangle_t *)rects,
-			              dst->alphaOrigin.x,
-			              dst->alphaOrigin.y);
-    }
-    else
-    {
-	pixman_format_t	rgbaFormat;
-	FbPixels	*pixels;
-	pixman_image_t		*src;
-	pixman_bits_t		pixel;
-
-	pixman_format_init_code (&rgbaFormat, PICT_a8r8g8b8);
-
-	pixels = FbPixelsCreate (1, 1, rgbaFormat.depth);
-	if (!pixels)
-	    goto bail1;
-
-	pixman_color_to_pixel (&rgbaFormat, &color_s, &pixel);
-
-	/* XXX: Originally, fb had the following:
-
-	   (*pGC->ops->PolyFillRect) (&pPixmap->drawable, pGC, 1, &one);
-
-	   I haven't checked to see what I might be breaking with a
-	   trivial assignment instead.
-	*/
-	pixels->data[0] = pixel;
-
-	src = pixman_image_createForPixels (pixels, &rgbaFormat);
-	if (!src)
-	    goto bail2;
-
-	pixman_image_set_repeat (src, PIXMAN_REPEAT_NORMAL);
-
-	while (nRects--)
-	{
-	    pixman_composite (op, src, NULL, dst, 0, 0, 0, 0,
-			 rects->x,
-			 rects->y,
-			 rects->width,
-			 rects->height);
-	    rects++;
-	}
-
-	pixman_image_destroy (src);
-	ret = 0;
-bail2:
-	FbPixelsDestroy (pixels);
-bail1:
-	;
-    }
-
-    return ret;
-}
diff --git a/pixman/src/icrop.h b/pixman/src/icrop.h
deleted file mode 100644
index 99fc8e5..0000000
--- a/pixman/src/icrop.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Id: $
- *
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _ICROP_H_
-#define _ICROP_H_
-
-typedef struct _mergeRopBits {
-    FbBits   ca1, cx1, ca2, cx2;
-} FbMergeRopRec, *FbMergeRopPtr;
-
-extern pixman_private const FbMergeRopRec FbMergeRopBits[16];
-
-#define FbDeclareMergeRop() FbBits   _ca1, _cx1, _ca2, _cx2;
-#define FbDeclarePrebuiltMergeRop()	FbBits	_cca, _ccx;
-
-#define FbInitializeMergeRop(alu,pm) {\
-    const FbMergeRopRec  *_bits; \
-    _bits = &FbMergeRopBits[alu]; \
-    _ca1 = _bits->ca1 &  pm; \
-    _cx1 = _bits->cx1 | ~pm; \
-    _ca2 = _bits->ca2 &  pm; \
-    _cx2 = _bits->cx2 &  pm; \
-}
-
-#define FbDestInvarientRop(alu,pm)  ((pm) == FB_ALLONES && \
-				     (((alu) >> 1 & 5) == ((alu) & 5)))
-
-#define FbDestInvarientMergeRop()   (_ca1 == 0 && _cx1 == 0)
-
-/* AND has higher precedence than XOR */
-
-#define FbDoMergeRop(src, dst) \
-    (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2))
-
-#define FbDoDestInvarientMergeRop(src)	(((src) & _ca2) ^ _cx2)
-
-#define FbDoMaskMergeRop(src, dst, mask) \
-    (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask)))
-
-#define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \
-    FbBits  __xor = ((src) & _ca2) ^ _cx2; \
-    FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \
-}
-
-#define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \
-    FbBits  __xor = ((src) & _ca2) ^ _cx2; \
-    FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \
-}
-
-#define FbDoRRop(dst, and, xor)	(((dst) & (and)) ^ (xor))
-
-#define FbDoMaskRRop(dst, and, xor, mask) \
-    (((dst) & ((and) | ~(mask))) ^ (xor & mask))
-
-/*
- * Take a single bit (0 or 1) and generate a full mask
- */
-#define fbFillFromBit(b,t)	(~((t) ((b) & 1)-1))
-
-#define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \
-			      (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm))
-
-#define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \
-			      (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \
-			     ~(pm))
-
-#define fbXor(rop,fg,pm)	fbXorT(rop,fg,pm,FbBits)
-
-#define fbAnd(rop,fg,pm)	fbAndT(rop,fg,pm,FbBits)
-
-#define fbXorStip(rop,fg,pm)    fbXorT(rop,fg,pm,FbStip)
-
-#define fbAndStip(rop,fg,pm)	fbAndT(rop,fg,pm,FbStip)
-
-/*
- * Stippling operations;
- */
-
-/* half of table */
-extern pixman_private const pixman_bits_t fbStipple16Bits[256];
-#define FbStipple16Bits(b) \
-    (fbStipple16Bits[(b)&0xff] | fbStipple16Bits[(b) >> 8] << FB_HALFUNIT)
-
-pixman_private const pixman_bits_t *
-fbStippleTable(int bits);
-
-#define FbStippleRRop(dst, b, fa, fx, ba, bx) \
-    (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b)
-
-#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
-    (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
-
-#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
-    FbBits  __xor = ((fx) & (b)) | ((bx) & ~(b)); \
-    FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
-}
-
-#define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \
-    FbBits  __xor = ((fx) & (b)) | ((bx) & ~(b)); \
-    FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
-}
-
-#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
-
-/*
- * Compute rop for using tile code for 1-bit dest stipples; modifies
- * existing rop to flip depending on pixel values
- */
-#define FbStipple1RopPick(alu,b)    (((alu) >> (2 - (((b) & 1) << 1))) & 3)
-
-#define FbOpaqueStipple1Rop(alu,fg,bg)    (FbStipple1RopPick(alu,fg) | \
-					   (FbStipple1RopPick(alu,bg) << 2))
-
-#define FbStipple1Rop(alu,fg)	    (FbStipple1RopPick(alu,fg) | 4)
-
-#endif
diff --git a/pixman/src/icstipple.c b/pixman/src/icstipple.c
deleted file mode 100644
index d14e5aa..0000000
--- a/pixman/src/icstipple.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Id: $
- *
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-#ifndef ICNOPIXADDR
-/*
- * This is a slight abuse of the preprocessor to generate repetitive
- * code, the idea is to generate code for each case of a copy-mode
- * transparent stipple
- */
-#define LaneCases1(c,a)	    case c: \
-				while (n--) { (void)FbLaneCase(c,a); a++; } \
-				break
-#define LaneCases2(c,a)	    LaneCases1(c,a); LaneCases1(c+1,a)
-#define LaneCases4(c,a)	    LaneCases2(c,a); LaneCases2(c+2,a)
-#define LaneCases8(c,a)	    LaneCases4(c,a); LaneCases4(c+4,a)
-#define LaneCases16(c,a)    LaneCases8(c,a); LaneCases8(c+8,a)
-#define LaneCases32(c,a)    LaneCases16(c,a); LaneCases16(c+16,a)
-#define LaneCases64(c,a)    LaneCases32(c,a); LaneCases32(c+32,a)
-#define LaneCases128(c,a)   LaneCases64(c,a); LaneCases64(c+64,a)
-#define LaneCases256(c,a)   LaneCases128(c,a); LaneCases128(c+128,a)
-
-#if FB_SHIFT == 6
-#define LaneCases(a)	    LaneCases256(0,a)
-#endif
-
-#if FB_SHIFT == 5
-#define LaneCases(a)	    LaneCases16(0,a)
-#endif
-
-/*
- * Repeat a transparent stipple across a scanline n times
- */
-
-void
-fbTransparentSpan (FbBits   *dst,
-		   FbBits   stip,
-		   FbBits   fgxor,
-		   int	    n)
-{
-    FbStip  s;
-
-    s  = ((FbStip) (stip      ) & 0x01);
-    s |= ((FbStip) (stip >>  8) & 0x02);
-    s |= ((FbStip) (stip >> 16) & 0x04);
-    s |= ((FbStip) (stip >> 24) & 0x08);
-#if FB_SHIFT > 5
-    s |= ((FbStip) (stip >> 32) & 0x10);
-    s |= ((FbStip) (stip >> 40) & 0x20);
-    s |= ((FbStip) (stip >> 48) & 0x40);
-    s |= ((FbStip) (stip >> 56) & 0x80);
-#endif
-    switch (s) {
-	LaneCases(dst);
-    }
-}
-#endif
diff --git a/pixman/src/ictransform.c b/pixman/src/ictransform.c
deleted file mode 100644
index 5ee1f0b..0000000
--- a/pixman/src/ictransform.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright © 2000 SuSE, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of SuSE not be used in advertising or
- * publicity pertaining to distribution of the software without specific,
- * written prior permission.  SuSE makes no representations about the
- * suitability of this software for any purpose.  It is provided "as is"
- * without express or implied warranty.
- *
- * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
- * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author:  Keith Packard, SuSE, Inc.
- */
-
-#include "pixmanint.h"
-
-#define MAX_FIXED_48_16	    ((xFixed_48_16) 0x7fffffff)
-#define MIN_FIXED_48_16	    (-((xFixed_48_16) 1 << 31))
-
-int
-pixman_transform_point (pixman_transform_t	*transform,
-		  pixman_vector_t	*vector)
-{
-    pixman_vector_t	    result;
-    int		    i, j;
-    xFixed_32_32    partial;
-    xFixed_48_16    v;
-
-    for (j = 0; j < 3; j++)
-    {
-	v = 0;
-	for (i = 0; i < 3; i++)
-	{
-	    partial = ((xFixed_48_16) transform->matrix[j][i] *
-		       (xFixed_48_16) vector->vector[i]);
-	    v += partial >> 16;
-	}
-	if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16)
-	    return 0;
-	result.vector[j] = (xFixed) v;
-    }
-    if (!result.vector[2])
-	return 0;
-    for (j = 0; j < 2; j++)
-    {
-	partial = (xFixed_48_16) result.vector[j] << 16;
-	v = partial / result.vector[2];
-	if (v > MAX_FIXED_48_16 || v < MIN_FIXED_48_16)
-	    return 0;
-	vector->vector[j] = (xFixed) v;
-    }
-    vector->vector[2] = xFixed1;
-    return 1;
-}
diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c
deleted file mode 100644
index 6ef19cf..0000000
--- a/pixman/src/ictrap.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright © 2002 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include <assert.h>
-
-pixman_image_t *
-FbCreateAlphaPicture (pixman_image_t	*dst,
-		      pixman_format_t	*format,
-		      uint16_t	width,
-		      uint16_t	height)
-{
-    pixman_format_t	 local_format;
-
-    if (width > 32767 || height > 32767)
-	return NULL;
-
-    if (!format)
-    {
-	int ret;
-	format = &local_format;
-	if (dst->polyEdge == PolyEdgeSharp)
-	     ret = pixman_format_init (format, PIXMAN_FORMAT_NAME_A1);
-	else
-	     ret = pixman_format_init (format, PIXMAN_FORMAT_NAME_A8);
-	assert (ret);
-    }
-
-    /* pixman_image_create zeroes out the pixels, so we don't have to */
-    return pixman_image_create (format, width, height);
-}
-
-static pixman_fixed16_16_t
-pixman_line_fixed_x (const pixman_line_fixed_t *l, pixman_fixed16_16_t y, int ceil)
-{
-    pixman_fixed16_16_t    dx = l->p2.x - l->p1.x;
-    xFixed_32_32    ex = (xFixed_32_32) (y - l->p1.y) * dx;
-    pixman_fixed16_16_t    dy = l->p2.y - l->p1.y;
-    if (ceil)
-	ex += (dy - 1);
-    return l->p1.x + (pixman_fixed16_16_t) (ex / dy);
-}
-
-static void
-pixman_trapezoid_bounds (int ntrap, const pixman_trapezoid_t *traps, pixman_box16_t *box)
-{
-    box->y1 = MAXSHORT;
-    box->y2 = MINSHORT;
-    box->x1 = MAXSHORT;
-    box->x2 = MINSHORT;
-    for (; ntrap; ntrap--, traps++)
-    {
-	int16_t x1, y1, x2, y2;
-
-	if (!xTrapezoidValid(traps))
-	    continue;
-	y1 = xFixedToInt (traps->top);
-	if (y1 < box->y1)
-	    box->y1 = y1;
-
-	y2 = xFixedToInt (xFixedCeil (traps->bottom));
-	if (y2 > box->y2)
-	    box->y2 = y2;
-
-	x1 = xFixedToInt (MIN (pixman_line_fixed_x (&traps->left, traps->top, 0),
-			       pixman_line_fixed_x (&traps->left, traps->bottom, 0)));
-	if (x1 < box->x1)
-	    box->x1 = x1;
-
-	x2 = xFixedToInt (xFixedCeil (MAX (pixman_line_fixed_x (&traps->right, traps->top, 1),
-					   pixman_line_fixed_x (&traps->right, traps->bottom, 1))));
-	if (x2 > box->x2)
-	    box->x2 = x2;
-    }
-}
-
-int
-pixman_composite_trapezoids (pixman_operator_t	      op,
-			     pixman_image_t	      *src,
-			     pixman_image_t	      *dst,
-			     int		      xSrc,
-			     int		      ySrc,
-			     const pixman_trapezoid_t *traps,
-			     int		      ntraps)
-{
-    pixman_image_t		*image = NULL;
-    pixman_box16_t		 traps_bounds, dst_bounds, bounds;
-    pixman_region16_t		 traps_region, dst_region;
-    int16_t			 xDst, yDst;
-    int16_t			 xRel, yRel;
-    pixman_format_t		 format;
-    pixman_region_status_t	 status;
-    int                          ret;
-
-    if (ntraps == 0)
-	return 0;
-
-    /*
-     * Check for solid alpha add
-     */
-    if (op == PIXMAN_OPERATOR_ADD && miIsSolidAlpha (src))
-    {
-	for (; ntraps; ntraps--, traps++)
-	    fbRasterizeTrapezoid (dst, traps, 0, 0);
-	return 0;
-    }
-
-    xDst = traps[0].left.p1.x >> 16;
-    yDst = traps[0].left.p1.y >> 16;
-
-    pixman_trapezoid_bounds (ntraps, traps, &traps_bounds);
-    pixman_region_init_with_extents (&traps_region, &traps_bounds);
-
-    /* XXX: If the image has a clip region set, we should really be
-     * fetching it here instead, but it looks like we don't yet expose
-     * a pixman_image_get_clip_region function. */
-    dst_bounds.x1 = 0;
-    dst_bounds.y1 = 0;
-    dst_bounds.x2 = pixman_image_get_width (dst);
-    dst_bounds.y2 = pixman_image_get_height (dst);
-
-    pixman_region_init_with_extents (&dst_region, &dst_bounds);
-    status = pixman_region_intersect (&traps_region, &traps_region, &dst_region);
-    if (status != PIXMAN_REGION_STATUS_SUCCESS) {
-	pixman_region_fini (&traps_region);
-	pixman_region_fini (&dst_region);
-	return 1;
-    }
-
-    bounds = *(pixman_region_extents (&traps_region));
-
-    pixman_region_fini (&traps_region);
-    pixman_region_fini (&dst_region);
-
-    if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2)
-	return 0;
-
-    ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A8);
-    assert (ret);
-
-    image = FbCreateAlphaPicture (dst, &format,
-				  bounds.x2 - bounds.x1,
-				  bounds.y2 - bounds.y1);
-    if (!image)
-	return 1;
-
-    for (; ntraps; ntraps--, traps++)
-    {
-	if (!xTrapezoidValid(traps))
-	    continue;
-	fbRasterizeTrapezoid (image, traps,
-			      -bounds.x1, -bounds.y1);
-    }
-
-    xRel = bounds.x1 + xSrc - xDst;
-    yRel = bounds.y1 + ySrc - yDst;
-    pixman_composite (op, src, image, dst,
-		      xRel, yRel, 0, 0, bounds.x1, bounds.y1,
-		      bounds.x2 - bounds.x1,
-		      bounds.y2 - bounds.y1);
-    pixman_image_destroy (image);
-
-    return 0;
-}
-
-void
-pixman_add_trapezoids (pixman_image_t		*dst,
-		       int			x_off,
-		       int			y_off,
-		       const pixman_trapezoid_t	*traps,
-		       int			ntraps)
-{
-    for (; ntraps; ntraps--, traps++)
-    {
-	if (!xTrapezoidValid (traps))
-	    continue;
-
-	fbRasterizeTrapezoid (dst, traps, x_off, y_off);
-    }
-}
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
deleted file mode 100644
index 7fb76a5..0000000
--- a/pixman/src/ictri.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright © 2002 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include <assert.h>
-
-static void
-pixman_point_fixed_bounds (int npoint, const pixman_point_fixed_t *points, pixman_box16_t *bounds)
-{
-    bounds->x1 = xFixedToInt (points->x);
-    bounds->x2 = xFixedToInt (xFixedCeil (points->x));
-    bounds->y1 = xFixedToInt (points->y);
-    bounds->y2 = xFixedToInt (xFixedCeil (points->y));
-    points++;
-    npoint--;
-    while (npoint-- > 0)
-    {
-	int	x1 = xFixedToInt (points->x);
-	int	x2 = xFixedToInt (xFixedCeil (points->x));
-	int	y1 = xFixedToInt (points->y);
-	int	y2 = xFixedToInt (xFixedCeil (points->y));
-
-	if (x1 < bounds->x1)
-	    bounds->x1 = x1;
-	else if (x2 > bounds->x2)
-	    bounds->x2 = x2;
-	if (y1 < bounds->y1)
-	    bounds->y1 = y1;
-	else if (y2 > bounds->y2)
-	    bounds->y2 = y2;
-	points++;
-    }
-}
-
-static void
-pixman_triangle_bounds (int ntri, const pixman_triangle_t *tris, pixman_box16_t *bounds)
-{
-    pixman_point_fixed_bounds (ntri * 3, (pixman_point_fixed_t *) tris, bounds);
-}
-
-static void
-FbRasterizeTriangle (pixman_image_t		*image,
-		     const pixman_triangle_t	*tri,
-		     int		x_off,
-		     int		y_off)
-{
-    const pixman_point_fixed_t	*top, *left, *right, *t;
-    pixman_trapezoid_t		trap[2];
-
-    top = &tri->p1;
-    left = &tri->p2;
-    right = &tri->p3;
-    if (left->y < top->y) {
-	t = left; left = top; top = t;
-    }
-    if (right->y < top->y) {
-	t = right; right = top; top = t;
-    }
-    /* XXX: This code is broken, left and right must be determined by
-       comparing the angles of the two edges, (eg. we can only compare
-       X coordinates if we've already intersected each edge with the
-       same Y coordinate) */
-    if (right->x < left->x) {
-	t = right; right = left; left = t;
-    }
-
-    /*
-     * Two cases:
-     *
-     *		+		+
-     *	       / \             / \
-     *	      /   \           /   \
-     *	     /     +         +     \
-     *      /    --           --    \
-     *     /   --               --   \
-     *    / ---                   --- \
-     *	 +--                         --+
-     */
-
-    trap[0].top = top->y;
-
-    trap[0].left.p1.x = top->x;
-    trap[0].left.p1.y = trap[0].top;
-    trap[0].left.p2.x = left->x;
-    trap[0].left.p2.y = left->y;
-
-    trap[0].right.p1 = trap[0].left.p1;
-    trap[0].right.p2.x = right->x;
-    trap[0].right.p2.y = right->y;
-
-    if (right->y < left->y)
-    {
-	trap[0].bottom = trap[0].right.p2.y;
-
-	trap[1].top = trap[0].bottom;
-	trap[1].bottom = trap[0].left.p2.y;
-
-	trap[1].left = trap[0].left;
-	trap[1].right.p1 = trap[0].right.p2;
-	trap[1].right.p2 = trap[0].left.p2;
-    }
-    else
-    {
-	trap[0].bottom = trap[0].left.p2.y;
-
-	trap[1].top = trap[0].bottom;
-	trap[1].bottom = trap[0].right.p2.y;
-
-	trap[1].right = trap[0].right;
-	trap[1].left.p1 = trap[0].left.p2;
-	trap[1].left.p2 = trap[0].right.p2;
-    }
-    if (trap[0].top != trap[0].bottom)
-	fbRasterizeTrapezoid (image, &trap[0], x_off, y_off);
-    if (trap[1].top != trap[1].bottom)
-	fbRasterizeTrapezoid (image, &trap[1], x_off, y_off);
-}
-
-void
-pixman_composite_triangles (pixman_operator_t	op,
-		      pixman_image_t		*src,
-		      pixman_image_t		*dst,
-		      int		xSrc,
-		      int		ySrc,
-		      const pixman_triangle_t	*tris,
-		      int		ntris)
-{
-    pixman_box16_t	bounds = {0, 0, 0, 0}; /* shut gcc up */
-    pixman_image_t		*image = NULL;
-    int		xDst, yDst;
-    int		xRel, yRel;
-    pixman_format_t	 format;
-    int			 ret;
-
-    xDst = tris[0].p1.x >> 16;
-    yDst = tris[0].p1.y >> 16;
-
-    ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A8);
-    assert (ret);
-
-    pixman_triangle_bounds (ntris, tris, &bounds);
-    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
-	return;
-
-    image = FbCreateAlphaPicture (dst,
-				  &format,
-				  bounds.x2 - bounds.x1,
-				  bounds.y2 - bounds.y1);
-    if (!image)
-	return;
-
-    for (; ntris; ntris--, tris++)
-    {
-	FbRasterizeTriangle (image, tris, -bounds.x1, -bounds.y1);
-	/* XXX adjust xSrc and ySrc */
-    }
-
-    xRel = bounds.x1 + xSrc - xDst;
-    yRel = bounds.y1 + ySrc - yDst;
-    pixman_composite (op, src, image, dst,
-		 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
-		 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
-    pixman_image_destroy (image);
-}
-
-void
-pixman_composite_tri_strip (pixman_operator_t		op,
-		     pixman_image_t		*src,
-		     pixman_image_t		*dst,
-		     int		xSrc,
-		     int		ySrc,
-		     const pixman_point_fixed_t	*points,
-		     int		npoints)
-{
-    pixman_triangle_t		tri;
-    pixman_box16_t	bounds = {0, 0, 0, 0}; /* shut gcc up */
-    pixman_image_t		*image = NULL;
-    int		xDst, yDst;
-    int		xRel, yRel;
-    pixman_format_t	 format;
-    int			 ret;
-
-    if (npoints < 3)
-	return;
-
-    xDst = points[0].x >> 16;
-    yDst = points[0].y >> 16;
-
-    ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A8);
-    assert (ret);
-
-    pixman_point_fixed_bounds (npoints, points, &bounds);
-    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
-	return;
-
-    image = FbCreateAlphaPicture (dst,
-				  &format,
-				  bounds.x2 - bounds.x1,
-				  bounds.y2 - bounds.y1);
-    if (!image)
-	return;
-
-    for (; npoints >= 3; npoints--, points++)
-    {
-	tri.p1 = points[0];
-	tri.p2 = points[1];
-	tri.p3 = points[2];
-	FbRasterizeTriangle (image, &tri, -bounds.x1, -bounds.y1);
-    }
-
-    xRel = bounds.x1 + xSrc - xDst;
-    yRel = bounds.y1 + ySrc - yDst;
-    pixman_composite (op, src, image, dst,
-		 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
-		 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
-    pixman_image_destroy (image);
-}
-
-void
-pixman_composite_tri_fan (pixman_operator_t		op,
-		   pixman_image_t		*src,
-		   pixman_image_t		*dst,
-		   int			xSrc,
-		   int			ySrc,
-		   const pixman_point_fixed_t	*points,
-		   int			npoints)
-{
-    pixman_triangle_t		tri;
-    pixman_box16_t	bounds = {0, 0, 0, 0}; /* shut gcc up */
-    pixman_image_t		*image = NULL;
-    const pixman_point_fixed_t	*first;
-    int		xDst, yDst;
-    int		xRel, yRel;
-    pixman_format_t	 format;
-    int			 ret;
-
-    if (npoints < 3)
-	return;
-
-    xDst = points[0].x >> 16;
-    yDst = points[0].y >> 16;
-
-    ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A8);
-    assert (ret);
-
-    pixman_point_fixed_bounds (npoints, points, &bounds);
-    if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
-	return;
-
-    image = FbCreateAlphaPicture (dst,
-				  &format,
-				  bounds.x2 - bounds.x1,
-				  bounds.y2 - bounds.y1);
-    if (!image)
-	return;
-
-    first = points++;
-    npoints--;
-    for (; npoints >= 2; npoints--, points++)
-    {
-	tri.p1 = *first;
-	tri.p2 = points[0];
-	tri.p3 = points[1];
-	FbRasterizeTriangle (image, &tri, -bounds.x1, -bounds.y1);
-    }
-
-    xRel = bounds.x1 + xSrc - xDst;
-    yRel = bounds.y1 + ySrc - yDst;
-    pixman_composite (op, src, image, dst,
-		 xRel, yRel, 0, 0, bounds.x1, bounds.y1,
-		 bounds.x2 - bounds.x1, bounds.y2 - bounds.y1);
-    pixman_image_destroy (image);
-}
diff --git a/pixman/src/icutil.c b/pixman/src/icutil.c
deleted file mode 100644
index e9f561c..0000000
--- a/pixman/src/icutil.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Id: $
- *
- * Copyright © 1998 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-pixman_bits_t
-fbReplicatePixel (Pixel p, int bpp)
-{
-    pixman_bits_t  b = p;
-
-    b &= FbFullMask (bpp);
-    while (bpp < FB_UNIT)
-    {
-	b |= b << bpp;
-	bpp <<= 1;
-    }
-    return b;
-}
-
-#define O 0
-#define I FB_ALLONES
-
-const FbMergeRopRec FbMergeRopBits[16] = {
-    { O,O,O,O },   /* clear	    0x0		0 */
-    { I,O,O,O },   /* and	    0x1		src AND dst */
-    { I,O,I,O },   /* andReverse    0x2		src AND NOT dst */
-    { O,O,I,O },   /* copy	    0x3		src */
-    { I,I,O,O },   /* andInverted   0x4		NOT src AND dst */
-    { O,I,O,O },   /* noop	    0x5		dst */
-    { O,I,I,O },   /* xor	    0x6		src XOR dst */
-    { I,I,I,O },   /* or	    0x7		src OR dst */
-    { I,I,I,I },   /* nor	    0x8		NOT src AND NOT dst */
-    { O,I,I,I },   /* equiv	    0x9		NOT src XOR dst */
-    { O,I,O,I },   /* invert	    0xa		NOT dst */
-    { I,I,O,I },   /* orReverse	    0xb		src OR NOT dst */
-    { O,O,I,I },   /* copyInverted  0xc		NOT src */
-    { I,O,I,I },   /* orInverted    0xd		NOT src OR dst */
-    { I,O,O,I },   /* nand	    0xe		NOT src OR NOT dst */
-    { O,O,O,I },   /* set	    0xf		1 */
-};
-
-/*
- * Stipple masks are independent of bit/byte order as long
- * as bitorder == byteorder.  FB doesn't handle the case
- * where these differ
- */
-#define BitsMask(x,w)	((FB_ALLONES << ((x) & FB_MASK)) & \
-			 (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK)))
-
-#define Mask(x,w)	BitsMask((x)*(w),(w))
-
-#define SelMask(b,n,w)	((((b) >> n) & 1) * Mask(n,w))
-
-#define C1(b,w) \
-    (SelMask(b,0,w))
-
-#define C2(b,w) \
-    (SelMask(b,0,w) | \
-     SelMask(b,1,w))
-
-#define C4(b,w) \
-    (SelMask(b,0,w) | \
-     SelMask(b,1,w) | \
-     SelMask(b,2,w) | \
-     SelMask(b,3,w))
-
-#define C8(b,w) \
-    (SelMask(b,0,w) | \
-     SelMask(b,1,w) | \
-     SelMask(b,2,w) | \
-     SelMask(b,3,w) | \
-     SelMask(b,4,w) | \
-     SelMask(b,5,w) | \
-     SelMask(b,6,w) | \
-     SelMask(b,7,w))
-
-#if FB_UNIT == 16
-#define fbStipple16Bits 0
-#define fbStipple8Bits 0
-static const pixman_bits_t fbStipple4Bits[16] = {
-    C4(  0,4), C4(  1,4), C4(  2,4), C4(  3,4), C4(  4,4), C4(  5,4),
-    C4(  6,4), C4(  7,4), C4(  8,4), C4(  9,4), C4( 10,4), C4( 11,4),
-    C4( 12,4), C4( 13,4), C4( 14,4), C4( 15,4),};
-static const pixman_bits_t fbStipple2Bits[4] = {
-    C2(  0,8), C2(  1,8), C2(  2,8), C2(  3,8),
-};
-static const pixman_bits_t fbStipple1Bits[2] = {
-    C1(  0,16), C1(  1,16),
-};
-#endif
-#if FB_UNIT == 32
-#define fbStipple16Bits 0
-static const pixman_bits_t fbStipple8Bits[256] = {
-    C8(  0,4), C8(  1,4), C8(  2,4), C8(  3,4), C8(  4,4), C8(  5,4),
-    C8(  6,4), C8(  7,4), C8(  8,4), C8(  9,4), C8( 10,4), C8( 11,4),
-    C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
-    C8( 18,4), C8( 19,4), C8( 20,4), C8( 21,4), C8( 22,4), C8( 23,4),
-    C8( 24,4), C8( 25,4), C8( 26,4), C8( 27,4), C8( 28,4), C8( 29,4),
-    C8( 30,4), C8( 31,4), C8( 32,4), C8( 33,4), C8( 34,4), C8( 35,4),
-    C8( 36,4), C8( 37,4), C8( 38,4), C8( 39,4), C8( 40,4), C8( 41,4),
-    C8( 42,4), C8( 43,4), C8( 44,4), C8( 45,4), C8( 46,4), C8( 47,4),
-    C8( 48,4), C8( 49,4), C8( 50,4), C8( 51,4), C8( 52,4), C8( 53,4),
-    C8( 54,4), C8( 55,4), C8( 56,4), C8( 57,4), C8( 58,4), C8( 59,4),
-    C8( 60,4), C8( 61,4), C8( 62,4), C8( 63,4), C8( 64,4), C8( 65,4),
-    C8( 66,4), C8( 67,4), C8( 68,4), C8( 69,4), C8( 70,4), C8( 71,4),
-    C8( 72,4), C8( 73,4), C8( 74,4), C8( 75,4), C8( 76,4), C8( 77,4),
-    C8( 78,4), C8( 79,4), C8( 80,4), C8( 81,4), C8( 82,4), C8( 83,4),
-    C8( 84,4), C8( 85,4), C8( 86,4), C8( 87,4), C8( 88,4), C8( 89,4),
-    C8( 90,4), C8( 91,4), C8( 92,4), C8( 93,4), C8( 94,4), C8( 95,4),
-    C8( 96,4), C8( 97,4), C8( 98,4), C8( 99,4), C8(100,4), C8(101,4),
-    C8(102,4), C8(103,4), C8(104,4), C8(105,4), C8(106,4), C8(107,4),
-    C8(108,4), C8(109,4), C8(110,4), C8(111,4), C8(112,4), C8(113,4),
-    C8(114,4), C8(115,4), C8(116,4), C8(117,4), C8(118,4), C8(119,4),
-    C8(120,4), C8(121,4), C8(122,4), C8(123,4), C8(124,4), C8(125,4),
-    C8(126,4), C8(127,4), C8(128,4), C8(129,4), C8(130,4), C8(131,4),
-    C8(132,4), C8(133,4), C8(134,4), C8(135,4), C8(136,4), C8(137,4),
-    C8(138,4), C8(139,4), C8(140,4), C8(141,4), C8(142,4), C8(143,4),
-    C8(144,4), C8(145,4), C8(146,4), C8(147,4), C8(148,4), C8(149,4),
-    C8(150,4), C8(151,4), C8(152,4), C8(153,4), C8(154,4), C8(155,4),
-    C8(156,4), C8(157,4), C8(158,4), C8(159,4), C8(160,4), C8(161,4),
-    C8(162,4), C8(163,4), C8(164,4), C8(165,4), C8(166,4), C8(167,4),
-    C8(168,4), C8(169,4), C8(170,4), C8(171,4), C8(172,4), C8(173,4),
-    C8(174,4), C8(175,4), C8(176,4), C8(177,4), C8(178,4), C8(179,4),
-    C8(180,4), C8(181,4), C8(182,4), C8(183,4), C8(184,4), C8(185,4),
-    C8(186,4), C8(187,4), C8(188,4), C8(189,4), C8(190,4), C8(191,4),
-    C8(192,4), C8(193,4), C8(194,4), C8(195,4), C8(196,4), C8(197,4),
-    C8(198,4), C8(199,4), C8(200,4), C8(201,4), C8(202,4), C8(203,4),
-    C8(204,4), C8(205,4), C8(206,4), C8(207,4), C8(208,4), C8(209,4),
-    C8(210,4), C8(211,4), C8(212,4), C8(213,4), C8(214,4), C8(215,4),
-    C8(216,4), C8(217,4), C8(218,4), C8(219,4), C8(220,4), C8(221,4),
-    C8(222,4), C8(223,4), C8(224,4), C8(225,4), C8(226,4), C8(227,4),
-    C8(228,4), C8(229,4), C8(230,4), C8(231,4), C8(232,4), C8(233,4),
-    C8(234,4), C8(235,4), C8(236,4), C8(237,4), C8(238,4), C8(239,4),
-    C8(240,4), C8(241,4), C8(242,4), C8(243,4), C8(244,4), C8(245,4),
-    C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
-    C8(252,4), C8(253,4), C8(254,4), C8(255,4),
-};
-static const pixman_bits_t fbStipple4Bits[16] = {
-    C4(  0,8), C4(  1,8), C4(  2,8), C4(  3,8), C4(  4,8), C4(  5,8),
-    C4(  6,8), C4(  7,8), C4(  8,8), C4(  9,8), C4( 10,8), C4( 11,8),
-    C4( 12,8), C4( 13,8), C4( 14,8), C4( 15,8),};
-static const pixman_bits_t fbStipple2Bits[4] = {
-    C2(  0,16), C2(  1,16), C2(  2,16), C2(  3,16),
-};
-static const pixman_bits_t fbStipple1Bits[2] = {
-    C1(  0,32), C1(  1,32),
-};
-#endif
-#if FB_UNIT == 64
-const pixman_bits_t fbStipple16Bits[256] = {
-    C8(  0,4), C8(  1,4), C8(  2,4), C8(  3,4), C8(  4,4), C8(  5,4),
-    C8(  6,4), C8(  7,4), C8(  8,4), C8(  9,4), C8( 10,4), C8( 11,4),
-    C8( 12,4), C8( 13,4), C8( 14,4), C8( 15,4), C8( 16,4), C8( 17,4),
-    C8( 18,4), C8( 19,4), C8( 20,4), C8( 21,4), C8( 22,4), C8( 23,4),
-    C8( 24,4), C8( 25,4), C8( 26,4), C8( 27,4), C8( 28,4), C8( 29,4),
-    C8( 30,4), C8( 31,4), C8( 32,4), C8( 33,4), C8( 34,4), C8( 35,4),
-    C8( 36,4), C8( 37,4), C8( 38,4), C8( 39,4), C8( 40,4), C8( 41,4),
-    C8( 42,4), C8( 43,4), C8( 44,4), C8( 45,4), C8( 46,4), C8( 47,4),
-    C8( 48,4), C8( 49,4), C8( 50,4), C8( 51,4), C8( 52,4), C8( 53,4),
-    C8( 54,4), C8( 55,4), C8( 56,4), C8( 57,4), C8( 58,4), C8( 59,4),
-    C8( 60,4), C8( 61,4), C8( 62,4), C8( 63,4), C8( 64,4), C8( 65,4),
-    C8( 66,4), C8( 67,4), C8( 68,4), C8( 69,4), C8( 70,4), C8( 71,4),
-    C8( 72,4), C8( 73,4), C8( 74,4), C8( 75,4), C8( 76,4), C8( 77,4),
-    C8( 78,4), C8( 79,4), C8( 80,4), C8( 81,4), C8( 82,4), C8( 83,4),
-    C8( 84,4), C8( 85,4), C8( 86,4), C8( 87,4), C8( 88,4), C8( 89,4),
-    C8( 90,4), C8( 91,4), C8( 92,4), C8( 93,4), C8( 94,4), C8( 95,4),
-    C8( 96,4), C8( 97,4), C8( 98,4), C8( 99,4), C8(100,4), C8(101,4),
-    C8(102,4), C8(103,4), C8(104,4), C8(105,4), C8(106,4), C8(107,4),
-    C8(108,4), C8(109,4), C8(110,4), C8(111,4), C8(112,4), C8(113,4),
-    C8(114,4), C8(115,4), C8(116,4), C8(117,4), C8(118,4), C8(119,4),
-    C8(120,4), C8(121,4), C8(122,4), C8(123,4), C8(124,4), C8(125,4),
-    C8(126,4), C8(127,4), C8(128,4), C8(129,4), C8(130,4), C8(131,4),
-    C8(132,4), C8(133,4), C8(134,4), C8(135,4), C8(136,4), C8(137,4),
-    C8(138,4), C8(139,4), C8(140,4), C8(141,4), C8(142,4), C8(143,4),
-    C8(144,4), C8(145,4), C8(146,4), C8(147,4), C8(148,4), C8(149,4),
-    C8(150,4), C8(151,4), C8(152,4), C8(153,4), C8(154,4), C8(155,4),
-    C8(156,4), C8(157,4), C8(158,4), C8(159,4), C8(160,4), C8(161,4),
-    C8(162,4), C8(163,4), C8(164,4), C8(165,4), C8(166,4), C8(167,4),
-    C8(168,4), C8(169,4), C8(170,4), C8(171,4), C8(172,4), C8(173,4),
-    C8(174,4), C8(175,4), C8(176,4), C8(177,4), C8(178,4), C8(179,4),
-    C8(180,4), C8(181,4), C8(182,4), C8(183,4), C8(184,4), C8(185,4),
-    C8(186,4), C8(187,4), C8(188,4), C8(189,4), C8(190,4), C8(191,4),
-    C8(192,4), C8(193,4), C8(194,4), C8(195,4), C8(196,4), C8(197,4),
-    C8(198,4), C8(199,4), C8(200,4), C8(201,4), C8(202,4), C8(203,4),
-    C8(204,4), C8(205,4), C8(206,4), C8(207,4), C8(208,4), C8(209,4),
-    C8(210,4), C8(211,4), C8(212,4), C8(213,4), C8(214,4), C8(215,4),
-    C8(216,4), C8(217,4), C8(218,4), C8(219,4), C8(220,4), C8(221,4),
-    C8(222,4), C8(223,4), C8(224,4), C8(225,4), C8(226,4), C8(227,4),
-    C8(228,4), C8(229,4), C8(230,4), C8(231,4), C8(232,4), C8(233,4),
-    C8(234,4), C8(235,4), C8(236,4), C8(237,4), C8(238,4), C8(239,4),
-    C8(240,4), C8(241,4), C8(242,4), C8(243,4), C8(244,4), C8(245,4),
-    C8(246,4), C8(247,4), C8(248,4), C8(249,4), C8(250,4), C8(251,4),
-    C8(252,4), C8(253,4), C8(254,4), C8(255,4),
-};
-static const pixman_bits_t fbStipple8Bits[256] = {
-    C8(  0,8), C8(  1,8), C8(  2,8), C8(  3,8), C8(  4,8), C8(  5,8),
-    C8(  6,8), C8(  7,8), C8(  8,8), C8(  9,8), C8( 10,8), C8( 11,8),
-    C8( 12,8), C8( 13,8), C8( 14,8), C8( 15,8), C8( 16,8), C8( 17,8),
-    C8( 18,8), C8( 19,8), C8( 20,8), C8( 21,8), C8( 22,8), C8( 23,8),
-    C8( 24,8), C8( 25,8), C8( 26,8), C8( 27,8), C8( 28,8), C8( 29,8),
-    C8( 30,8), C8( 31,8), C8( 32,8), C8( 33,8), C8( 34,8), C8( 35,8),
-    C8( 36,8), C8( 37,8), C8( 38,8), C8( 39,8), C8( 40,8), C8( 41,8),
-    C8( 42,8), C8( 43,8), C8( 44,8), C8( 45,8), C8( 46,8), C8( 47,8),
-    C8( 48,8), C8( 49,8), C8( 50,8), C8( 51,8), C8( 52,8), C8( 53,8),
-    C8( 54,8), C8( 55,8), C8( 56,8), C8( 57,8), C8( 58,8), C8( 59,8),
-    C8( 60,8), C8( 61,8), C8( 62,8), C8( 63,8), C8( 64,8), C8( 65,8),
-    C8( 66,8), C8( 67,8), C8( 68,8), C8( 69,8), C8( 70,8), C8( 71,8),
-    C8( 72,8), C8( 73,8), C8( 74,8), C8( 75,8), C8( 76,8), C8( 77,8),
-    C8( 78,8), C8( 79,8), C8( 80,8), C8( 81,8), C8( 82,8), C8( 83,8),
-    C8( 84,8), C8( 85,8), C8( 86,8), C8( 87,8), C8( 88,8), C8( 89,8),
-    C8( 90,8), C8( 91,8), C8( 92,8), C8( 93,8), C8( 94,8), C8( 95,8),
-    C8( 96,8), C8( 97,8), C8( 98,8), C8( 99,8), C8(100,8), C8(101,8),
-    C8(102,8), C8(103,8), C8(104,8), C8(105,8), C8(106,8), C8(107,8),
-    C8(108,8), C8(109,8), C8(110,8), C8(111,8), C8(112,8), C8(113,8),
-    C8(114,8), C8(115,8), C8(116,8), C8(117,8), C8(118,8), C8(119,8),
-    C8(120,8), C8(121,8), C8(122,8), C8(123,8), C8(124,8), C8(125,8),
-    C8(126,8), C8(127,8), C8(128,8), C8(129,8), C8(130,8), C8(131,8),
-    C8(132,8), C8(133,8), C8(134,8), C8(135,8), C8(136,8), C8(137,8),
-    C8(138,8), C8(139,8), C8(140,8), C8(141,8), C8(142,8), C8(143,8),
-    C8(144,8), C8(145,8), C8(146,8), C8(147,8), C8(148,8), C8(149,8),
-    C8(150,8), C8(151,8), C8(152,8), C8(153,8), C8(154,8), C8(155,8),
-    C8(156,8), C8(157,8), C8(158,8), C8(159,8), C8(160,8), C8(161,8),
-    C8(162,8), C8(163,8), C8(164,8), C8(165,8), C8(166,8), C8(167,8),
-    C8(168,8), C8(169,8), C8(170,8), C8(171,8), C8(172,8), C8(173,8),
-    C8(174,8), C8(175,8), C8(176,8), C8(177,8), C8(178,8), C8(179,8),
-    C8(180,8), C8(181,8), C8(182,8), C8(183,8), C8(184,8), C8(185,8),
-    C8(186,8), C8(187,8), C8(188,8), C8(189,8), C8(190,8), C8(191,8),
-    C8(192,8), C8(193,8), C8(194,8), C8(195,8), C8(196,8), C8(197,8),
-    C8(198,8), C8(199,8), C8(200,8), C8(201,8), C8(202,8), C8(203,8),
-    C8(204,8), C8(205,8), C8(206,8), C8(207,8), C8(208,8), C8(209,8),
-    C8(210,8), C8(211,8), C8(212,8), C8(213,8), C8(214,8), C8(215,8),
-    C8(216,8), C8(217,8), C8(218,8), C8(219,8), C8(220,8), C8(221,8),
-    C8(222,8), C8(223,8), C8(224,8), C8(225,8), C8(226,8), C8(227,8),
-    C8(228,8), C8(229,8), C8(230,8), C8(231,8), C8(232,8), C8(233,8),
-    C8(234,8), C8(235,8), C8(236,8), C8(237,8), C8(238,8), C8(239,8),
-    C8(240,8), C8(241,8), C8(242,8), C8(243,8), C8(244,8), C8(245,8),
-    C8(246,8), C8(247,8), C8(248,8), C8(249,8), C8(250,8), C8(251,8),
-    C8(252,8), C8(253,8), C8(254,8), C8(255,8),
-};
-static const pixman_bits_t fbStipple4Bits[16] = {
-    C4(  0,16), C4(  1,16), C4(  2,16), C4(  3,16), C4(  4,16), C4(  5,16),
-    C4(  6,16), C4(  7,16), C4(  8,16), C4(  9,16), C4( 10,16), C4( 11,16),
-    C4( 12,16), C4( 13,16), C4( 14,16), C4( 15,16),};
-static const pixman_bits_t fbStipple2Bits[4] = {
-    C2(  0,32), C2(  1,32), C2(  2,32), C2(  3,32),
-};
-#define fbStipple1Bits 0
-#endif
-
-const pixman_bits_t *
-fbStippleTable(int bits)
-{
-    switch (bits) {
-    case 1:
-	return fbStipple1Bits;
-    case 2:
-	return fbStipple2Bits;
-    case 4:
-	return fbStipple4Bits;
-    case 8:
-	return fbStipple8Bits;
-    }
-    return NULL;
-}
diff --git a/pixman/src/pixman-xserver-compat.h b/pixman/src/pixman-xserver-compat.h
deleted file mode 100644
index e475f31..0000000
--- a/pixman/src/pixman-xserver-compat.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright © 2005 Red Hat, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software
- * and its documentation for any purpose is hereby granted without
- * fee, provided that the above copyright notice appear in all copies
- * and that both that copyright notice and this permission notice
- * appear in supporting documentation, and that the name of Red Hat,
- * Inc. not be used in advertising or publicity pertaining to
- * distribution of the software without specific, written prior
- * permission.  Red Hat, Inc. makes no representations about the
- * suitability of this software for any purpose.  It is provided "as
- * is" without express or implied warranty.
- *
- * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
- * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
- * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
- * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * Author: Carl Worth, Red Hat, Inc.
- */
-
-#ifndef _PIXMAN_XSERVER_COMPAT_H_
-#define _PIXMAN_XSERVER_COMPAT_H_
-
-/* This is a compatibility header file, designed to make it easier to
- * synchronize files between libpixman and the xserver repository.
- *
- * Of course, long-term we would instead like to have the X server
- * depend on libpixman to eliminate the code duplication. But for now,
- * we at least make it easy to share files.
- *
- * The libpixman code base regards the xserver repository as canonical
- * for any shared files, so changes should be pushed up there. Then,
- * to merge changes back down into libpixman, the process should be to
- * simply copy the file and to replace the block of include directives
- * with:
- *
- *	#include "pixman-xserver-compat.h"
- */
-
-/* First, include the primary internal header file for libpixman. */
-
-#include "pixmanint.h"
-
-/* Then, define any names that the server code will be expecting in
- * terms of libpixman names. */
-/*
-typedef uint8_t			CARD8;
-typedef uint16_t		CARD16;
-typedef int16_t			INT16;
-
-typedef int			Bool;
-#define FALSE 0
-#define TRUE  1
-
-typedef pixman_bits_t		FbBits;
-typedef pixman_image_t*		PicturePtr;
-typedef pixman_box16_t		BoxRec;
-typedef pixman_box16_t*		BoxPtr;
-
-typedef pixman_point_fixed_t	xPointFixed;
-typedef pixman_line_fixed_t	xLineFixed;
-typedef pixman_trapezoid_t	xTrapezoid;
-typedef pixman_triangle_t	xTriangle;
-*/
-#define RENDER 1
-/*
-#define FB_SHIFT IC_SHIFT
-#define FB_MASK IC_MASK
-#define FB_ALLONES IC_ALLONES
-#define FbMaskBits IcMaskBits
-*/
-
-/* XXX: We changed some function and field names which makes for some
- * ugly hacks... */
-#define pDrawable pixels
-#define fbGetDrawable(pDrawable, buf, outstride, outbpp, xoff, yoff) { \
-    (buf) = (pDrawable)->data; \
-    (outstride) = ((int) pDrawable->stride) / sizeof (pixman_bits_t); \
-    (outbpp) = (pDrawable)->bpp; \
-    (xoff) = 0; \
-    (yoff) = 0; \
-}
-
-/* Extended repeat attributes included in 0.10 */
-#define RepeatNone                          0
-#define RepeatNormal                        1
-#define RepeatPad                           2
-#define RepeatReflect                       3
-
-typedef pixman_vector_t PictVector;
-typedef pixman_vector_t* PictVectorPtr;
-
-#define miIndexedPtr FbIndexedPtr
-#define miIndexToEnt24 FbIndexToEnt24
-#define miIndexToEntY24 FbIndexToEntY24
-
-#define MAX_FIXED_48_16	    ((xFixed_48_16) 0x7fffffff)
-#define MIN_FIXED_48_16	    (-((xFixed_48_16) 1 << 31))
-
-/* Then, include any header files that have been copied directly
- * from xserver. */
-
-#include "renderedge.h"
-
-/* And finally, this one prototype must come after the include of
- * renderedge.h, so it can't live alongside the other prototypes in
- * the horrible mess that is pixmanint.h.
- */
-
-pixman_private void
-fbRasterizeEdges (pixman_bits_t		*buf,
-		  int			bpp,
-		  int			width,
-		  int			stride,
-		  RenderEdge		*l,
-		  RenderEdge	 	*r,
-		  pixman_fixed16_16_t	t,
-		  pixman_fixed16_16_t	b);
-
-#endif
diff --git a/pixman/src/pixmanint.h b/pixman/src/pixmanint.h
deleted file mode 100644
index a10a834..0000000
--- a/pixman/src/pixmanint.h
+++ /dev/null
@@ -1,1076 +0,0 @@
-/*
- * Copyright © 2003 Carl Worth
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Carl Worth not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Carl Worth makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * CARL WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL CARL WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _PIXMANINT_H_
-#define _PIXMANINT_H_
-
-#ifdef HAVE_CONFIG_H
-#  include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-
-#ifdef _MSC_VER
-#define snprintf _snprintf
-#undef inline
-#define inline __inline
-#endif
-
-#include "pixman.h"
-
-#undef MIN
-#define MIN(a,b) ((a) < (b) ? (a) : (b))
-#undef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-
-/* C89 has implementation-defined behavior for % with negative operands.
-   C99 has well-defined behavior which is that / with integers rounds toward zero
-       and a%b is defined so that (a/b)*b + a%b == a.
-
-   The C99 version gives negative remainders rather than the modulus
-   in [0 .. b-1] that we want. This macro avoids using % with negative
-   operands to avoid both problems.
-
-   a and b are integers. b > 0.
-*/
-#define MOD(a, b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-(a) - 1) % (b) - 1)
-
-typedef struct _FbPoint {
-	int16_t    x,y ;
-} FbPoint;
-
-typedef unsigned int	Mask;
-
-#define GXcopy		0x3
-#define GXor		0x7
-#define ClipByChildren  0
-#define PolyEdgeSharp   0
-#define PolyModePrecise 0
-#define CPClipMask      (1 << 6)
-#define CPLastBit       11
-
-/* Define any names that the server code will be expecting in
- * terms of libpixman names. */
-
-typedef uint8_t			CARD8;
-typedef uint16_t		CARD16;
-typedef uint32_t		CARD32;
-typedef int16_t			INT16;
-
-typedef int			Bool;
-#define FALSE 0
-#define TRUE  1
-
-typedef pixman_bits_t		FbBits;
-typedef pixman_image_t*		PicturePtr;
-typedef pixman_box16_t		BoxRec;
-typedef pixman_box16_t*		BoxPtr;
-
-typedef pixman_point_fixed_t	xPointFixed;
-typedef pixman_line_fixed_t	xLineFixed;
-typedef pixman_trapezoid_t	xTrapezoid;
-typedef pixman_triangle_t	xTriangle;
-
-/* These few definitions avoid me needing to include servermd.h and misc.h from Xserver/include */
-#ifndef BITMAP_SCANLINE_PAD
-#define BITMAP_SCANLINE_PAD  32
-#define LOG2_BITMAP_PAD		5
-#define LOG2_BYTES_PER_SCANLINE_PAD	2
-#endif
-
-#define LSBFirst 0
-#define MSBFirst 1
-
-#ifdef WORDS_BIGENDIAN
-#  define IMAGE_BYTE_ORDER MSBFirst
-#  define BITMAP_BIT_ORDER MSBFirst
-#else
-#  define IMAGE_BYTE_ORDER LSBFirst
-#  define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#define MAXSHORT SHRT_MAX
-#define MINSHORT SHRT_MIN
-
-/* XXX: What do we need from here?
-#include "picture.h"
-*/
-
-#include "pixman.h"
-
-/* XXX: Most of this file is straight from fb.h and I imagine we can
-   drop quite a bit of it. Once the real ic code starts to come
-   together I can probably figure out what is not needed here. */
-
-#define FB_UNIT	    (1 << FB_SHIFT)
-#define FB_HALFUNIT (1 << (FB_SHIFT-1))
-#define FB_MASK	    (FB_UNIT - 1)
-#define FB_ALLONES  ((pixman_bits_t) -1)
-
-/* whether to bother to include 24bpp support */
-#ifndef ICNO24BIT
-#define FB_24BIT
-#endif
-
-/*
- * Unless otherwise instructed, ic includes code to advertise 24bpp
- * windows with 32bpp image format for application compatibility
- */
-
-#ifdef FB_24BIT
-#ifndef ICNO24_32
-#define FB_24_32BIT
-#endif
-#endif
-
-#define FB_STIP_SHIFT	LOG2_BITMAP_PAD
-#define FB_STIP_UNIT	(1 << FB_STIP_SHIFT)
-#define FB_STIP_MASK	(FB_STIP_UNIT - 1)
-#define FB_STIP_ALLONES	((FbStip) -1)
-
-#define FB_STIP_ODDSTRIDE(s)	(((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
-#define FB_STIP_ODDPTR(p)	((((long) (p)) & (FB_MASK >> 3)) != 0)
-
-#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
-#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
-
-#define FbFullMask(n)   ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-
-typedef uint32_t	    FbStip;
-typedef int		    FbStride;
-
-#ifdef FB_DEBUG
-extern void fbValidateDrawable(DrawablePtr d);
-extern void fbInitializeDrawable(DrawablePtr d);
-extern void fbSetBits (FbStip *bits, int stride, FbStip data);
-#define FB_HEAD_BITS   (FbStip) (0xbaadf00d)
-#define FB_TAIL_BITS   (FbStip) (0xbaddf0ad)
-#else
-#define fbValidateDrawable(d)
-#define fdInitializeDrawable(d)
-#endif
-
-#if BITMAP_BIT_ORDER == LSBFirst
-#define FbScrLeft(x,n)	((x) >> (n))
-#define FbScrRight(x,n)	((x) << (n))
-/* #define FbLeftBits(x,n)	((x) & ((((FbBits) 1) << (n)) - 1)) */
-#define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
-#define FbStipMoveLsb(x,s,n)	(FbStipRight (x,(s)-(n)))
-#define FbPatternOffsetBits	0
-#else
-#define FbScrLeft(x,n)	((x) << (n))
-#define FbScrRight(x,n)	((x) >> (n))
-/* #define FbLeftBits(x,n)	((x) >> (FB_UNIT - (n))) */
-#define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
-#define FbStipMoveLsb(x,s,n)	(x)
-#define FbPatternOffsetBits	(sizeof (FbBits) - 1)
-#endif
-
-#define FbStipLeft(x,n)	FbScrLeft(x,n)
-#define FbStipRight(x,n) FbScrRight(x,n)
-
-#define FbRotLeft(x,n)	FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
-#define FbRotRight(x,n)	FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
-
-#define FbRotStipLeft(x,n)  FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
-#define FbRotStipRight(x,n)  FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
-
-#define FbLeftMask(x)	    ( ((x) & FB_MASK) ? \
-			     FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
-#define FbRightMask(x)	    ( ((FB_UNIT - (x)) & FB_MASK) ? \
-			     FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
-
-#define FbLeftStipMask(x)   ( ((x) & FB_STIP_MASK) ? \
-			     FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
-#define FbRightStipMask(x)  ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
-			     FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
-
-#define FbBitsMask(x,w)	(FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
-			 FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
-
-#define FbStipMask(x,w)	(FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
-			 FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
-
-#define FbMaskBits(x,w,l,n,r) { \
-    n = (w); \
-    r = FbRightMask((x)+n); \
-    l = FbLeftMask(x); \
-    if (l) { \
-	n -= FB_UNIT - ((x) & FB_MASK); \
-	if (n < 0) { \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	} \
-    } \
-    n >>= FB_SHIFT; \
-}
-
-#ifdef ICNOPIXADDR
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
-    *dst = FbDoMaskRRop(*dst,and,xor,l); \
-}
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
-    *dst = FbDoMaskRRop(*dst,and,xor,r); \
-}
-#else
-
-#define FbByteMaskInvalid   0x10
-
-#define FbPatternOffset(o,t)  ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
-
-#define FbPtrOffset(p,o,t)		((t *) ((CARD8 *) (p) + (o)))
-#define FbSelectPatternPart(xor,o,t)	((xor) >> (FbPatternOffset (o,t) << 3))
-#define FbStorePart(dst,off,t,xor)	(*FbPtrOffset(dst,off,t) = \
-					 FbSelectPart(xor,off,t))
-#ifndef FbSelectPart
-#define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
-#endif
-
-#define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
-    n = (w); \
-    lb = 0; \
-    rb = 0; \
-    r = FbRightMask((x)+n); \
-    if (r) { \
-	/* compute right byte length */ \
-	if ((copy) && (((x) + n) & 7) == 0) { \
-	    rb = (((x) + n) & FB_MASK) >> 3; \
-	} else { \
-	    rb = FbByteMaskInvalid; \
-	} \
-    } \
-    l = FbLeftMask(x); \
-    if (l) { \
-	/* compute left byte length */ \
-	if ((copy) && ((x) & 7) == 0) { \
-	    lb = ((x) & FB_MASK) >> 3; \
-	} else { \
-	    lb = FbByteMaskInvalid; \
-	} \
-	/* subtract out the portion painted by leftMask */ \
-	n -= FB_UNIT - ((x) & FB_MASK); \
-	if (n < 0) { \
-	    if (lb != FbByteMaskInvalid) { \
-		if (rb == FbByteMaskInvalid) { \
-		    lb = FbByteMaskInvalid; \
-		} else if (rb) { \
-		    lb |= (rb - lb) << (FB_SHIFT - 3); \
-		    rb = 0; \
-		} \
-	    } \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	}\
-    } \
-    n >>= FB_SHIFT; \
-}
-
-#if FB_SHIFT == 6
-#define FbDoLeftMaskByteRRop6Cases(dst,xor) \
-    case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 7): \
-	FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 6): \
-	FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 5): \
-	FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	break; \
-    case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 4): \
-	FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
-	break;
-
-#define FbDoRightMaskByteRRop6Cases(dst,xor) \
-    case 4: \
-	FbStorePart(dst,0,CARD32,xor); \
-	break; \
-    case 5: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD8,xor); \
-	break; \
-    case 6: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD16,xor); \
-	break; \
-    case 7: \
-	FbStorePart(dst,0,CARD32,xor); \
-	FbStorePart(dst,4,CARD16,xor); \
-	FbStorePart(dst,6,CARD8,xor); \
-	break;
-#else
-#define FbDoLeftMaskByteRRop6Cases(dst,xor)
-#define FbDoRightMaskByteRRop6Cases(dst,xor)
-#endif
-
-#define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
-    switch (lb) { \
-    FbDoLeftMaskByteRRop6Cases(dst,xor) \
-    case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
-	break; \
-    case sizeof (FbBits) - 3: \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
-    case sizeof (FbBits) - 2: \
-	FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
-	break; \
-    case sizeof (FbBits) - 1: \
-	FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
-	break; \
-    default: \
-	*dst = FbDoMaskRRop(*dst, and, xor, l); \
-	break; \
-    } \
-}
-
-#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
-    switch (rb) { \
-    case 1: \
-	FbStorePart(dst,0,CARD8,xor); \
-	break; \
-    case 2: \
-	FbStorePart(dst,0,CARD16,xor); \
-	break; \
-    case 3: \
-	FbStorePart(dst,0,CARD16,xor); \
-	FbStorePart(dst,2,CARD8,xor); \
-	break; \
-    FbDoRightMaskByteRRop6Cases(dst,xor) \
-    default: \
-	*dst = FbDoMaskRRop (*dst, and, xor, r); \
-    } \
-}
-#endif
-
-#define FbMaskStip(x,w,l,n,r) { \
-    n = (w); \
-    r = FbRightStipMask((x)+n); \
-    l = FbLeftStipMask(x); \
-    if (l) { \
-	n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
-	if (n < 0) { \
-	    n = 0; \
-	    l &= r; \
-	    r = 0; \
-	} \
-    } \
-    n >>= FB_STIP_SHIFT; \
-}
-
-/*
- * These macros are used to transparently stipple
- * in copy mode; the expected usage is with 'n' constant
- * so all of the conditional parts collapse into a minimal
- * sequence of partial word writes
- *
- * 'n' is the bytemask of which bytes to store, 'a' is the address
- * of the FbBits base unit, 'o' is the offset within that unit
- *
- * The term "lane" comes from the hardware term "byte-lane" which
- */
-
-#define FbLaneCase1(n,a,o)  ((n) == 0x01 ? \
-			     (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
-			      fgxor) : 0)
-#define FbLaneCase2(n,a,o)  ((n) == 0x03 ? \
-			     (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
-			      fgxor) : \
-			     ((void)FbLaneCase1((n)&1,a,o), \
-				    FbLaneCase1((n)>>1,a,(o)+1)))
-#define FbLaneCase4(n,a,o)  ((n) == 0x0f ? \
-			     (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
-			      fgxor) : \
-			     ((void)FbLaneCase2((n)&3,a,o), \
-				    FbLaneCase2((n)>>2,a,(o)+2)))
-#define FbLaneCase8(n,a,o)  ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
-			     ((void)FbLaneCase4((n)&15,a,o), \
-				    FbLaneCase4((n)>>4,a,(o)+4)))
-
-#if FB_SHIFT == 6
-#define FbLaneCase(n,a)   FbLaneCase8(n,(CARD8 *) (a),0)
-#endif
-
-#if FB_SHIFT == 5
-#define FbLaneCase(n,a)   FbLaneCase4(n,(CARD8 *) (a),0)
-#endif
-
-/* Rotate a filled pixel value to the specified alignement */
-#define FbRot24(p,b)	    (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
-#define FbRot24Stip(p,b)    (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
-
-/* step a filled pixel value to the next/previous FB_UNIT alignment */
-#define FbNext24Pix(p)	(FbRot24(p,(24-FB_UNIT%24)))
-#define FbPrev24Pix(p)	(FbRot24(p,FB_UNIT%24))
-#define FbNext24Stip(p)	(FbRot24(p,(24-FB_STIP_UNIT%24)))
-#define FbPrev24Stip(p)	(FbRot24(p,FB_STIP_UNIT%24))
-
-/* step a rotation value to the next/previous rotation value */
-#if FB_UNIT == 64
-#define FbNext24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
-#define FbPrev24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x)		(((x) + 8) % 24)
-#else
-#define FbFirst24Rot(x)		((x) % 24)
-#endif
-
-#endif
-
-#if FB_UNIT == 32
-#define FbNext24Rot(r)        ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24Rot(r)        ((r) == 16 ? 0 : (r) + 8)
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define FbFirst24Rot(x)		(((x) + 16) % 24)
-#else
-#define FbFirst24Rot(x)		((x) % 24)
-#endif
-#endif
-
-#define FbNext24RotStip(r)        ((r) == 0 ? 16 : (r) - 8)
-#define FbPrev24RotStip(r)        ((r) == 16 ? 0 : (r) + 8)
-
-/* Whether 24-bit specific code is needed for this filled pixel value */
-#define FbCheck24Pix(p)	((p) == FbNext24Pix(p))
-
-#define FbGetPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff) { \
-    (pointer) = icpixels->data; \
-    (_stride_) = icpixels->stride / sizeof(pixman_bits_t); \
-    (_bpp_) = icpixels->bpp; \
-    (xoff) = icpixels->x; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
-    (yoff) = icpixels->y; /* XXX: fb.h had this ifdef'd to constant 0. Why? */ \
-}
-
-#define FbGetStipPixels(icpixels, pointer, _stride_, _bpp_, xoff, yoff) { \
-    (pointer) = (FbStip *) icpixels->data; \
-    (_stride_) = icpixels->stride / sizeof(FbStip); \
-    (_bpp_) = icpixels->bpp; \
-    (xoff) = icpixels->x; \
-    (yoff) = icpixels->y; \
-}
-
-#ifdef FB_OLD_SCREEN
-#define BitsPerPixel(d) (\
-    ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
-    (PixmapWidthPaddingInfo[d].padRoundUp+1)))
-#endif
-
-#define FbPowerOfTwo(w)	    (((w) & ((w) - 1)) == 0)
-/*
- * Accelerated tiles are power of 2 width <= FB_UNIT
- */
-#define FbEvenTile(w)	    ((w) <= FB_UNIT && FbPowerOfTwo(w))
-/*
- * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
- * with dstBpp a power of 2 as well
- */
-#define FbEvenStip(w,bpp)   ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
-
-/*
- * icblt.c
- */
-pixman_private void
-fbBlt (pixman_bits_t   *src,
-       FbStride	srcStride,
-       int	srcX,
-
-       FbBits   *dst,
-       FbStride dstStride,
-       int	dstX,
-
-       int	width,
-       int	height,
-
-       int	alu,
-       FbBits	pm,
-       int	bpp,
-
-       Bool	reverse,
-       Bool	upsidedown);
-
-pixman_private void
-fbBlt24 (pixman_bits_t	    *srcLine,
-	 FbStride   srcStride,
-	 int	    srcX,
-
-	 FbBits	    *dstLine,
-	 FbStride   dstStride,
-	 int	    dstX,
-
-	 int	    width,
-	 int	    height,
-
-	 int	    alu,
-	 FbBits	    pm,
-
-	 Bool	    reverse,
-	 Bool	    upsidedown);
-
-pixman_private void
-fbBltStip (FbStip   *src,
-	   FbStride srcStride,	    /* in FbStip units, not FbBits units */
-	   int	    srcX,
-
-	   FbStip   *dst,
-	   FbStride dstStride,	    /* in FbStip units, not FbBits units */
-	   int	    dstX,
-
-	   int	    width,
-	   int	    height,
-
-	   int	    alu,
-	   FbBits   pm,
-	   int	    bpp);
-
-/*
- * icbltone.c
- */
-pixman_private void
-fbBltOne (FbStip   *src,
-	  FbStride srcStride,
-	  int	   srcX,
-	  FbBits   *dst,
-	  FbStride dstStride,
-	  int	   dstX,
-	  int	   dstBpp,
-
-	  int	   width,
-	  int	   height,
-
-	  FbBits   fgand,
-	  FbBits   fbxor,
-	  FbBits   bgand,
-	  FbBits   bgxor);
-
-#ifdef FB_24BIT
-pixman_private void
-fbBltOne24 (FbStip    *src,
-	  FbStride  srcStride,	    /* FbStip units per scanline */
-	  int	    srcX,	    /* bit position of source */
-	  FbBits    *dst,
-	  FbStride  dstStride,	    /* FbBits units per scanline */
-	  int	    dstX,	    /* bit position of dest */
-	  int	    dstBpp,	    /* bits per destination unit */
-
-	  int	    width,	    /* width in bits of destination */
-	  int	    height,	    /* height in scanlines */
-
-	  FbBits    fgand,	    /* rrop values */
-	  FbBits    fgxor,
-	  FbBits    bgand,
-	  FbBits    bgxor);
-#endif
-
-/*
- * icstipple.c
- */
-
-pixman_private void
-fbTransparentSpan (pixman_bits_t   *dst,
-		   pixman_bits_t   stip,
-		   pixman_bits_t   fgxor,
-		   int	    n);
-
-pixman_private void
-fbEvenStipple (pixman_bits_t   *dst,
-	       FbStride dstStride,
-	       int	dstX,
-	       int	dstBpp,
-
-	       int	width,
-	       int	height,
-
-	       FbStip   *stip,
-	       FbStride	stipStride,
-	       int	stipHeight,
-
-	       FbBits   fgand,
-	       FbBits   fgxor,
-	       FbBits   bgand,
-	       FbBits   bgxor,
-
-	       int	xRot,
-	       int	yRot);
-
-pixman_private void
-fbOddStipple (pixman_bits_t	*dst,
-	      FbStride	dstStride,
-	      int	dstX,
-	      int	dstBpp,
-
-	      int	width,
-	      int	height,
-
-	      FbStip	*stip,
-	      FbStride	stipStride,
-	      int	stipWidth,
-	      int	stipHeight,
-
-	      FbBits	fgand,
-	      FbBits	fgxor,
-	      FbBits	bgand,
-	      FbBits	bgxor,
-
-	      int	xRot,
-	      int	yRot);
-
-pixman_private void
-fbStipple (pixman_bits_t   *dst,
-	   FbStride dstStride,
-	   int	    dstX,
-	   int	    dstBpp,
-
-	   int	    width,
-	   int	    height,
-
-	   FbStip   *stip,
-	   FbStride stipStride,
-	   int	    stipWidth,
-	   int	    stipHeight,
-	   Bool	    even,
-
-	   FbBits   fgand,
-	   FbBits   fgxor,
-	   FbBits   bgand,
-	   FbBits   bgxor,
-
-	   int	    xRot,
-	   int	    yRot);
-
-typedef struct _FbPixels {
-    pixman_bits_t		*data;
-    unsigned int	width;
-    unsigned int	height;
-    unsigned int	depth;
-    unsigned int	bpp;
-    unsigned int	stride;
-    int			x;
-    int			y;
-    unsigned int	refcnt;
-} FbPixels;
-
-/* XXX: This is to avoid including colormap.h from the server includes */
-typedef uint32_t Pixel;
-
-/* icutil.c */
-pixman_private pixman_bits_t
-fbReplicatePixel (Pixel p, int bpp);
-
-/* fbtrap.c */
-
-pixman_private void
-fbRasterizeTrapezoid (pixman_image_t		*pMask,
-		      const pixman_trapezoid_t  *pTrap,
-		      int		x_off,
-		      int		y_off);
-
-/* XXX: This is to avoid including gc.h from the server includes */
-/* clientClipType field in GC */
-#define CT_NONE			0
-/* #define CT_PIXMAP		1 (not used anymore) */
-#define CT_REGION		2
-#define CT_UNSORTED		6
-#define CT_YSORTED		10
-#define CT_YXSORTED		14
-#define CT_YXBANDED		18
-
-#include "icimage.h"
-
-/* iccolor.c */
-
-/* GCC 3.4 supports a "population count" builtin, which on many targets is
-   implemented with a single instruction.  There is a fallback definition
-   in libgcc in case a target does not have one, which should be just as
-   good as the static function below.  */
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-static inline int
-_FbOnes(unsigned int mask)
-{
-	return __builtin_popcount(mask);
-}
-#else
-# define ICINT_NEED_IC_ONES
-pixman_private int
-_FbOnes(unsigned int mask);
-#endif
-
-/* icformat.c */
-
-pixman_private void
-pixman_format_init_code (pixman_format_t *format, int format_code);
-
-/* icimage.c */
-
-pixman_private pixman_image_t *
-pixman_image_createForPixels (FbPixels	*pixels,
-			pixman_format_t	*format);
-
-pixman_private uint32_t
-pixman_gradient_color (pixman_gradient_stop_t *stop1,
-		       pixman_gradient_stop_t *stop2,
-		       uint32_t		      x);
-
-#define PictureGradientColor pixman_gradient_color
-
-/* icpixels.c */
-
-pixman_private FbPixels *
-FbPixelsCreate (int width, int height, int depth);
-
-pixman_private FbPixels *
-FbPixelsCreateForData (pixman_bits_t *data, int width, int height, int depth, int bpp, int stride);
-
-pixman_private void
-FbPixelsDestroy (FbPixels *pixels);
-
-/* ictransform.c */
-
-pixman_private int
-pixman_transform_point (pixman_transform_t	*transform,
-		  pixman_vector_t	*vector);
-
-#include "icrop.h"
-
-/* XXX: For now, I'm just wholesale pasting Xserver/render/picture.h here: */
-#ifndef _PICTURE_H_
-#define _PICTURE_H_
-
-typedef struct _DirectFormat	*DirectFormatPtr;
-typedef struct _PictFormat	*PictFormatPtr;
-
-/*
- * While the protocol is generous in format support, the
- * sample implementation allows only packed RGB and GBR
- * representations for data to simplify software rendering,
- */
-#define PICT_FORMAT(bpp,type,a,r,g,b)	(((bpp) << 24) |  \
-					 ((type) << 16) | \
-					 ((a) << 12) | \
-					 ((r) << 8) | \
-					 ((g) << 4) | \
-					 ((b)))
-
-/*
- * gray/color formats use a visual index instead of argb
- */
-#define PICT_VISFORMAT(bpp,type,vi)	(((bpp) << 24) |  \
-					 ((type) << 16) | \
-					 ((vi)))
-
-#define PICT_FORMAT_BPP(f)	(((f) >> 24)       )
-#define PICT_FORMAT_TYPE(f)	(((f) >> 16) & 0xff)
-#define PICT_FORMAT_A(f)	(((f) >> 12) & 0x0f)
-#define PICT_FORMAT_R(f)	(((f) >>  8) & 0x0f)
-#define PICT_FORMAT_G(f)	(((f) >>  4) & 0x0f)
-#define PICT_FORMAT_B(f)	(((f)      ) & 0x0f)
-#define PICT_FORMAT_RGB(f)	(((f)      ) & 0xfff)
-#define PICT_FORMAT_VIS(f)	(((f)      ) & 0xffff)
-
-#define PICT_TYPE_OTHER	0
-#define PICT_TYPE_A	1
-#define PICT_TYPE_ARGB	2
-#define PICT_TYPE_ABGR	3
-#define PICT_TYPE_COLOR	4
-#define PICT_TYPE_GRAY	5
-
-#define PICT_FORMAT_COLOR(f)	(PICT_FORMAT_TYPE(f) & 2)
-
-/* 32bpp formats */
-#define PICT_a8r8g8b8	PICT_FORMAT(32,PICT_TYPE_ARGB,8,8,8,8)
-#define PICT_x8r8g8b8	PICT_FORMAT(32,PICT_TYPE_ARGB,0,8,8,8)
-#define PICT_a8b8g8r8	PICT_FORMAT(32,PICT_TYPE_ABGR,8,8,8,8)
-#define PICT_x8b8g8r8	PICT_FORMAT(32,PICT_TYPE_ABGR,0,8,8,8)
-
-/* 24bpp formats */
-#define PICT_r8g8b8	PICT_FORMAT(24,PICT_TYPE_ARGB,0,8,8,8)
-#define PICT_b8g8r8	PICT_FORMAT(24,PICT_TYPE_ABGR,0,8,8,8)
-
-/* 16bpp formats */
-#define PICT_r5g6b5	PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,6,5)
-#define PICT_b5g6r5	PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,6,5)
-
-#define PICT_a1r5g5b5	PICT_FORMAT(16,PICT_TYPE_ARGB,1,5,5,5)
-#define PICT_x1r5g5b5	PICT_FORMAT(16,PICT_TYPE_ARGB,0,5,5,5)
-#define PICT_a1b5g5r5	PICT_FORMAT(16,PICT_TYPE_ABGR,1,5,5,5)
-#define PICT_x1b5g5r5	PICT_FORMAT(16,PICT_TYPE_ABGR,0,5,5,5)
-#define PICT_a4r4g4b4	PICT_FORMAT(16,PICT_TYPE_ARGB,4,4,4,4)
-#define PICT_x4r4g4b4	PICT_FORMAT(16,PICT_TYPE_ARGB,0,4,4,4)
-#define PICT_a4b4g4r4	PICT_FORMAT(16,PICT_TYPE_ABGR,4,4,4,4)
-#define PICT_x4b4g4r4	PICT_FORMAT(16,PICT_TYPE_ABGR,0,4,4,4)
-
-/* 8bpp formats */
-#define PICT_a8		PICT_FORMAT(8,PICT_TYPE_A,8,0,0,0)
-#define PICT_r3g3b2	PICT_FORMAT(8,PICT_TYPE_ARGB,0,3,3,2)
-#define PICT_b2g3r3	PICT_FORMAT(8,PICT_TYPE_ABGR,0,3,3,2)
-#define PICT_a2r2g2b2	PICT_FORMAT(8,PICT_TYPE_ARGB,2,2,2,2)
-#define PICT_a2b2g2r2	PICT_FORMAT(8,PICT_TYPE_ABGR,2,2,2,2)
-
-#define PICT_c8		PICT_FORMAT(8,PICT_TYPE_COLOR,0,0,0,0)
-#define PICT_g8		PICT_FORMAT(8,PICT_TYPE_GRAY,0,0,0,0)
-
-/* 4bpp formats */
-#define PICT_a4		PICT_FORMAT(4,PICT_TYPE_A,4,0,0,0)
-#define PICT_r1g2b1	PICT_FORMAT(4,PICT_TYPE_ARGB,0,1,2,1)
-#define PICT_b1g2r1	PICT_FORMAT(4,PICT_TYPE_ABGR,0,1,2,1)
-#define PICT_a1r1g1b1	PICT_FORMAT(4,PICT_TYPE_ARGB,1,1,1,1)
-#define PICT_a1b1g1r1	PICT_FORMAT(4,PICT_TYPE_ABGR,1,1,1,1)
-
-#define PICT_c4		PICT_FORMAT(4,PICT_TYPE_COLOR,0,0,0,0)
-#define PICT_g4		PICT_FORMAT(4,PICT_TYPE_GRAY,0,0,0,0)
-
-/* 1bpp formats */
-#define PICT_a1		PICT_FORMAT(1,PICT_TYPE_A,1,0,0,0)
-
-#define PICT_g1		PICT_FORMAT(1,PICT_TYPE_GRAY,0,0,0,0)
-
-/*
- * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
- * selection of colors allocated for drawing to Pictures.  The default
- * policy depends on the size of the colormap:
- *
- * Size		Default Policy
- * ----------------------------
- *  < 64	PolicyMono
- *  < 256	PolicyGray
- *  256		PolicyColor (only on PseudoColor)
- *
- * The actual allocation code lives in miindex.c, and so is
- * austensibly server dependent, but that code does:
- *
- * PolicyMono	    Allocate no additional colors, use black and white
- * PolicyGray	    Allocate 13 gray levels (11 cells used)
- * PolicyColor	    Allocate a 4x4x4 cube and 13 gray levels (71 cells used)
- * PolicyAll	    Allocate as big a cube as possible, fill with gray (all)
- *
- * Here's a picture to help understand how many colors are
- * actually allocated (this is just the gray ramp):
- *
- *                 gray level
- * all   0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff
- * b/w   0000                                                        ffff
- * 4x4x4                     5555                aaaa
- * extra      1555 2aaa 4000      6aaa 8000 9555      bfff d555 eaaa
- *
- * The default colormap supplies two gray levels (black/white), the
- * 4x4x4 cube allocates another two and nine more are allocated to fill
- * in the 13 levels.  When the 4x4x4 cube is not allocated, a total of
- * 11 cells are allocated.
- */
-
-#define PictureCmapPolicyInvalid    -1
-#define PictureCmapPolicyDefault    0
-#define PictureCmapPolicyMono	    1
-#define PictureCmapPolicyGray	    2
-#define PictureCmapPolicyColor	    3
-#define PictureCmapPolicyAll	    4
-
-extern pixman_private int PictureCmapPolicy;
-
-int	PictureParseCmapPolicy (const char *name);
-
-/* Fixed point updates from Carl Worth, USC, Information Sciences Institute */
-
-#ifdef WIN32
-typedef __int64		xFixed_32_32;
-#else
-#  if defined(__alpha__) || defined(__alpha) || \
-      defined(ia64) || defined(__ia64__) || \
-      defined(__sparc64__) || \
-      defined(__s390x__) || \
-      defined(x86_64) || defined (__x86_64__)
-typedef long		xFixed_32_32;
-# else
-#  if defined(__GNUC__) && \
-    ((__GNUC__ > 2) || \
-     ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ > 7)))
-__extension__
-#  endif
-typedef long long int	xFixed_32_32;
-# endif
-#endif
-
-typedef xFixed_32_32		xFixed_48_16;
-typedef uint32_t		xFixed_1_31;
-typedef uint32_t		xFixed_1_16;
-typedef int32_t		xFixed_16_16;
-
-/*
- * An unadorned "xFixed" is the same as xFixed_16_16,
- * (since it's quite common in the code)
- */
-typedef	xFixed_16_16	xFixed;
-#define XFIXED_BITS	16
-
-#define xFixedToInt(f)	(int) ((f) >> XFIXED_BITS)
-#define IntToxFixed(i)	((xFixed) (i) << XFIXED_BITS)
-#define xFixedE		((xFixed) 1)
-#define xFixed1		(IntToxFixed(1))
-#define xFixedToDouble(f) (double) ((f) / (double) xFixed1)
-#define xFixed1MinusE	(xFixed1 - xFixedE)
-#define xFixedFrac(f)	((f) & xFixed1MinusE)
-#define xFixedFloor(f)	((f) & ~xFixed1MinusE)
-#define xFixedCeil(f)	xFixedFloor((f) + xFixed1MinusE)
-
-#define xFixedFraction(f)	((f) & xFixed1MinusE)
-#define xFixedMod2(f)		((f) & (xFixed1 | xFixed1MinusE))
-
-/* whether 't' is a well defined not obviously empty trapezoid */
-#define xTrapezoidValid(t)  ((t)->left.p1.y != (t)->left.p2.y && \
-			     (t)->right.p1.y != (t)->right.p2.y && \
-			     (int) ((t)->bottom - (t)->top) > 0)
-
-/*
- * Standard NTSC luminance conversions:
- *
- *  y = r * 0.299 + g * 0.587 + b * 0.114
- *
- * Approximate this for a bit more speed:
- *
- *  y = (r * 153 + g * 301 + b * 58) / 512
- *
- * This gives 17 bits of luminance; to get 15 bits, lop the low two
- */
-
-#define CvtR8G8B8toY15(s)	(((((s) >> 16) & 0xff) * 153 + \
-				  (((s) >>  8) & 0xff) * 301 + \
-				  (((s)      ) & 0xff) * 58) >> 2)
-
-#endif /* _PICTURE_H_ */
-
-/* Macros needed by fbpict.c */
-
-#define cvt8888to0565(s)    ((((s) >> 3) & 0x001f) | \
-			     (((s) >> 5) & 0x07e0) | \
-			     (((s) >> 8) & 0xf800))
-#define cvt0565to0888(s)    (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
-			     ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
-			     ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
-
-#if IMAGE_BYTE_ORDER == MSBFirst
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \
-		     ((*((CARD16 *) (a)) << 8) | *((a)+2)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) ((v) >> 16)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \
-		       (*((a)+2) = (CARD8) (v))))
-#else
-#define Fetch24(a)  ((unsigned long) (a) & 1 ? \
-		     ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \
-		     ((*((CARD16 *) (a))) | (*((a)+2) << 16)))
-#define Store24(a,v) ((unsigned long) (a) & 1 ? \
-		      ((*(a) = (CARD8) (v)), \
-		       (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \
-		      ((*((CARD16 *) (a)) = (CARD16) (v)),\
-		       (*((a)+2) = (CARD8) ((v) >> 16))))
-#endif
-
-#endif /* _PIXMANINT_H_ */
diff --git a/pixman/src/pixregionint.h b/pixman/src/pixregionint.h
deleted file mode 100644
index 385a7f2..0000000
--- a/pixman/src/pixregionint.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/***********************************************************
-
-Copyright 1987, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
-
-                        All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Digital not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifndef _PIXREGIONINT_H_
-#define _PIXREGIONINT_H_
-
-#include "pixman.h"
-
-struct pixman_region16_data {
-    long		size;
-    long		numRects;
-    /* XXX: And why, exactly, do we have this bogus struct definition? */
-/*  pixman_box16_t	rects[size];   in memory but not explicitly declared */
-};
-
-typedef struct pixman_region16_point {
-    int x, y;
-} pixman_region16_point_t;
-
-#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
-/* not a region */
-#define PIXREGION_NAR(reg)	((reg)->data == &pixman_brokendata)
-#define PIXREGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
-#define PIXREGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0)
-#define PIXREGION_RECTS(reg) ((reg)->data ? (pixman_box16_t *)((reg)->data + 1) \
-			               : &(reg)->extents)
-#define PIXREGION_BOXPTR(reg) ((pixman_box16_t *)((reg)->data + 1))
-#define PIXREGION_BOX(reg,i) (&PIXREGION_BOXPTR(reg)[i])
-#define PIXREGION_TOP(reg) PIXREGION_BOX(reg, (reg)->data->numRects)
-#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->numRects - 1)
-#define PIXREGION_SZOF(n) (sizeof(pixman_region16_data_t) + ((n) * sizeof(pixman_box16_t)))
-
-#endif /* _PIXREGIONINT_H_ */
diff --git a/pixman/src/renderedge.c b/pixman/src/renderedge.c
deleted file mode 100644
index 47d08c6..0000000
--- a/pixman/src/renderedge.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include "pixmanint.h"
-
-#include "pixman-xserver-compat.h"
-
-/*
- * Compute the smallest value no less than y which is on a
- * grid row
- */
-
-xFixed
-RenderSampleCeilY (xFixed y, int n)
-{
-    xFixed   f = xFixedFrac(y);
-    xFixed   i = xFixedFloor(y);
-
-    f = ((f + Y_FRAC_FIRST(n)) / STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
-    if (f > Y_FRAC_LAST(n))
-    {
-	f = Y_FRAC_FIRST(n);
-	i += xFixed1;
-    }
-    return (i | f);
-}
-
-#define _div(a,b)    ((a) >= 0 ? (a) / (b) : -((-(a) + (b) - 1) / (b)))
-
-/*
- * Compute the largest value no greater than y which is on a
- * grid row
- */
-xFixed
-RenderSampleFloorY (xFixed y, int n)
-{
-    xFixed   f = xFixedFrac(y);
-    xFixed   i = xFixedFloor (y);
-
-    f = _div(f - Y_FRAC_FIRST(n), STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
-    if (f < Y_FRAC_FIRST(n))
-    {
-	f = Y_FRAC_LAST(n);
-	i -= xFixed1;
-    }
-    return (i | f);
-}
-
-/*
- * Step an edge by any amount (including negative values)
- */
-void
-RenderEdgeStep (RenderEdge *e, int n)
-{
-    xFixed_48_16	ne;
-
-    e->x += n * e->stepx;
-
-    ne = e->e + n * (xFixed_48_16) e->dx;
-
-    if (n >= 0)
-    {
-	if (ne > 0)
-	{
-	    int nx = (ne + e->dy - 1) / e->dy;
-	    e->e = ne - nx * (xFixed_48_16) e->dy;
-	    e->x += nx * e->signdx;
-	}
-    }
-    else
-    {
-	if (ne <= -e->dy)
-	{
-	    int nx = (-ne) / e->dy;
-	    e->e = ne + nx * (xFixed_48_16) e->dy;
-	    e->x -= nx * e->signdx;
-	}
-    }
-}
-
-/*
- * A private routine to initialize the multi-step
- * elements of an edge structure
- */
-static void
-_RenderEdgeMultiInit (RenderEdge *e, int n, xFixed *stepx_p, xFixed *dx_p)
-{
-    xFixed	stepx;
-    xFixed_48_16	ne;
-
-    ne = n * (xFixed_48_16) e->dx;
-    stepx = n * e->stepx;
-    if (ne > 0)
-    {
-	int nx = ne / e->dy;
-	ne -= nx * e->dy;
-	stepx += nx * e->signdx;
-    }
-    *dx_p = ne;
-    *stepx_p = stepx;
-}
-
-/*
- * Initialize one edge structure given the line endpoints and a
- * starting y value
- */
-void
-RenderEdgeInit (RenderEdge	*e,
-		int		n,
-		xFixed		y_start,
-		xFixed		x_top,
-		xFixed		y_top,
-		xFixed		x_bot,
-		xFixed		y_bot)
-{
-    xFixed	dx, dy;
-
-    e->x = x_top;
-    e->e = 0;
-    dx = x_bot - x_top;
-    dy = y_bot - y_top;
-    e->dy = dy;
-    if (dy)
-    {
-	if (dx >= 0)
-	{
-	    e->signdx = 1;
-	    e->stepx = dx / dy;
-	    e->dx = dx % dy;
-	    e->e = -dy;
-	}
-	else
-	{
-	    e->signdx = -1;
-	    e->stepx = -(-dx / dy);
-	    e->dx = -dx % dy;
-	    e->e = 0;
-	}
-
-	_RenderEdgeMultiInit (e, STEP_Y_SMALL(n), &e->stepx_small, &e->dx_small);
-	_RenderEdgeMultiInit (e, STEP_Y_BIG(n), &e->stepx_big, &e->dx_big);
-    }
-    RenderEdgeStep (e, y_start - y_top);
-}
-
-/*
- * Initialize one edge structure given a line, starting y value
- * and a pixel offset for the line
- */
-void
-RenderLineFixedEdgeInit (RenderEdge *e,
-			 int	    n,
-			 xFixed	    y,
-			 const xLineFixed *line,
-			 int	    x_off,
-			 int	    y_off)
-{
-    xFixed	x_off_fixed = IntToxFixed(x_off);
-    xFixed	y_off_fixed = IntToxFixed(y_off);
-    const xPointFixed *top, *bot;
-
-    if (line->p1.y <= line->p2.y)
-    {
-	top = &line->p1;
-	bot = &line->p2;
-    }
-    else
-    {
-	top = &line->p2;
-	bot = &line->p1;
-    }
-    RenderEdgeInit (e, n, y,
-		    top->x + x_off_fixed,
-		    top->y + y_off_fixed,
-		    bot->x + x_off_fixed,
-		    bot->y + y_off_fixed);
-}
diff --git a/pixman/src/renderedge.h b/pixman/src/renderedge.h
deleted file mode 100644
index 55561ea..0000000
--- a/pixman/src/renderedge.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright © 2004 Keith Packard
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation, and that the name of Keith Packard not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission.  Keith Packard makes no
- * representations about the suitability of this software for any purpose.  It
- * is provided "as is" without express or implied warranty.
- *
- * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _RENDEREDGE_H_
-#define _RENDEREDGE_H_
-
-#include "pixman-xserver-compat.h"
-
-/* Here is a drawing of the sample grid for the 4-bit alpha case,
-   along with indications of the various defined terms:
-
-                STEP_Y_SMALL
-┌─────┬─────┬─────┐  ↓
-│•••••│•••••│•••••│ ─── ⟵── Y_FRAC_FIRST
-│•••••│•••••│•••••│ ───
-│•••••│•••••│•••••│  ↑  ⟵── Y_FRAC_LAST
-├─────┼─────┼─────┤
-│•••••│•••••│•••••│
-│•••••│•••••│•••••│  ↓
-│•••••│•••••│•••••│ ───
-├─────┼─────┼─────┤ STEP_Y_BIG
-│•••••│•••••│•••••│ ───
-│•••••│•••••│•••••│  ↑
-│•••••│•••••│•••••│
-└─────┴─────┴─────┘
- │   │ ││ ⟶│ │⟵STEP_X_BIG
- │   │⟶││⟵STEP_X_SMALL
- │   │
- │   └ X_FRAC_LAST
- │
- â”” X_FRAC_FIRST
-
-N = 4 		(# of bits of alpha)
-MAX_ALPHA = 15	(# of samples per pixel)
-N_X_FRAC = 5	(# of sample columns per pixel)
-N_Y_FRAC = 3	(# of sample rows per column)
-STEP_X_SMALL	(distance between sample columns within a pixel)
-STEP_X_BIG	(distance between sample columns across pixel boundaries)
-STEP_Y_SMALL	(distance between sample rows within a pixel)
-STEP_Y_BIG	(distance between sample rows across pixel boundaries)
-X_FRAC_FIRST	(sub-pixel position of first sample column in pixel)
-X_FRAC_LAST	(sub-pixel position of last  sample column in pixel)
-Y_FRAC_FIRST	(sub-pixel position of first sample row in pixel)
-Y_FRAC_LAST	(sub-pixel position of last  sample row pixel)
-
-*/
-
-#define MAX_ALPHA(n)	((1 << (n)) - 1)
-#define N_Y_FRAC(n)	((n) == 1 ? 1 : (1 << ((n)/2)) - 1)
-#define N_X_FRAC(n)	((1 << ((n)/2)) + 1)
-
-#define STEP_Y_SMALL(n)	(xFixed1 / N_Y_FRAC(n))
-#define STEP_Y_BIG(n)	(xFixed1 - (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
-
-#define Y_FRAC_FIRST(n)	(STEP_Y_SMALL(n) / 2)
-#define Y_FRAC_LAST(n)	(Y_FRAC_FIRST(n) + (N_Y_FRAC(n) - 1) * STEP_Y_SMALL(n))
-
-#define STEP_X_SMALL(n)	(xFixed1 / N_X_FRAC(n))
-#define STEP_X_BIG(n)	(xFixed1 - (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
-
-#define X_FRAC_FIRST(n)	(STEP_X_SMALL(n) / 2)
-#define X_FRAC_LAST(n)	(X_FRAC_FIRST(n) + (N_X_FRAC(n) - 1) * STEP_X_SMALL(n))
-
-#define RenderSamplesX(x,n)	((n) == 1 ? 0 : (xFixedFrac (x) + X_FRAC_FIRST(n)) / STEP_X_SMALL(n))
-
-/*
- * An edge structure.  This represents a single polygon edge
- * and can be quickly stepped across small or large gaps in the
- * sample grid
- */
-
-typedef struct {
-    xFixed   x;
-    xFixed   e;
-    xFixed   stepx;
-    xFixed   signdx;
-    xFixed   dy;
-    xFixed   dx;
-
-    xFixed   stepx_small;
-    xFixed   stepx_big;
-    xFixed   dx_small;
-    xFixed   dx_big;
-} RenderEdge;
-
-/*
- * Step across a small sample grid gap
- */
-#define RenderEdgeStepSmall(edge) { \
-    (edge)->x += (edge)->stepx_small;   \
-    (edge)->e += (edge)->dx_small;	    \
-    if ((edge)->e > 0)		    \
-    {				    \
-	(edge)->e -= (edge)->dy;	    \
-	(edge)->x += (edge)->signdx;    \
-    }				    \
-}
-
-/*
- * Step across a large sample grid gap
- */
-#define RenderEdgeStepBig(edge) {   \
-    (edge)->x += (edge)->stepx_big;	    \
-    (edge)->e += (edge)->dx_big;	    \
-    if ((edge)->e > 0)		    \
-    {				    \
-	(edge)->e -= (edge)->dy;	    \
-	(edge)->x += (edge)->signdx;    \
-    }				    \
-}
-
-pixman_private xFixed
-RenderSampleCeilY (xFixed y, int bpp);
-
-pixman_private xFixed
-RenderSampleFloorY (xFixed y, int bpp);
-
-pixman_private void
-RenderEdgeStep (RenderEdge *e, int n);
-
-pixman_private void
-RenderEdgeInit (RenderEdge	*e,
-		int		bpp,
-		xFixed		y_start,
-		xFixed		x_top,
-		xFixed		y_top,
-		xFixed		x_bot,
-		xFixed		y_bot);
-
-pixman_private void
-RenderLineFixedEdgeInit (RenderEdge *e,
-			 int	    bpp,
-			 xFixed	    y,
-			 const pixman_line_fixed_t *line,
-			 int	    x_off,
-			 int	    y_off);
-
-#endif /* _RENDEREDGE_H_ */
diff --git a/pixman/update.pl b/pixman/update.pl
deleted file mode 100644
index eb3ae33..0000000
--- a/pixman/update.pl
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/perl -pi~
-#
-# Helper script to update source code from the
-# libpixregion/libic functions, types, enums names to the libpixman names
-#
-# USAGE: perl update.pl FILES
-#
-# for example: perl fix.pl src/*.[ch]
-#
-# Dave Beckett 2003-12-10
-#
-
-# This order is significant.
-
-# Firstly, do special cases
-s/PixRegionBox/pixman_box16_t/g;
-s/PixRegionPointInRegion/pixman_region_contains_point/g;
-s/PixRegionRectIn/pixman_region_contains_rectangle/g;
-
-# second, enum values
-s/PixRegionStatusFailure/PIXMAN_REGION_STATUS_FAILURE/g;
-s/PixRegionStatusSuccess/PIXMAN_REGION_STATUS_SUCCESS/g;
-s/IcOperatorOverReverse/PIXMAN_OPERATOR_OVER_REVERSE/g;
-s/IcOperatorAtopReverse/PIXMAN_OPERATOR_ATOP_REVERSE/g;
-s/IcOperatorOutReverse/PIXMAN_OPERATOR_OUT_REVERSE/g;
-s/IcOperatorInReverse/PIXMAN_OPERATOR_IN_REVERSE/g;
-s/IcOperatorSaturate/PIXMAN_OPERATOR_SATURATE/g;
-s/IcFormatNameARGB32/PIXMAN_FORMAT_NAME_AR_GB32/g;
-s/IcFormatNameRGB24/PIXMAN_FORMAT_NAME_RG_B24/g;
-s/IcFilterBilinear/PIXMAN_FILTER_BILINEAR/g;
-s/IcOperatorClear/PIXMAN_OPERATOR_CLEAR/g;
-s/IcFilterNearest/PIXMAN_FILTER_NEAREST/g;
-s/IcOperatorOver/PIXMAN_OPERATOR_OVER/g;
-s/IcOperatorAtop/PIXMAN_OPERATOR_ATOP/g;
-s/IcFormatNameA8/PIXMAN_FORMAT_NAME_A8/g;
-s/IcFormatNameA1/PIXMAN_FORMAT_NAME_A1/g;
-s/IcOperatorSrc/PIXMAN_OPERATOR_SRC/g;
-s/IcOperatorDst/PIXMAN_OPERATOR_DST/g;
-s/IcOperatorOut/PIXMAN_OPERATOR_OUT/g;
-s/IcOperatorXor/PIXMAN_OPERATOR_XOR/g;
-s/IcOperatorAdd/PIXMAN_OPERATOR_ADD/g;
-s/IcOperatorIn/PIXMAN_OPERATOR_IN/g;
-s/IcFilterFast/PIXMAN_FILTER_FAST/g;
-s/IcFilterGood/PIXMAN_FILTER_GOOD/g;
-s/IcFilterBest/PIXMAN_FILTER_BEST/g;
-
-# next enum types (shorter names than above and may prefix them)
-s/IcBits/pixman_bits_t/g;
-s/IcColor/pixman_color_t/g;
-s/IcFixed16_16/pixman_fixed16_16_t/g;
-s/IcFormat/pixman_format_t/g;
-s/IcImage/pixman_image_t/g;
-s/IcLineFixed/pixman_line_fixed_t/g;
-s/IcPointFixed/pixman_point_fixed_t/g;
-s/IcRectangle/pixman_rectangle_t/g;
-s/IcTransform/pixman_transform_t/g;
-s/IcTrapezoid/pixman_trapezoid_t/g;
-s/IcTriangle/pixman_triangle_t/g;
-s/IcVector/pixman_vector_t/g;
-s/IcOperator/pixman_operator_t/g;
-s/IcFilter/pixman_filter_t/g;
-s/IcFormatName/pixman_format_name_t/g;
-s/PixRegionStatus/pixman_region_status_t/g;
-
-# functions (which also may have the type name)
-s/PixRegionAppend/pixman_region_append/g;
-s/PixRegionCopy/pixman_region_copy/g;
-s/PixRegionCreate/pixman_region_create/g;
-s/PixRegionCreateSimple/pixman_region_create_simple/g;
-s/PixRegionDestroy/pixman_region_destroy/g;
-s/PixRegionEmpty/pixman_region_empty/g;
-s/PixRegionExtents/pixman_region_extents/g;
-s/PixRegionIntersect/pixman_region_intersect/g;
-s/PixRegionInverse/pixman_region_inverse/g;
-s/PixRegionNotEmpty/pixman_region_not_empty/g;
-s/PixRegionNumRects/pixman_region_num_rects/g;
-s/PixRegionPointInRegion/pixman_region_point_in_region/g;
-s/PixRegionRectIn/pixman_region_rect_in/g;
-s/PixRegionRects/pixman_region_rects/g;
-s/PixRegionReset/pixman_region_reset/g;
-s/PixRegionSubtract/pixman_region_subtract/g;
-s/PixRegionTranslate/pixman_region_translate/g;
-s/PixRegionUnion/pixman_region_union/g;
-s/PixRegionUnionRect/pixman_region_union_rect/g;
-s/PixRegionValidate/pixman_region_validate/g;
-s/IcColorToPixel/pixman_color_to_pixel/g;
-s/IcComposite/pixman_composite/g;
-s/IcCompositeTrapezoids/pixman_composite_trapezoids/g;
-s/IcCompositeTriFan/pixman_composite_tri_fan/g;
-s/IcCompositeTriStrip/pixman_composite_tri_strip/g;
-s/IcCompositeTriangles/pixman_composite_triangles/g;
-s/IcFillRectangle/pixman_fill_rectangle/g;
-s/IcFillRectangles/pixman_fill_rectangles/g;
-s/IcFormatCreate/pixman_format_create/g;
-s/IcFormatCreateMasks/pixman_format_create_masks/g;
-s/IcFormatDestroy/pixman_format_destroy/g;
-s/IcImageCreate/pixman_image_create/g;
-s/IcImageCreateForData/pixman_image_create_for_data/g;
-s/IcImageDestroy/pixman_image_destroy/g;
-s/IcImageGetData/pixman_image_get_data/g;
-s/IcImageGetDepth/pixman_image_get_depth/g;
-s/IcImageGetHeight/pixman_image_get_height/g;
-s/IcImageGetStride/pixman_image_get_stride/g;
-s/IcImageGetWidth/pixman_image_get_width/g;
-s/IcImageSetClipRegion/pixman_image_set_clip_region/g;
-s/IcImageSetFilter/pixman_image_set_filter/g;
-s/IcImageSetRepeat/pixman_image_set_repeat/g;
-s/IcImageSetTransform/pixman_image_set_transform/g;
-s/IcPixelToColor/pixman_pixel_to_color/g;
-# finally the type that is the most generic
-s/PixRegion/pixman_region16_t/g;
-
-# correct over-eager renames made above
-s/pixman_bits_tPerPixel/pixman_bits_per_pixel/g;
-s/pixman_color_tToPixel/pixman_color_to_pixel/g;
-s/pixman_format_tCreate/pixman_format_create/g;
-s/pixman_format_tCreateMasks/pixman_format_create_masks/g;
-s/pixman_format_tDestroy/pixman_format_destroy/g;
-s/pixman_format_tInit/pixman_format_init/g;
-s/pixman_image_tCreate/pixman_image_create/g;
-s/pixman_image_tCreateForData/pixman_image_create_for_data/g;
-s/pixman_image_tCreateForPixels/pixman_image_create_for_pixels/g;
-s/pixman_image_tDestroy/pixman_image_destroy/g;
-s/pixman_image_tDestroyClip/pixman_image_destroy_clip/g;
-s/pixman_image_tGetData/pixman_image_get_data/g;
-s/pixman_image_tGetDepth/pixman_image_get_depth/g;
-s/pixman_image_tGetHeight/pixman_image_get_height/g;
-s/pixman_image_tGetStride/pixman_image_get_stride/g;
-s/pixman_image_tGetWidth/pixman_image_get_width/g;
-s/pixman_image_tInit/pixman_image_init/g;
-s/pixman_image_tSetClipRegion/pixman_image_set_clip_region/g;
-s/pixman_image_tSetFilter/pixman_image_set_filter/g;
-s/pixman_image_tSetRepeat/pixman_image_set_repeat/g;
-s/pixman_image_tSetTransform/pixman_image_set_transform/g;
-s/pixman_line_fixed_tX/pixman_line_fixed_x/g;
-s/pixman_point_fixed_tBounds/pixman_point_fixed_bounds/g;
-s/pixman_region16_tBreak/pixman_break/g;
-s/pixman_region16_tBrokenData/pixman_brokendata/g;
-s/pixman_region16_tBrokenRegion/pixman_brokenregion/g;
-s/pixman_region16_tCoalesce/pixman_coalesce/g;
-s/pixman_region16_tInit/pixman_init/g;
-s/pixman_region16_tOp/pixman_op/g;
-s/pixman_region16_tRectAlloc/pixman_rect_alloc/g;
-s/pixman_region16_tSetExtents/pixman_set_extents/g;
-s/pixman_region16_tUninit/pixman_uninit/g;
-s/pixman_transform_tPoint/pixman_transform_point/g;
-s/pixman_trapezoid_tBounds/pixman_trapezoid_bounds/g;
-s/pixman_triangle_tBounds/pixman_triangle_bounds/g;
-
-# fixes for wrong order of renames
-s/pixman_region_createSimple/pixman_region_create_simple/g;
-s/pixman_region_unionRect/pixman_region_union_rect/g;
-s/pixman_format_createMasks/pixman_format_create_masks/g;
-s/pixman_image_createForData/pixman_image_create_for_data/g;
-s/pixman_image_tGetFormat/pixman_image_get_format/g;
-s/pixman_compositeTrapezoids/pixman_composite_trapezoids/g;
-s/pixman_compositeTriangles/pixman_composite_triangles/g;
-s/pixman_compositeTriStrip/pixman_composite_tri_strip/g;
-s/pixman_compositeTriFan/pixman_composite_tri_fang;
diff --git a/src/Makefile.am b/src/Makefile.am
index 0378ca4..50c00a9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -253,11 +253,11 @@ libcairo_la_SOURCES =				\
 
 libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
 
-INCLUDES = -I$(srcdir) -I$(top_srcdir)/pixman/src $(CAIRO_CFLAGS)
+INCLUDES = -I$(srcdir) $(CAIRO_CFLAGS)
 
-libcairo_la_LIBADD = $(top_builddir)/pixman/src/libpixman.la $(CAIRO_LIBS) $(noinst_LTLIBRARIES) $(CAIRO_LDADD)
+libcairo_la_LIBADD = $(CAIRO_LIBS) $(noinst_LTLIBRARIES) $(CAIRO_LDADD)
 
-libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(top_builddir)/pixman/src/libpixman.la $(noinst_LTLIBRARIES)
+libcairo_la_DEPENDENCIES = $(cairo_def_dependency) $(noinst_LTLIBRARIES)
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = cairo.pc $(backend_pkgconfigs)
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 60f2418..6aa264e 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -80,8 +80,7 @@ _cairo_clip_init_copy (cairo_clip_t *cli
     pixman_region_init (&clip->region);
 
     if (other->has_region) {
-	if (pixman_region_copy (&clip->region, &other->region) !=
-		PIXMAN_REGION_STATUS_SUCCESS) {
+	if (!pixman_region_copy (&clip->region, &other->region)) {
 	    pixman_region_fini (&clip->region);
 	    cairo_surface_destroy (clip->surface);
 	    return CAIRO_STATUS_NO_MEMORY;
@@ -176,9 +175,8 @@ _cairo_clip_intersect_to_rectangle (cair
                                   rectangle->x, rectangle->y,
                                   rectangle->width, rectangle->height);
 
-	if (PIXMAN_REGION_STATUS_SUCCESS !=
-            pixman_region_intersect (&intersection, &clip->region,
-                                     &intersection)) {
+	if (!pixman_region_intersect (&intersection, &clip->region,
+				      &intersection)) {
 	    status = CAIRO_STATUS_NO_MEMORY;
 	} else {
             _cairo_region_extents_rectangle (&intersection, rectangle);
@@ -200,8 +198,6 @@ cairo_status_t
 _cairo_clip_intersect_to_region (cairo_clip_t      *clip,
 				 pixman_region16_t *region)
 {
-    pixman_region_status_t pixman_status;
-
     if (!clip)
 	return CAIRO_STATUS_SUCCESS;
 
@@ -210,8 +206,7 @@ _cairo_clip_intersect_to_region (cairo_c
     }
 
     if (clip->has_region) {
-	pixman_status = pixman_region_intersect (region, &clip->region, region);
-	if (pixman_status != PIXMAN_REGION_STATUS_SUCCESS)
+	if (!pixman_region_intersect (region, &clip->region, region))
 	    return CAIRO_STATUS_NO_MEMORY;
     }
 
@@ -223,8 +218,7 @@ _cairo_clip_intersect_to_region (cairo_c
                                   clip->surface_rect.x, clip->surface_rect.y,
                                   clip->surface_rect.width, clip->surface_rect.height);
 
-        if (PIXMAN_REGION_STATUS_SUCCESS !=
-            pixman_region_intersect (region, &clip_rect, region))
+        if (!pixman_region_intersect (region, &clip_rect, region))
 	    status = CAIRO_STATUS_NO_MEMORY;
 
         pixman_region_fini (&clip_rect);
@@ -347,8 +341,7 @@ _cairo_clip_intersect_region (cairo_clip
     status = CAIRO_STATUS_SUCCESS;
 
     if (!clip->has_region) {
-        if (pixman_region_copy (&clip->region, &region) ==
-		PIXMAN_REGION_STATUS_SUCCESS)
+        if (pixman_region_copy (&clip->region, &region))
 	    clip->has_region = TRUE;
 	else
 	    status = CAIRO_STATUS_NO_MEMORY;
@@ -356,12 +349,10 @@ _cairo_clip_intersect_region (cairo_clip
 	pixman_region16_t intersection;
         pixman_region_init (&intersection);
 
-	if (PIXMAN_REGION_STATUS_SUCCESS !=
-		pixman_region_intersect (&intersection,
-		                         &clip->region,
-		                         &region) ||
-	    PIXMAN_REGION_STATUS_SUCCESS !=
-		pixman_region_copy (&clip->region, &intersection))
+	if (!pixman_region_intersect (&intersection,
+				      &clip->region,
+				      &region) ||
+	    !pixman_region_copy (&clip->region, &intersection))
 	    status = CAIRO_STATUS_NO_MEMORY;
 
         pixman_region_fini (&intersection);
@@ -567,8 +558,7 @@ _cairo_clip_init_deep_copy (cairo_clip_t
          * whatever the right handling is happen */
     } else {
         if (other->has_region) {
-            if (pixman_region_copy (&clip->region, &other->region) !=
-		    PIXMAN_REGION_STATUS_SUCCESS)
+            if (!pixman_region_copy (&clip->region, &other->region))
 		goto BAIL;
 	    clip->has_region = TRUE;
         }
@@ -633,7 +623,7 @@ _cairo_clip_copy_rectangle_list (cairo_c
     if (clip->path || clip->surface)
         return (cairo_rectangle_list_t*) &_cairo_rectangles_not_representable;
 
-    n_boxes = clip->has_region ? pixman_region_num_rects (&clip->region) : 1;
+    n_boxes = clip->has_region ? pixman_region_n_rects (&clip->region) : 1;
     rectangles = malloc (sizeof (cairo_rectangle_t)*n_boxes);
     if (rectangles == NULL)
         return (cairo_rectangle_list_t*) &_cairo_rectangles_nil;
@@ -642,7 +632,7 @@ _cairo_clip_copy_rectangle_list (cairo_c
         pixman_box16_t *boxes;
         int i;
         
-        boxes = pixman_region_rects (&clip->region);
+        boxes = pixman_region_rectangles (&clip->region, NULL);
         for (i = 0; i < n_boxes; ++i) {
             if (!_cairo_clip_rect_to_user(gstate, boxes[i].x1, boxes[i].y1,
                                           boxes[i].x2 - boxes[i].x1,
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index ab15404..573ee81 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -110,6 +110,46 @@ _cairo_glitz_surface_create_similar (voi
     return crsurface;
 }
 
+static cairo_bool_t
+_CAIRO_MASK_FORMAT (cairo_format_masks_t *masks, cairo_format_t *format)
+{
+    switch (masks->bpp) {
+    case 32:
+	if (masks->alpha_mask == 0xff000000 &&
+	    masks->red_mask == 0x00ff0000 &&
+	    masks->green_mask == 0x0000ff00 &&
+	    masks->blue_mask == 0x000000ff)
+	{
+	    *format = CAIRO_FORMAT_ARGB32;
+	    return TRUE;
+	}
+	if (masks->alpha_mask == 0x00000000 &&
+	    masks->red_mask == 0x00ff0000 &&
+	    masks->green_mask == 0x0000ff00 &&
+	    masks->blue_mask == 0x000000ff)
+	{
+	    *format = CAIRO_FORMAT_RGB24;
+	    return TRUE;
+	}
+	break;
+    case 8:
+	if (masks->alpha_mask == 0xff)
+	{
+	    *format = CAIRO_FORMAT_A8;
+	    return TRUE;
+	}
+	break;
+    case 1:
+	if (masks->alpha_mask == 0x1)
+	{
+	    *format = CAIRO_FORMAT_A1;
+	    return TRUE;
+	}
+	break;
+    }
+    return FALSE;
+}
+
 static cairo_status_t
 _cairo_glitz_surface_get_image (cairo_glitz_surface_t   *surface,
 				cairo_rectangle_int16_t *interest,
@@ -120,9 +160,10 @@ _cairo_glitz_surface_get_image (cairo_gl
     int			  x1, y1, x2, y2;
     int			  width, height;
     unsigned char	  *pixels;
-    cairo_format_masks_t  format;
+    cairo_format_masks_t  masks;
     glitz_buffer_t	  *buffer;
     glitz_pixel_format_t  pf;
+    cairo_format_t	  format;
 
     x1 = 0;
     y1 = 0;
@@ -160,41 +201,41 @@ _cairo_glitz_surface_get_image (cairo_gl
 
     if (surface->format->color.fourcc == GLITZ_FOURCC_RGB) {
 	if (surface->format->color.red_size > 0) {
-	    format.bpp = 32;
+	    masks.bpp = 32;
 
 	    if (surface->format->color.alpha_size > 0)
-		format.alpha_mask = 0xff000000;
+		masks.alpha_mask = 0xff000000;
 	    else
-		format.alpha_mask = 0x0;
+		masks.alpha_mask = 0x0;
 
-	    format.red_mask = 0xff0000;
-	    format.green_mask = 0xff00;
-	    format.blue_mask = 0xff;
+	    masks.red_mask = 0xff0000;
+	    masks.green_mask = 0xff00;
+	    masks.blue_mask = 0xff;
 	} else {
-	    format.bpp = 8;
-	    format.blue_mask = format.green_mask = format.red_mask = 0x0;
-	    format.alpha_mask = 0xff;
+	    masks.bpp = 8;
+	    masks.blue_mask = masks.green_mask = masks.red_mask = 0x0;
+	    masks.alpha_mask = 0xff;
 	}
     } else {
-	format.bpp = 32;
-	format.alpha_mask = 0xff000000;
-	format.red_mask = 0xff0000;
-	format.green_mask = 0xff00;
-	format.blue_mask = 0xff;
+	masks.bpp = 32;
+	masks.alpha_mask = 0xff000000;
+	masks.red_mask = 0xff0000;
+	masks.green_mask = 0xff00;
+	masks.blue_mask = 0xff;
     }
 
     pf.fourcc = GLITZ_FOURCC_RGB;
-    pf.masks.bpp = format.bpp;
-    pf.masks.alpha_mask = format.alpha_mask;
-    pf.masks.red_mask = format.red_mask;
-    pf.masks.green_mask = format.green_mask;
-    pf.masks.blue_mask = format.blue_mask;
+    pf.masks.bpp = masks.bpp;
+    pf.masks.alpha_mask = masks.alpha_mask;
+    pf.masks.red_mask = masks.red_mask;
+    pf.masks.green_mask = masks.green_mask;
+    pf.masks.blue_mask = masks.blue_mask;
     pf.xoffset = 0;
     pf.skip_lines = 0;
 
     /* XXX: we should eventually return images with negative stride,
        need to verify that libpixman have no problem with this first. */
-    pf.bytes_per_line = (((width * format.bpp) / 8) + 3) & -4;
+    pf.bytes_per_line = (((width * masks.bpp) / 8) + 3) & -4;
     pf.scanline_order = GLITZ_PIXEL_SCANLINE_ORDER_TOP_DOWN;
 
     pixels = malloc (height * pf.bytes_per_line);
@@ -230,22 +271,45 @@ _cairo_glitz_surface_get_image (cairo_gl
 	glitz_surface_set_clip_region (surface->surface, 0, 0, box, n);
     }
 
-    image = (cairo_image_surface_t *)
-	_cairo_image_surface_create_with_masks (pixels,
-						&format,
-						width, height,
-						pf.bytes_per_line);
-    if (image->base.status)
-    {
-	free (pixels);
-	return CAIRO_STATUS_NO_MEMORY;
+    /*
+     * Prefer to use a standard pixman format instead of the
+     * general masks case.
+     */
+    if (_CAIRO_MASK_FORMAT (&masks, &format)) {
+	image = (cairo_image_surface_t *)
+	    cairo_image_surface_create_for_data (data,
+						 format,
+						 x2 - x1,
+						 y2 - y1,
+						 bytes_per_line);
+	if (image->base.status)
+	    goto FAIL;
+    } else {
+	/*
+	 * XXX This can't work.  We must convert the data to one of the
+	 * supported pixman formats.  Pixman needs another function
+	 * which takes data in an arbitrary format and converts it
+	 * to something supported by that library.
+	 */
+	image = (cairo_image_surface_t *)
+	    _cairo_image_surface_create_with_masks (data,
+						    &masks,
+						    x2 - x1,
+						    y2 - y1,
+						    bytes_per_line);
+	if (image->base.status)
+	    goto FAIL;
     }
-
+    
     _cairo_image_surface_assume_ownership_of_data (image);
 
     *image_out = image;
 
     return CAIRO_STATUS_SUCCESS;
+
+FAIL:
+    free (pixels);
+    return CAIRO_STATUS_NO_MEMORY;
 }
 
 static cairo_status_t
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index ad41a4c..087f9d6 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -82,23 +82,6 @@ static const cairo_image_surface_t _cair
 };
 
 
-static int
-_cairo_format_bpp (cairo_format_t format)
-{
-    switch (format) {
-    case CAIRO_FORMAT_A1:
-	return 1;
-    case CAIRO_FORMAT_A8:
-	return 8;
-    case CAIRO_FORMAT_RGB24:
-    case CAIRO_FORMAT_ARGB32:
-	return 32;
-    }
-
-    ASSERT_NOT_REACHED;
-    return 32;
-}
-
 cairo_surface_t *
 _cairo_image_surface_create_for_pixman_image (pixman_image_t *pixman_image,
 					      cairo_format_t  format)
@@ -129,75 +112,47 @@ _cairo_image_surface_create_for_pixman_i
     return &surface->base;
 }
 
-/* Try to recover a cairo_format_t from a pixman_format
- * by looking at the bpp and masks values. */
-static cairo_internal_format_t
-_cairo_format_from_pixman_format (pixman_format_t *pixman_format)
-{
-    unsigned int bpp, am, rm, gm, bm;
-
-    pixman_format_get_masks (pixman_format, &bpp, &am, &rm, &gm, &bm);
-
-    /* See definition of cairo_internal_format_t for an explanation of
-     * the CAIRO_INTERNAL_FORMAT values used here. */
-    switch (bpp) {
+static cairo_bool_t
+_CAIRO_MASK_FORMAT (cairo_format_masks_t *masks, cairo_format_t *format)
+{
+    /* XXX: many formats are simply not supported by pixman, so this function
+     * converts the masks into something we know will be supported.
+     */
+    switch (masks->bpp) {
     case 32:
-	if (am == 0xff000000) {
-	    if (rm == 0x00ff0000 &&
-		gm == 0x0000ff00 &&
-		bm == 0x000000ff)
-		return CAIRO_FORMAT_ARGB32;
-	    if (rm == 0x000000ff &&
-		gm == 0x0000ff00 &&
-		bm == 0x00ff0000)
-		return CAIRO_INTERNAL_FORMAT_ABGR32;
-	} else if (am == 0x0) {
-	    if (rm == 0x00ff0000 &&
-		gm == 0x0000ff00 &&
-		bm == 0x000000ff)
-		return CAIRO_FORMAT_RGB24;
-	    if (rm == 0x000000ff &&
-		gm == 0x0000ff00 &&
-		bm == 0x00ff0000)
-		return CAIRO_INTERNAL_FORMAT_BGR24;
+	if (masks->alpha_mask == 0xff000000 &&
+	    masks->red_mask == 0x00ff0000 &&
+	    masks->green_mask == 0x0000ff00 &&
+	    masks->blue_mask == 0x000000ff)
+	{
+	    *format = CAIRO_FORMAT_ARGB32;
+	    return TRUE;
+	}
+	if (masks->alpha_mask == 0x00000000 &&
+	    masks->red_mask == 0x00ff0000 &&
+	    masks->green_mask == 0x0000ff00 &&
+	    masks->blue_mask == 0x000000ff)
+	{
+	    *format = CAIRO_FORMAT_RGB24;
+	    return TRUE;
 	}
-	break;
-    case 16:
-	if (am == 0x0 &&
-	    rm == 0xf800 &&
-	    gm == 0x07e0 &&
-	    bm == 0x001f)
-	    return CAIRO_INTERNAL_FORMAT_RGB16_565;
 	break;
     case 8:
-	if (am == 0xff &&
-	    rm == 0x0 &&
-	    gm == 0x0 &&
-	    bm == 0x0)
-	    return CAIRO_FORMAT_A8;
+	if (masks->alpha_mask == 0xff)
+	{
+	    *format = CAIRO_FORMAT_A8;
+	    return TRUE;
+	}
 	break;
     case 1:
-	if (am == 0x1 &&
-	    rm == 0x0 &&
-	    gm == 0x0 &&
-	    bm == 0x0)
-	    return CAIRO_FORMAT_A1;
+	if (masks->alpha_mask == 0x1)
+	{
+	    *format = CAIRO_FORMAT_A1;
+	    return TRUE;
+	}
 	break;
     }
-
-    fprintf (stderr,
-	     "Error: Cairo " PACKAGE_VERSION " does not yet support the requested image format:\n"
-	     "\tDepth: %d\n"
-	     "\tAlpha mask: 0x%08x\n"
-	     "\tRed   mask: 0x%08x\n"
-	     "\tGreen mask: 0x%08x\n"
-	     "\tBlue  mask: 0x%08x\n"
-	     "Please file an enhancement request (quoting the above) at:\n"
-	     PACKAGE_BUGREPORT "\n",
-	     bpp, am, rm, gm, bm);
-
-    ASSERT_NOT_REACHED;
-    return (cairo_format_t) -1;
+    return FALSE;
 }
 
 /* XXX: This function really should be eliminated. We don't really
@@ -206,63 +161,46 @@ _cairo_format_from_pixman_format (pixman
  * that accepts a cairo_internal_format_t rather than mask values. */
 cairo_surface_t *
 _cairo_image_surface_create_with_masks (unsigned char	       *data,
-					cairo_format_masks_t   *format,
+					cairo_format_masks_t   *masks,
 					int			width,
 					int			height,
 					int			stride)
 {
-    cairo_surface_t *surface;
-    pixman_format_t  pixman_format;
-    pixman_image_t  *pixman_image;
-    cairo_format_t   cairo_format;
-
-    pixman_format_init_masks (&pixman_format,
-	                      format->bpp,
-			      format->alpha_mask,
-			      format->red_mask,
-			      format->green_mask,
-			      format->blue_mask);
-
-    cairo_format = _cairo_format_from_pixman_format (&pixman_format);
-
-    pixman_image = pixman_image_create_for_data ((pixman_bits_t *) data,
-	                                         &pixman_format,
-						 width, height, format->bpp, stride);
-
-    if (pixman_image == NULL) {
-	_cairo_error (CAIRO_STATUS_NO_MEMORY);
+    cairo_format_t format;
+    
+    if (!_CAIRO_MASK_FORMAT (masks, &format)) {
+	_cairo_error (CAIRO_STATUS_INVALID_FORMAT);
 	return (cairo_surface_t*) &_cairo_surface_nil;
     }
 
-    surface = _cairo_image_surface_create_for_pixman_image (pixman_image,
-							    cairo_format);
-    if (cairo_surface_status (surface)) {
-	pixman_image_destroy (pixman_image);
-    }
-
-    return surface;
+    return cairo_image_surface_create_for_data (data,
+						format,
+						width,
+						height,
+						stride);
 }
 
-static void
-_init_pixman_format (pixman_format_t *pixman_format, cairo_format_t format)
+static pixman_format_code_t 
+_cairo_format_to_pixman_format_code (cairo_format_t format)
 {
-    int ret;
+    int ret = 0;
     switch (format) {
     case CAIRO_FORMAT_A1:
-	ret = pixman_format_init (pixman_format, PIXMAN_FORMAT_NAME_A1);
+	ret = PIXMAN_a1;
 	break;
     case CAIRO_FORMAT_A8:
-	ret = pixman_format_init (pixman_format, PIXMAN_FORMAT_NAME_A8);
+	ret = PIXMAN_a8;
 	break;
     case CAIRO_FORMAT_RGB24:
-	ret = pixman_format_init (pixman_format, PIXMAN_FORMAT_NAME_RGB24);
+	ret = PIXMAN_x8r8g8b8;
 	break;
     case CAIRO_FORMAT_ARGB32:
     default:
-	ret = pixman_format_init (pixman_format, PIXMAN_FORMAT_NAME_ARGB32);
+	ret = PIXMAN_a8r8g8b8;
 	break;
     }
     assert (ret);
+    return ret;
 }
 
 /**
@@ -291,7 +229,7 @@ cairo_image_surface_create (cairo_format
 			    int			height)
 {
     cairo_surface_t	*surface;
-    pixman_format_t	 pixman_format;
+    pixman_format_code_t pixman_format;
     pixman_image_t	*pixman_image;
 
     if (! CAIRO_FORMAT_VALID (format)) {
@@ -299,9 +237,10 @@ cairo_image_surface_create (cairo_format
 	return (cairo_surface_t*) &_cairo_image_surface_nil_invalid_format;
     }
 
-    _init_pixman_format (&pixman_format, format);
-
-    pixman_image = pixman_image_create (&pixman_format, width, height);
+    pixman_format = _cairo_format_to_pixman_format_code (format);
+    
+    pixman_image = pixman_image_create_bits (pixman_format, width, height,
+					     NULL, -1);
     if (pixman_image == NULL) {
 	_cairo_error (CAIRO_STATUS_NO_MEMORY);
 	return (cairo_surface_t*) &_cairo_surface_nil;
@@ -309,7 +248,7 @@ cairo_image_surface_create (cairo_format
 
     surface = _cairo_image_surface_create_for_pixman_image (pixman_image, format);
     if (cairo_surface_status (surface)) {
-	pixman_image_destroy (pixman_image);
+	pixman_image_unref (pixman_image);
     }
 
     return surface;
@@ -366,19 +305,17 @@ cairo_image_surface_create_for_data (uns
 				     int		stride)
 {
     cairo_surface_t	*surface;
-    pixman_format_t	 pixman_format;
+    pixman_format_code_t pixman_format;
     pixman_image_t	*pixman_image;
 
     if (! CAIRO_FORMAT_VALID (format))
 	return (cairo_surface_t*) &_cairo_surface_nil;
 
-    _init_pixman_format (&pixman_format, format);
+    pixman_format = _cairo_format_to_pixman_format_code (format);
 
-    pixman_image = pixman_image_create_for_data ((pixman_bits_t *) data,
-	                                         &pixman_format,
-						 width, height,
-						 _cairo_format_bpp (format),
-						 stride);
+    pixman_image = pixman_image_create_bits (pixman_format, width, height,
+					     (uint32_t *) data, stride);
+    
     if (pixman_image == NULL) {
 	_cairo_error (CAIRO_STATUS_NO_MEMORY);
 	return (cairo_surface_t*) &_cairo_surface_nil;
@@ -386,7 +323,7 @@ cairo_image_surface_create_for_data (uns
 
     surface = _cairo_image_surface_create_for_pixman_image (pixman_image, format);
     if (cairo_surface_status (surface)) {
-	pixman_image_destroy (pixman_image);
+	pixman_image_unref (pixman_image);
     }
 
     return surface;
@@ -590,7 +527,7 @@ _cairo_image_surface_finish (void *abstr
     cairo_image_surface_t *surface = abstract_surface;
 
     if (surface->pixman_image) {
-	pixman_image_destroy (surface->pixman_image);
+	pixman_image_unref (surface->pixman_image);
 	surface->pixman_image = NULL;
     }
 
@@ -683,7 +620,7 @@ _cairo_image_surface_set_matrix (cairo_i
 
     _cairo_matrix_to_pixman_matrix (matrix, &pixman_transform);
 
-    if (pixman_image_set_transform (surface->pixman_image, &pixman_transform))
+    if (!pixman_image_set_transform (surface->pixman_image, &pixman_transform))
 	return CAIRO_STATUS_NO_MEMORY;
 
     return CAIRO_STATUS_SUCCESS;
@@ -720,7 +657,7 @@ _cairo_image_surface_set_filter (cairo_i
 	pixman_filter = PIXMAN_FILTER_BEST;
     }
 
-    pixman_image_set_filter (surface->pixman_image, pixman_filter);
+    pixman_image_set_filter (surface->pixman_image, pixman_filter, NULL, 0);
 
     return CAIRO_STATUS_SUCCESS;
 }
@@ -760,43 +697,43 @@ _cairo_image_surface_set_attributes (cai
  * time the X server is ported to pixman, (which will change a lot of
  * things in pixman I think).
  */
-static pixman_operator_t
+static pixman_op_t
 _pixman_operator (cairo_operator_t op)
 {
     switch (op) {
     case CAIRO_OPERATOR_CLEAR:
-	return PIXMAN_OPERATOR_CLEAR;
+	return PIXMAN_OP_CLEAR;
 
     case CAIRO_OPERATOR_SOURCE:
-	return PIXMAN_OPERATOR_SRC;
+	return PIXMAN_OP_SRC;
     case CAIRO_OPERATOR_OVER:
-	return PIXMAN_OPERATOR_OVER;
+	return PIXMAN_OP_OVER;
     case CAIRO_OPERATOR_IN:
-	return PIXMAN_OPERATOR_IN;
+	return PIXMAN_OP_IN;
     case CAIRO_OPERATOR_OUT:
-	return PIXMAN_OPERATOR_OUT;
+	return PIXMAN_OP_OUT;
     case CAIRO_OPERATOR_ATOP:
-	return PIXMAN_OPERATOR_ATOP;
+	return PIXMAN_OP_ATOP;
 
     case CAIRO_OPERATOR_DEST:
-	return PIXMAN_OPERATOR_DST;
+	return PIXMAN_OP_DST;
     case CAIRO_OPERATOR_DEST_OVER:
-	return PIXMAN_OPERATOR_OVER_REVERSE;
+	return PIXMAN_OP_OVER_REVERSE;
     case CAIRO_OPERATOR_DEST_IN:
-	return PIXMAN_OPERATOR_IN_REVERSE;
+	return PIXMAN_OP_IN_REVERSE;
     case CAIRO_OPERATOR_DEST_OUT:
-	return PIXMAN_OPERATOR_OUT_REVERSE;
+	return PIXMAN_OP_OUT_REVERSE;
     case CAIRO_OPERATOR_DEST_ATOP:
-	return PIXMAN_OPERATOR_ATOP_REVERSE;
+	return PIXMAN_OP_ATOP_REVERSE;
 
     case CAIRO_OPERATOR_XOR:
-	return PIXMAN_OPERATOR_XOR;
+	return PIXMAN_OP_XOR;
     case CAIRO_OPERATOR_ADD:
-	return PIXMAN_OPERATOR_ADD;
+	return PIXMAN_OP_ADD;
     case CAIRO_OPERATOR_SATURATE:
-	return PIXMAN_OPERATOR_SATURATE;
+	return PIXMAN_OP_SATURATE;
     default:
-	return PIXMAN_OPERATOR_OVER;
+	return PIXMAN_OP_OVER;
     }
 }
 
@@ -841,28 +778,28 @@ _cairo_image_surface_composite (cairo_op
 	if (status)
 	    goto CLEANUP_SURFACES;
 
-	pixman_composite (_pixman_operator (op),
-			  src->pixman_image,
-			  mask->pixman_image,
-			  dst->pixman_image,
-			  src_x + src_attr.x_offset,
-			  src_y + src_attr.y_offset,
-			  mask_x + mask_attr.x_offset,
-			  mask_y + mask_attr.y_offset,
-			  dst_x, dst_y,
-			  width, height);
+	pixman_image_composite (_pixman_operator (op),
+				src->pixman_image,
+				mask->pixman_image,
+				dst->pixman_image,
+				src_x + src_attr.x_offset,
+				src_y + src_attr.y_offset,
+				mask_x + mask_attr.x_offset,
+				mask_y + mask_attr.y_offset,
+				dst_x, dst_y,
+				width, height);
     }
     else
     {
-	pixman_composite (_pixman_operator (op),
-			  src->pixman_image,
-			  NULL,
-			  dst->pixman_image,
-			  src_x + src_attr.x_offset,
-			  src_y + src_attr.y_offset,
-			  0, 0,
-			  dst_x, dst_y,
-			  width, height);
+	pixman_image_composite (_pixman_operator (op),
+				src->pixman_image,
+				NULL,
+				dst->pixman_image,
+				src_x + src_attr.x_offset,
+				src_y + src_attr.y_offset,
+				0, 0,
+				dst_x, dst_y,
+				width, height);
     }
 
     if (!_cairo_operator_bounded_by_source (op))
@@ -900,10 +837,13 @@ _cairo_image_surface_fill_rectangles (vo
     pixman_color.blue  = color->blue_short;
     pixman_color.alpha = color->alpha_short;
 
+    /* XXX: pixman_fill_rectangles() should be implemented */
     /* XXX: The pixman_rectangle_t cast is evil... it needs to go away somehow. */
-    if (pixman_fill_rectangles (_pixman_operator(op), surface->pixman_image,
-		                &pixman_color,
-				(pixman_rectangle_t *) rects, num_rects))
+    if (!pixman_image_fill_rectangles (_pixman_operator(op),
+				       surface->pixman_image,
+				       &pixman_color,
+				       num_rects,
+				       (pixman_rectangle16_t *) rects))
 	return CAIRO_STATUS_NO_MEMORY;
 
     return CAIRO_STATUS_SUCCESS;
@@ -928,8 +868,8 @@ _cairo_image_surface_composite_trapezoid
     cairo_image_surface_t	*src;
     cairo_int_status_t		status;
     pixman_image_t		*mask;
-    pixman_format_t		 format;
-    pixman_bits_t		*mask_data;
+    pixman_format_code_t	 format;
+    uint32_t			*mask_data;
     int				 mask_stride;
     int				 mask_bpp;
     int				 ret;
@@ -954,7 +894,7 @@ _cairo_image_surface_composite_trapezoid
 	antialias != CAIRO_ANTIALIAS_NONE)
     {
 	pixman_add_trapezoids (dst->pixman_image, 0, 0,
-			       (pixman_trapezoid_t *) traps, num_traps);
+			       num_traps, (pixman_trapezoid_t *) traps);
 	return CAIRO_STATUS_SUCCESS;
     }
 
@@ -971,7 +911,8 @@ _cairo_image_surface_composite_trapezoid
 
     switch (antialias) {
     case CAIRO_ANTIALIAS_NONE:
-	ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A1);
+	format = PIXMAN_a1;
+	ret = 1;
 	assert (ret);
 	mask_stride = (width + 31)/8;
 	mask_bpp = 1;
@@ -980,7 +921,8 @@ _cairo_image_surface_composite_trapezoid
     case CAIRO_ANTIALIAS_SUBPIXEL:
     case CAIRO_ANTIALIAS_DEFAULT:
     default:
-	ret = pixman_format_init (&format, PIXMAN_FORMAT_NAME_A8);
+	format = PIXMAN_a8;
+	ret = 1;
 	assert (ret);
 	mask_stride = (width + 3) & ~3;
 	mask_bpp = 8;
@@ -994,8 +936,8 @@ _cairo_image_surface_composite_trapezoid
 	goto CLEANUP_SOURCE;
     }
 
-    mask = pixman_image_create_for_data (mask_data, &format, width, height,
-					 mask_bpp, mask_stride);
+    mask = pixman_image_create_bits (format, width, height,
+				     mask_data, mask_stride);
     if (mask == NULL) {
 	status = CAIRO_STATUS_NO_MEMORY;
 	goto CLEANUP_IMAGE_DATA;
@@ -1004,17 +946,17 @@ _cairo_image_surface_composite_trapezoid
     /* XXX: The pixman_trapezoid_t cast is evil and needs to go away
      * somehow. */
     pixman_add_trapezoids (mask, - dst_x, - dst_y,
-			   (pixman_trapezoid_t *) traps, num_traps);
+			   num_traps, (pixman_trapezoid_t *) traps);
 
-    pixman_composite (_pixman_operator (op),
-		      src->pixman_image,
-		      mask,
-		      dst->pixman_image,
-		      src_x + attributes.x_offset,
-		      src_y + attributes.y_offset,
-		      0, 0,
-		      dst_x, dst_y,
-		      width, height);
+    pixman_image_composite (_pixman_operator (op),
+			    src->pixman_image,
+			    mask,
+			    dst->pixman_image,
+			    src_x + attributes.x_offset,
+			    src_y + attributes.y_offset,
+			    0, 0,
+			    dst_x, dst_y,
+			    width, height);
 
     if (!_cairo_operator_bounded_by_mask (op))
 	status = _cairo_surface_composite_shape_fixup_unbounded (&dst->base,
@@ -1023,7 +965,7 @@ _cairo_image_surface_composite_trapezoid
 								 src_x, src_y,
 								 0, 0,
 								 dst_x, dst_y, width, height);
-    pixman_image_destroy (mask);
+    pixman_image_unref (mask);
 
  CLEANUP_IMAGE_DATA:
     free (mask_data);
@@ -1040,7 +982,7 @@ _cairo_image_surface_set_clip_region (vo
 {
     cairo_image_surface_t *surface = (cairo_image_surface_t *) abstract_surface;
 
-    if (pixman_image_set_clip_region (surface->pixman_image, region))
+    if (!pixman_image_set_clip_region (surface->pixman_image, region))
 	return CAIRO_STATUS_NO_MEMORY;
 
     surface->has_clip = region != NULL;
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 9fafc99..db71478 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -258,10 +258,10 @@ _cairo_pattern_init_linear (cairo_linear
 {
     _cairo_pattern_init_gradient (&pattern->base, CAIRO_PATTERN_TYPE_LINEAR);
 
-    pattern->gradient.p1.x = _cairo_fixed_from_double (x0);
-    pattern->gradient.p1.y = _cairo_fixed_from_double (y0);
-    pattern->gradient.p2.x = _cairo_fixed_from_double (x1);
-    pattern->gradient.p2.y = _cairo_fixed_from_double (y1);
+    pattern->p1.x = _cairo_fixed_from_double (x0);
+    pattern->p1.y = _cairo_fixed_from_double (y0);
+    pattern->p2.x = _cairo_fixed_from_double (x1);
+    pattern->p2.y = _cairo_fixed_from_double (y1);
 }
 
 void
@@ -271,12 +271,12 @@ _cairo_pattern_init_radial (cairo_radial
 {
     _cairo_pattern_init_gradient (&pattern->base, CAIRO_PATTERN_TYPE_RADIAL);
 
-    pattern->gradient.c1.x	   = _cairo_fixed_from_double (cx0);
-    pattern->gradient.c1.y	   = _cairo_fixed_from_double (cy0);
-    pattern->gradient.c1.radius = _cairo_fixed_from_double (fabs (radius0));
-    pattern->gradient.c2.x	   = _cairo_fixed_from_double (cx1);
-    pattern->gradient.c2.y	   = _cairo_fixed_from_double (cy1);
-    pattern->gradient.c2.radius = _cairo_fixed_from_double (fabs (radius1));
+    pattern->c1.x = _cairo_fixed_from_double (cx0);
+    pattern->c1.y = _cairo_fixed_from_double (cy0);
+    pattern->radius2 = _cairo_fixed_from_double (fabs (radius0));
+    pattern->c2.x = _cairo_fixed_from_double (cx1);
+    pattern->c2.y = _cairo_fixed_from_double (cy1);
+    pattern->radius2 = _cairo_fixed_from_double (fabs (radius1));
 }
 
 /* We use a small freed pattern cache here, because we don't want to
@@ -1089,10 +1089,10 @@ _cairo_linear_pattern_classify (cairo_li
      * pattern. We actually only need 3/4 corners, so we skip the
      * fourth.
      */
-    point0.x = _cairo_fixed_to_double (pattern->gradient.p1.x);
-    point0.y = _cairo_fixed_to_double (pattern->gradient.p1.y);
-    point1.x = _cairo_fixed_to_double (pattern->gradient.p2.x);
-    point1.y = _cairo_fixed_to_double (pattern->gradient.p2.y);
+    point0.x = _cairo_fixed_to_double (pattern->p1.x);
+    point0.y = _cairo_fixed_to_double (pattern->p1.y);
+    point1.x = _cairo_fixed_to_double (pattern->p2.x);
+    point1.y = _cairo_fixed_to_double (pattern->p2.y);
 
     _cairo_matrix_get_affine (&pattern->base.base.matrix,
 			      &a, &b, &c, &d, &tx, &ty);
@@ -1147,7 +1147,8 @@ _cairo_pattern_acquire_surface_for_gradi
     {
 	cairo_linear_pattern_t *linear = (cairo_linear_pattern_t *) pattern;
 
-	pixman_image = pixman_image_create_linear_gradient (&linear->gradient,
+	pixman_image = pixman_image_create_linear_gradient (&linear->p1,
+							    &linear->p2,
 							    pattern->stops,
 							    pattern->n_stops);
     }
@@ -1155,7 +1156,10 @@ _cairo_pattern_acquire_surface_for_gradi
     {
 	cairo_radial_pattern_t *radial = (cairo_radial_pattern_t *) pattern;
 
-	pixman_image = pixman_image_create_radial_gradient (&radial->gradient,
+	pixman_image = pixman_image_create_radial_gradient (&radial->c1,
+							    &radial->c2,
+							    radial->radius1,
+							    radial->radius2,
 							    pattern->stops,
 							    pattern->n_stops);
     }
@@ -1170,7 +1174,7 @@ _cairo_pattern_acquire_surface_for_gradi
 							  CAIRO_FORMAT_ARGB32);
 	if (image->base.status)
 	{
-	    pixman_image_destroy (pixman_image);
+	    pixman_image_unref (pixman_image);
 	    return CAIRO_STATUS_NO_MEMORY;
 	}
 
@@ -1212,16 +1216,16 @@ _cairo_pattern_acquire_surface_for_gradi
     image = (cairo_image_surface_t *)
 	cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
     if (image->base.status) {
-	pixman_image_destroy (pixman_image);
+	pixman_image_unref (pixman_image);
 	return CAIRO_STATUS_NO_MEMORY;
     }
 
-    pixman_image_set_filter (pixman_image, PIXMAN_FILTER_BILINEAR);
+    pixman_image_set_filter (pixman_image, PIXMAN_FILTER_BILINEAR, NULL, 0);
 
     _cairo_matrix_to_pixman_matrix (&pattern->base.matrix, &pixman_transform);
     if (pixman_image_set_transform (pixman_image, &pixman_transform)) {
 	cairo_surface_destroy (&image->base);
-	pixman_image_destroy (pixman_image);
+	pixman_image_unref (pixman_image);
 	return CAIRO_STATUS_NO_MEMORY;
     }
 
@@ -1240,16 +1244,16 @@ _cairo_pattern_acquire_surface_for_gradi
 	break;
     }
 
-    pixman_composite (PIXMAN_OPERATOR_SRC,
-		      pixman_image,
-		      NULL,
-		      image->pixman_image,
-		      x, y,
-		      0, 0,
-		      0, 0,
-		      width, height);
+    pixman_image_composite (PIXMAN_OP_SRC,
+			    pixman_image,
+			    NULL,
+			    image->pixman_image,
+			    x, y,
+			    0, 0,
+			    0, 0,
+			    width, height);
 
-    pixman_image_destroy (pixman_image);
+    pixman_image_unref (pixman_image);
 
     status = _cairo_surface_clone_similar (dst, &image->base,
 					   0, 0, width, height, out);
@@ -2159,13 +2163,13 @@ cairo_pattern_get_linear_points (cairo_p
 	return CAIRO_STATUS_PATTERN_TYPE_MISMATCH;
 
     if (x0)
-	*x0 = _cairo_fixed_to_double (linear->gradient.p1.x);
+	*x0 = _cairo_fixed_to_double (linear->p1.x);
     if (y0)
-	*y0 = _cairo_fixed_to_double (linear->gradient.p1.y);
+	*y0 = _cairo_fixed_to_double (linear->p1.y);
     if (x1)
-	*x1 = _cairo_fixed_to_double (linear->gradient.p2.x);
+	*x1 = _cairo_fixed_to_double (linear->p2.x);
     if (y1)
-	*y1 = _cairo_fixed_to_double (linear->gradient.p2.y);
+	*y1 = _cairo_fixed_to_double (linear->p2.y);
 
     return CAIRO_STATUS_SUCCESS;
 }
@@ -2200,17 +2204,17 @@ cairo_pattern_get_radial_circles (cairo_
 	return CAIRO_STATUS_PATTERN_TYPE_MISMATCH;
 
     if (x0)
-	*x0 = _cairo_fixed_to_double (radial->gradient.c1.x);
+	*x0 = _cairo_fixed_to_double (radial->c1.x);
     if (y0)
-	*y0 = _cairo_fixed_to_double (radial->gradient.c1.y);
+	*y0 = _cairo_fixed_to_double (radial->c1.y);
     if (r0)
-	*r0 = _cairo_fixed_to_double (radial->gradient.c1.radius);
+	*r0 = _cairo_fixed_to_double (radial->radius1);
     if (x1)
-	*x1 = _cairo_fixed_to_double (radial->gradient.c2.x);
+	*x1 = _cairo_fixed_to_double (radial->c2.x);
     if (y1)
-	*y1 = _cairo_fixed_to_double (radial->gradient.c2.y);
+	*y1 = _cairo_fixed_to_double (radial->c2.y);
     if (r1)
-	*r1 = _cairo_fixed_to_double (radial->gradient.c2.radius);
+	*r1 = _cairo_fixed_to_double (radial->radius2);
 
     return CAIRO_STATUS_SUCCESS;
 }
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 1e73c4c..b0dcaad 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -698,7 +698,7 @@ _cairo_pdf_surface_emit_smask (cairo_pdf
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     char *alpha, *alpha_compressed;
     unsigned long alpha_size, alpha_compressed_size;
-    pixman_bits_t *pixel;
+    uint32_t *pixel;
     int i, x, y;
     cairo_bool_t opaque;
     uint8_t a;
@@ -716,7 +716,7 @@ _cairo_pdf_surface_emit_smask (cairo_pdf
     opaque = TRUE;
     i = 0;
     for (y = 0; y < image->height; y++) {
-	pixel = (pixman_bits_t *) (image->data + y * image->stride);
+	pixel = (uint32_t *) (image->data + y * image->stride);
 
 	for (x = 0; x < image->width; x++, pixel++) {
 	    a = (*pixel & 0xff000000) >> 24;
@@ -769,7 +769,7 @@ _cairo_pdf_surface_emit_image (cairo_pdf
     cairo_status_t status = CAIRO_STATUS_SUCCESS;
     char *rgb, *compressed;
     unsigned long rgb_size, compressed_size;
-    pixman_bits_t *pixel;
+    uint32_t *pixel;
     int i, x, y;
     cairo_pdf_resource_t smask = {0}; /* squelch bogus compiler warning */
     cairo_bool_t need_smask;
@@ -795,7 +795,7 @@ _cairo_pdf_surface_emit_image (cairo_pdf
 
     i = 0;
     for (y = 0; y < image->height; y++) {
-	pixel = (pixman_bits_t *) (image->data + y * image->stride);
+	pixel = (uint32_t *) (image->data + y * image->stride);
 
 	for (x = 0; x < image->width; x++, pixel++) {
 	    /* XXX: We're un-premultiplying alpha here. My reading of the PDF
@@ -1442,10 +1442,10 @@ _cairo_pdf_surface_emit_linear_pattern (
 	return status;
 
     cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
-    x1 = _cairo_fixed_to_double (pattern->gradient.p1.x);
-    y1 = _cairo_fixed_to_double (pattern->gradient.p1.y);
-    x2 = _cairo_fixed_to_double (pattern->gradient.p2.x);
-    y2 = _cairo_fixed_to_double (pattern->gradient.p2.y);
+    x1 = _cairo_fixed_to_double (pattern->p1.x);
+    y1 = _cairo_fixed_to_double (pattern->p1.y);
+    x2 = _cairo_fixed_to_double (pattern->p2.x);
+    y2 = _cairo_fixed_to_double (pattern->p2.y);
 
     pattern_resource = _cairo_pdf_surface_new_object (surface);
     _cairo_output_stream_printf (surface->output,
@@ -1564,12 +1564,12 @@ _cairo_pdf_surface_emit_radial_pattern (
 	return status;
 
     cairo_matrix_multiply (&pat_to_pdf, &pat_to_pdf, &surface->cairo_to_pdf);
-    x1 = _cairo_fixed_to_double (pattern->gradient.c1.x);
-    y1 = _cairo_fixed_to_double (pattern->gradient.c1.y);
-    r1 = _cairo_fixed_to_double (pattern->gradient.c1.radius);
-    x2 = _cairo_fixed_to_double (pattern->gradient.c2.x);
-    y2 = _cairo_fixed_to_double (pattern->gradient.c2.y);
-    r2 = _cairo_fixed_to_double (pattern->gradient.c2.radius);
+    x1 = _cairo_fixed_to_double (pattern->c1.x);
+    y1 = _cairo_fixed_to_double (pattern->c1.y);
+    r1 = _cairo_fixed_to_double (pattern->radius1);
+    x2 = _cairo_fixed_to_double (pattern->c2.x);
+    y2 = _cairo_fixed_to_double (pattern->c2.y);
+    r2 = _cairo_fixed_to_double (pattern->radius2);
 
     pattern_resource = _cairo_pdf_surface_new_object (surface);
     _cairo_output_stream_printf (surface->output,
@@ -3059,12 +3059,12 @@ _gradient_pattern_supported (cairo_patte
         double x1, y1, x2, y2, r1, r2, d;
         cairo_radial_pattern_t *radial = (cairo_radial_pattern_t *) pattern;
 
-        x1 = _cairo_fixed_to_double (radial->gradient.c1.x);
-        y1 = _cairo_fixed_to_double (radial->gradient.c1.y);
-        r1 = _cairo_fixed_to_double (radial->gradient.c1.radius);
-        x2 = _cairo_fixed_to_double (radial->gradient.c2.x);
-        y2 = _cairo_fixed_to_double (radial->gradient.c2.y);
-        r2 = _cairo_fixed_to_double (radial->gradient.c2.radius);
+        x1 = _cairo_fixed_to_double (radial->c1.x);
+        y1 = _cairo_fixed_to_double (radial->c1.y);
+        r1 = _cairo_fixed_to_double (radial->radius1);
+        x2 = _cairo_fixed_to_double (radial->c2.x);
+        y2 = _cairo_fixed_to_double (radial->c2.y);
+        r2 = _cairo_fixed_to_double (radial->radius2);
 
         d = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
         if (d > fabs(r2 - r1)) {
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 919a498..0cbe9f4 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -1583,7 +1583,7 @@ _cairo_ps_surface_emit_image (cairo_ps_s
 
     i = 0;
     for (y = 0; y < opaque_image->height; y++) {
-	pixman_bits_t *pixel = (pixman_bits_t *) (opaque_image->data + y * opaque_image->stride);
+	uint32_t *pixel = (uint32_t *) (opaque_image->data + y * opaque_image->stride);
 	for (x = 0; x < opaque_image->width; x++, pixel++) {
 	    rgb[i++] = (*pixel & 0x00ff0000) >> 16;
 	    rgb[i++] = (*pixel & 0x0000ff00) >>  8;
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 8898aee..8d5c80f 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -416,7 +416,7 @@ _composite_trap_region (cairo_clip_t    
     cairo_status_t status;
     cairo_pattern_union_t solid_pattern;
     cairo_pattern_union_t mask;
-    int num_rects = pixman_region_num_rects (trap_region);
+    int num_rects = pixman_region_n_rects (trap_region);
     unsigned int clip_serial;
     cairo_surface_t *clip_surface = clip ? clip->surface : NULL;
 
@@ -585,8 +585,7 @@ _clip_and_composite_trapezoids (cairo_pa
 
             _cairo_region_extents_rectangle (&clear_region,  &extents);
 
-            if (PIXMAN_REGION_STATUS_SUCCESS !=
-                pixman_region_subtract (&clear_region, &clear_region, &trap_region)) {
+            if (!pixman_region_subtract (&clear_region, &clear_region, &trap_region)) {
                 status = CAIRO_STATUS_NO_MEMORY;
                 goto out;
             }
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index d7ef33f..afa1a1f 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1231,8 +1231,8 @@ _cairo_surface_fill_region (cairo_surfac
 			    const cairo_color_t    *color,
 			    pixman_region16_t      *region)
 {
-    int num_rects = pixman_region_num_rects (region);
-    pixman_box16_t *boxes = pixman_region_rects (region);
+    int num_rects;
+    pixman_box16_t *boxes;
     cairo_rectangle_int16_t stack_rects[CAIRO_STACK_BUFFER_SIZE / sizeof (cairo_rectangle_int16_t)];
     cairo_rectangle_int16_t *rects;
     cairo_status_t status;
@@ -1240,6 +1240,8 @@ _cairo_surface_fill_region (cairo_surfac
 
     assert (! surface->is_snapshot);
 
+    boxes = pixman_region_rectangles (region, &num_rects);
+    
     if (!num_rects)
 	return CAIRO_STATUS_SUCCESS;
 
@@ -1982,8 +1984,7 @@ _cairo_surface_composite_fixup_unbounded
     has_drawn_region = TRUE;
     has_clear_region = TRUE;
 
-    if (PIXMAN_REGION_STATUS_SUCCESS !=
-        pixman_region_subtract (&clear_region, &clear_region, &drawn_region)) {
+    if (!pixman_region_subtract (&clear_region, &clear_region, &drawn_region)) {
         status = CAIRO_STATUS_NO_MEMORY;
         goto CLEANUP_REGIONS;
     }
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 483440f..fce0c90 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1385,10 +1385,10 @@ _cairo_svg_surface_emit_linear_pattern (
     if (status)
 	return status;
 
-    x0 = _cairo_fixed_to_double (pattern->gradient.p1.x);
-    y0 = _cairo_fixed_to_double (pattern->gradient.p1.y);
-    x1 = _cairo_fixed_to_double (pattern->gradient.p2.x);
-    y1 = _cairo_fixed_to_double (pattern->gradient.p2.y);
+    x0 = _cairo_fixed_to_double (pattern->p1.x);
+    y0 = _cairo_fixed_to_double (pattern->p1.y);
+    x1 = _cairo_fixed_to_double (pattern->p2.x);
+    y1 = _cairo_fixed_to_double (pattern->p2.y);
 
     _cairo_output_stream_printf (document->xml_node_defs,
 				 "<linearGradient id=\"linear%d\" "
@@ -1428,33 +1428,38 @@ _cairo_svg_surface_emit_radial_pattern (
     double fx, fy;
     cairo_bool_t reverse_stops;
     cairo_status_t status;
-    pixman_circle_t *c0, *c1;
+    pixman_point_fixed_t *c0, *c1;
+    pixman_fixed_t radius0, radius1;
 
     extend = pattern->base.base.extend;
 
-    if (pattern->gradient.c1.radius < pattern->gradient.c2.radius) {
-	c0 = &pattern->gradient.c1;
-	c1 = &pattern->gradient.c2;
+    if (pattern->radius1 < pattern->radius2) {
+	c0 = &pattern->c1;
+	c1 = &pattern->c2;
+	radius0 = pattern->radius1;
+	radius1 = pattern->radius2;
 	reverse_stops = FALSE;
     } else {
-	c0 = &pattern->gradient.c2;
-	c1 = &pattern->gradient.c1;
+	c0 = &pattern->c2;
+	c1 = &pattern->c1;
+	radius0 = pattern->radius2;
+	radius1 = pattern->radius1;
 	reverse_stops = TRUE;
     }
 
     x0 = _cairo_fixed_to_double (c0->x);
     y0 = _cairo_fixed_to_double (c0->y);
-    r0 = _cairo_fixed_to_double (c0->radius);
+    r0 = _cairo_fixed_to_double (radius0);
     x1 = _cairo_fixed_to_double (c1->x);
     y1 = _cairo_fixed_to_double (c1->y);
-    r1 = _cairo_fixed_to_double (c1->radius);
+    r1 = _cairo_fixed_to_double (radius1);
 
     p2u = pattern->base.base.matrix;
     status = cairo_matrix_invert (&p2u);
     if (status)
 	return status;
 
-    if (pattern->gradient.c1.radius == pattern->gradient.c2.radius) {
+    if (pattern->radius1 == pattern->radius2) {
 	_cairo_output_stream_printf (document->xml_node_defs,
 				     "<radialGradient id=\"radial%d\" "
 				     "gradientUnits=\"userSpaceOnUse\" "
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index dd885c5..c9e6c83 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -601,7 +601,7 @@ _cairo_traps_extract_region (cairo_traps
     pixman_box16_t static_boxes[NUM_STATIC_BOXES];
     pixman_box16_t *boxes;
     int i, box_count;
-    pixman_region_status_t status;
+    pixman_bool_t status;
 
     for (i = 0; i < traps->num_traps; i++)
 	if (!(traps->traps[i].left.p1.x == traps->traps[i].left.p2.x
@@ -650,7 +650,7 @@ _cairo_traps_extract_region (cairo_traps
     if (boxes != static_boxes)
 	free (boxes);
 
-    if (status != PIXMAN_REGION_STATUS_SUCCESS) {
+    if (!status) {
 	pixman_region_fini (region);
 	return CAIRO_INT_STATUS_UNSUPPORTED;
     }
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 90333a8..c70d640 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -767,6 +767,38 @@ _cairo_xlib_surface_ensure_gc (cairo_xli
     return CAIRO_STATUS_SUCCESS;
 }
 
+static void
+cairo_format_get_masks (cairo_format_t  format,
+			uint32_t       *bpp,
+			uint32_t       *red,
+			uint32_t       *green,
+			uint32_t       *blue)
+{
+    *red = 0x0;
+    *green = 0x0;
+    *blue = 0x0;
+    
+    switch (format)
+    {
+    case CAIRO_FORMAT_ARGB32:
+    case CAIRO_FORMAT_RGB24:
+    default:
+	*bpp =   32;
+	*red =   0x00ff0000;
+	*green = 0x0000ff00;
+	*blue =  0x000000ff;
+	break;
+	
+    case CAIRO_FORMAT_A8:
+	*bpp = 8;
+	break;
+	
+    case CAIRO_FORMAT_A1:
+	*bpp = 1;
+	break;
+    }
+}
+
 static cairo_status_t
 _draw_image_surface (cairo_xlib_surface_t   *surface,
 		     cairo_image_surface_t  *image,
@@ -778,13 +810,12 @@ _draw_image_surface (cairo_xlib_surface_
 		     int                    dst_y)
 {
     XImage ximage;
-    unsigned int bpp, alpha, red, green, blue;
+    uint32_t bpp, red, green, blue;
     int native_byte_order = _native_byte_order_lsb () ? LSBFirst : MSBFirst;
     cairo_status_t status;
 
-    pixman_format_get_masks (pixman_image_get_format (image->pixman_image),
-			     &bpp, &alpha, &red, &green, &blue);
-
+    cairo_format_get_masks (image->format, &bpp, &red, &green, &blue);
+    
     ximage.width = image->width;
     ximage.height = image->height;
     ximage.format = ZPixmap;
@@ -1755,7 +1786,7 @@ _cairo_xlib_surface_set_clip_region (voi
 	XRectangle *rects = NULL;
 	int n_boxes, i;
 
-	n_boxes = pixman_region_num_rects (region);
+	n_boxes = pixman_region_n_rects (region);
 	if (n_boxes > ARRAY_LENGTH (surface->embedded_clip_rects)) {
 	    rects = malloc (sizeof(XRectangle) * n_boxes);
 	    if (rects == NULL)
@@ -1764,7 +1795,7 @@ _cairo_xlib_surface_set_clip_region (voi
 	    rects = surface->embedded_clip_rects;
 	}
 
-	boxes = pixman_region_rects (region);
+	boxes = pixman_region_rectangles (region, NULL);
 
 	for (i = 0; i < n_boxes; i++) {
 	    rects[i].x = boxes[i].x1;
diff --git a/src/cairoint.h b/src/cairoint.h
index 07846b8..6260c34 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -64,7 +64,7 @@
 #include <stdio.h>
 
 #include "cairo.h"
-#include <pixman.h>
+#include <pixman/pixman.h>
 
 #ifdef _MSC_VER
 #define snprintf _snprintf
@@ -1005,13 +1005,21 @@ typedef struct _cairo_gradient_pattern {
 typedef struct _cairo_linear_pattern {
     cairo_gradient_pattern_t base;
 
-    pixman_linear_gradient_t gradient;
+    pixman_point_fixed_t     p1;
+    pixman_point_fixed_t     p2;
+    pixman_gradient_stop_t  *stops;
+    int			     n_stops;
 } cairo_linear_pattern_t;
 
 typedef struct _cairo_radial_pattern {
     cairo_gradient_pattern_t base;
 
-    pixman_radial_gradient_t gradient;
+    pixman_point_fixed_t     c1;
+    pixman_point_fixed_t     c2;
+    pixman_fixed_t           radius1;
+    pixman_fixed_t           radius2;
+    pixman_gradient_stop_t  *stops;
+    int                      n_stops;
 } cairo_radial_pattern_t;
 
 typedef union {
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index abb7e33..59a9e5d 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -34,7 +34,7 @@
 #endif
 #include <errno.h>
 #include <string.h>
-#include <pixman.h>
+#include <pixman/pixman.h>
 
 #include "cairo-test.h"
 
@@ -66,17 +66,17 @@ buffer_diff_core (unsigned char *_buf_a,
 		  int		width,
 		  int		height,
 		  int		stride,
-		  pixman_bits_t mask,
+		  uint32_t mask,
 		  buffer_diff_result_t *result_ret)
 {
     int x, y;
-    pixman_bits_t *row_a, *row_b, *row;
+    uint32_t *row_a, *row_b, *row;
     buffer_diff_result_t result = {0, 0};
-    pixman_bits_t *buf_a = (pixman_bits_t*)_buf_a;
-    pixman_bits_t *buf_b = (pixman_bits_t*)_buf_b;
-    pixman_bits_t *buf_diff = (pixman_bits_t*)_buf_diff;
+    uint32_t *buf_a = (uint32_t*)_buf_a;
+    uint32_t *buf_b = (uint32_t*)_buf_b;
+    uint32_t *buf_diff = (uint32_t*)_buf_diff;
 
-    stride /= sizeof(pixman_bits_t);
+    stride /= sizeof(uint32_t);
     for (y = 0; y < height; y++)
     {
 	row_a = buf_a + y * stride;
@@ -87,7 +87,7 @@ buffer_diff_core (unsigned char *_buf_a,
 	    /* check if the pixels are the same */
 	    if ((row_a[x] & mask) != (row_b[x] & mask)) {
 		int channel;
-		pixman_bits_t diff_pixel = 0;
+		uint32_t diff_pixel = 0;
 
 		/* calculate a difference value for all 4 channels */
 		for (channel = 0; channel < 4; channel++) {


More information about the cairo-commit mailing list