Move simple fetchers after transformed fetcher
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Fri, 22 May 2009 12:47:51 +0000 (08:47 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Tue, 2 Jun 2009 20:54:10 +0000 (16:54 -0400)
pixman/pixman-bits-image.c

index 01d5cb2..cebb2ea 100644 (file)
@@ -45,7 +45,7 @@ bits_image_store_scanline_32 (bits_image_t *image, int x, int y, int width, uint
 {
     uint32_t *bits;
     int32_t stride;
-    const pixman_indexed_t * indexed = image->indexed;
+    const pixman_indexed_t *indexed = image->indexed;
 
     bits = image->bits;
     stride = image->rowstride;
@@ -67,7 +67,7 @@ bits_image_store_scanline_64 (bits_image_t *image, int x, int y, int width, uint
 {
     uint32_t *bits;
     int32_t stride;
-    const pixman_indexed_t * indexed = image->indexed;
+    const pixman_indexed_t *indexed = image->indexed;
 
     bits = image->bits;
     stride = image->rowstride;
@@ -100,54 +100,6 @@ _pixman_image_store_scanline_64 (bits_image_t *image, int x, int y, int width,
 
 /* Fetch functions */
 
-
-static void
-bits_image_fetch_solid_32 (bits_image_t * image,
-                          int x, int y, int width,
-                          uint32_t *buffer,
-                          uint32_t *mask, uint32_t maskBits)
-{
-    uint32_t color;
-    uint32_t *end;
-    
-    color = image->fetch_pixel (image, 0, 0);
-    
-    end = buffer + width;
-    while (buffer < end)
-       *(buffer++) = color;
-}
-
-static void
-bits_image_fetch_solid_64 (bits_image_t * image,
-                          int x, int y, int width,
-                          uint64_t *buffer, void *unused, uint32_t unused2)
-{
-    uint64_t color;
-    uint64_t *end;
-    
-    color = image->fetch_pixel (image, 0, 0);
-    
-    end = buffer + width;
-    while (buffer < end)
-       *(buffer++) = color;
-}
-
-static void
-bits_image_fetch_untransformed_32 (bits_image_t * image,
-                                  int x, int y, int width,
-                                  uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
-{
-    image->fetch_scanline_raw_32 (image, x, y, width, buffer);
-}
-
-static void
-bits_image_fetch_untransformed_64 (bits_image_t * image,
-                                  int x, int y, int width,
-                                  uint64_t *buffer, void *unused, uint32_t unused2)
-{
-    image->fetch_scanline_raw_64 (image, x, y, width, buffer);
-}
-
 /* On entry, @buffer should contain @n_pixels (x, y) coordinate pairs, where
  * x and y are both uint32_ts. On exit, buffer will contain the corresponding
  * pixels.
@@ -657,7 +609,8 @@ bits_image_fetch_transformed (bits_image_t * pict, int x, int y, int width,
            {
                pixman_fixed_48_16_t div;
                
-               div = ((pixman_fixed_48_16_t)v.vector[0] << 16)/v.vector[2];
+               div = ((pixman_fixed_48_16_t)v.vector[0] << 16) / v.vector[2];
+
                if ((div >> 16) > 0x7fff)
                    coords[0] = 0x7fffffff; 
                else if ((div >> 16) < 0x8000)
@@ -665,7 +618,8 @@ bits_image_fetch_transformed (bits_image_t * pict, int x, int y, int width,
                else
                    coords[0] = div;
                
-               div = ((pixman_fixed_48_16_t)v.vector[1] << 16)/v.vector[2];
+               div = ((pixman_fixed_48_16_t)v.vector[1] << 16) / v.vector[2];
+
                if ((div >> 16) > 0x7fff)
                    coords[1] = 0x7fffffff;
                else if ((div >> 16) < 0x8000)
@@ -689,6 +643,53 @@ bits_image_fetch_transformed (bits_image_t * pict, int x, int y, int width,
 }
 
 static void
+bits_image_fetch_solid_32 (bits_image_t * image,
+                          int x, int y, int width,
+                          uint32_t *buffer,
+                          uint32_t *mask, uint32_t maskBits)
+{
+    uint32_t color;
+    uint32_t *end;
+    
+    color = image->fetch_pixel (image, 0, 0);
+    
+    end = buffer + width;
+    while (buffer < end)
+       *(buffer++) = color;
+}
+
+static void
+bits_image_fetch_solid_64 (bits_image_t * image,
+                          int x, int y, int width,
+                          uint64_t *buffer, void *unused, uint32_t unused2)
+{
+    uint64_t color;
+    uint64_t *end;
+    
+    color = image->fetch_pixel (image, 0, 0);
+    
+    end = buffer + width;
+    while (buffer < end)
+       *(buffer++) = color;
+}
+
+static void
+bits_image_fetch_untransformed_32 (bits_image_t * image,
+                                  int x, int y, int width,
+                                  uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
+{
+    image->fetch_scanline_raw_32 (image, x, y, width, buffer);
+}
+
+static void
+bits_image_fetch_untransformed_64 (bits_image_t * image,
+                                  int x, int y, int width,
+                                  uint64_t *buffer, void *unused, uint32_t unused2)
+{
+    image->fetch_scanline_raw_64 (image, x, y, width, buffer);
+}
+
+static void
 bits_image_property_changed (pixman_image_t *image)
 {
     bits_image_t *bits = (bits_image_t *)image;