Rename bits_image.fetch_pixels_{32,64} to fetch_pixels_raw_{32,64}
authorSøren Sandmann Pedersen <sandmann@redhat.com>
Fri, 19 Jun 2009 16:57:56 +0000 (12:57 -0400)
committerSøren Sandmann Pedersen <sandmann@redhat.com>
Fri, 19 Jun 2009 16:57:56 +0000 (12:57 -0400)
Also add a couple of comments about what these functions do.

pixman/pixman-bits-image.c
pixman/pixman-private.h

index bf321a6..d535b85 100644 (file)
@@ -111,7 +111,7 @@ _pixman_image_store_scanline_64 (bits_image_t *image, int x, int y, int width,
 static void
 bits_image_fetch_raw_pixels (bits_image_t *image, uint32_t *buffer, int n_pixels)
 {
-    image->fetch_pixels_32 (image, buffer, n_pixels);
+    image->fetch_pixels_raw_32 (image, buffer, n_pixels);
 }
 
 static void
@@ -610,7 +610,7 @@ bits_image_fetch_solid_32 (bits_image_t * image,
     color[0] = 0;
     color[1] = 0;
     
-    image->fetch_pixels_32 (image, color, 1);
+    image->fetch_pixels_raw_32 (image, color, 1);
     
     end = buffer + width;
     while (buffer < end)
@@ -629,7 +629,7 @@ bits_image_fetch_solid_64 (bits_image_t * image,
     coords[0] = 0;
     coords[1] = 1;
     
-    image->fetch_pixels_64 (image, (uint64_t *)color, 1);
+    image->fetch_pixels_raw_64 (image, (uint64_t *)color, 1);
     
     end = buffer + width;
     while (buffer < end)
@@ -771,8 +771,8 @@ bits_image_property_changed (pixman_image_t *image)
     bits->fetch_scanline_raw_64 =
        READ_ACCESS(pixman_fetchProcForPicture64)(bits);
     
-    bits->fetch_pixels_32 = READ_ACCESS(pixman_fetchPixelProcForPicture32)(bits);
-    bits->fetch_pixels_64 = READ_ACCESS(pixman_fetchPixelProcForPicture64)(bits);
+    bits->fetch_pixels_raw_32 = READ_ACCESS(pixman_fetchPixelProcForPicture32)(bits);
+    bits->fetch_pixels_raw_64 = READ_ACCESS(pixman_fetchPixelProcForPicture64)(bits);
 
     bits->store_scanline_64 = bits_image_store_scanline_64;
     bits->store_scanline_32 = bits_image_store_scanline_32;
index e891692..a0e4f45 100644 (file)
@@ -362,17 +362,30 @@ struct bits_image
     uint32_t *                 free_me;
     int                                rowstride; /* in number of uint32_t's */
 
-    fetch_pixels_32_t          fetch_pixels_32;
-    fetch_pixels_64_t          fetch_pixels_64;
+    /* Fetch raw pixels, with no regard for transformations, alpha map etc. */
+    fetch_pixels_32_t          fetch_pixels_raw_32;
+    fetch_pixels_64_t          fetch_pixels_raw_64;
 
-    scanStoreProc              store_scanline_32;
-    scanStoreProc              store_scanline_64;
+    /* Fetch raw scanlines, with no regard for transformations, alpha maps etc. */
+    fetchProc32                        fetch_scanline_raw_32;
+    fetchProc64                        fetch_scanline_raw_64;
 
+    /* Store scanlines with no regard for alpha maps */
     storeProc32                        store_scanline_raw_32;
     storeProc64                        store_scanline_raw_64;
 
-    fetchProc32                        fetch_scanline_raw_32;
-    fetchProc64                        fetch_scanline_raw_64;
+    /* Store a scanline, taking alpha maps into account */
+    scanStoreProc              store_scanline_32;
+    scanStoreProc              store_scanline_64;
+
+    /* Used for indirect access to the bits */
+    pixman_read_memory_func_t  read_func;
+    pixman_write_memory_func_t write_func;
+    
+    void *                     orig_data;      /* Stores pointer to original
+                                                * data, when the image is
+                                                * being accessed.
+                                                */
 };
 
 union pixman_image