Replace pixman_image_get_fetchers() with pixman_image_get_scanline_{32,64}
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Sun, 3 May 2009 02:55:56 +0000 (22:55 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Sat, 16 May 2009 19:12:35 +0000 (15:12 -0400)
pixman/pixman-compose.c
pixman/pixman-image.c
pixman/pixman-private.h

index be922a7..d13d87c 100644 (file)
@@ -63,18 +63,24 @@ pixman_composite_rect_general_internal (const FbComposeData *data,
     
     if (data->op == PIXMAN_OP_CLEAR)
         fetchSrc = NULL;
+    else if (wide)
+       fetchSrc = _pixman_image_get_scanline_64;
     else
-       fetchSrc = _pixman_image_get_fetcher (data->src, wide);
+       fetchSrc = _pixman_image_get_scanline_32;
 
     if (!data->mask || data->op == PIXMAN_OP_CLEAR)
        fetchMask = NULL;
+    else if (wide)
+       fetchMask = _pixman_image_get_scanline_64;
     else
-       fetchMask = _pixman_image_get_fetcher (data->mask, wide);
+       fetchMask = _pixman_image_get_scanline_32;
 
     if (data->op == PIXMAN_OP_CLEAR || data->op == PIXMAN_OP_SRC)
        fetchDest = NULL;
+    else if (wide)
+       fetchDest = _pixman_image_get_scanline_64;
     else
-       fetchDest = _pixman_image_get_fetcher (data->dest, wide);
+       fetchDest = _pixman_image_get_scanline_32;
 
     store = _pixman_image_get_storer (data->dest, wide);
 
index dd21718..0553a5a 100644 (file)
@@ -98,6 +98,24 @@ _pixman_image_classify (pixman_image_t *image,
        return SOURCE_IMAGE_CLASS_UNKNOWN;
 }
 
+void
+_pixman_image_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+                              uint32_t *buffer, uint32_t *mask, uint32_t mask_bits)
+{
+    image->common.get_scanline_32 (image, x, y, width, buffer, mask, mask_bits);
+}
+
+void
+_pixman_image_get_scanline_64 (pixman_image_t *image, int x, int y, int width,
+                              uint32_t *buffer, uint32_t *unused, uint32_t unused2)
+{
+    image->common.get_scanline_64 (image, x, y, width, buffer, unused, unused2);
+}
+
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+
 scanFetchProc
 _pixman_image_get_fetcher (pixman_image_t *image,
                           int             wide)
@@ -111,8 +129,6 @@ _pixman_image_get_fetcher (pixman_image_t *image,
        return image->common.get_scanline_32;
 }
 
-
-
 #define WRITE_ACCESS(f) ((image->common.write_func)? f##_accessors : f)
 
 static void
index 0881a7c..9baab65 100644 (file)
@@ -287,9 +287,16 @@ source_pict_class_t _pixman_image_classify (pixman_image_t *image,
                                            int             width,
                                            int             height);
 
-scanFetchProc
-_pixman_image_get_fetcher (pixman_image_t *image,
-                          int             wide);
+void
+_pixman_image_get_scanline_32 (pixman_image_t *image, int x, int y, int width,
+                              uint32_t *buffer, uint32_t *mask, uint32_t mask_bits);
+
+/* Even thought the type of buffer is uint32_t *, the function actually expects
+ * a uint64_t *buffer.
+ */
+void
+_pixman_image_get_scanline_64 (pixman_image_t *image, int x, int y, int width,
+                              uint32_t *buffer, uint32_t *unused, uint32_t unused2);
 
 scanStoreProc
 _pixman_image_get_storer (pixman_image_t *image,