Split fetch/fetchPixel/store proc types into 32-bit and 64-bit versions.
authorAaron Plattner <aplattner@nvidia.com>
Tue, 15 Apr 2008 20:13:46 +0000 (13:13 -0700)
committerSoren Sandmann Pedersen <sandmann@redhat.com>
Tue, 27 May 2008 16:55:43 +0000 (12:55 -0400)
Signed-off-by: Soren Sandmann Pedersen <sandmann@redhat.com>
pixman/pixman-access.c
pixman/pixman-compose.c
pixman/pixman-private.h
pixman/pixman-transformed.c

index 5d91fca..4a11bc0 100644 (file)
@@ -633,7 +633,7 @@ fbFetch_yv12 (bits_image_t *pict, int x, int line, int width, uint32_t *buffer)
     }
 }
 
-fetchProc ACCESS(pixman_fetchProcForPicture) (bits_image_t * pict)
+fetchProc32 ACCESS(pixman_fetchProcForPicture32) (bits_image_t * pict)
 {
     switch(pict->format) {
     case PIXMAN_a8r8g8b8: return fbFetch_a8r8g8b8;
@@ -1144,7 +1144,7 @@ fbFetchPixel_yv12 (bits_image_t *pict, int offset, int line)
        (b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0);
 }
 
-fetchPixelProc ACCESS(pixman_fetchPixelProcForPicture) (bits_image_t * pict)
+fetchPixelProc32 ACCESS(pixman_fetchPixelProcForPicture32) (bits_image_t * pict)
 {
     switch(pict->format) {
     case PIXMAN_a8r8g8b8: return fbFetchPixel_a8r8g8b8;
@@ -1624,7 +1624,7 @@ fbStore_g1 (pixman_image_t *image,
 }
 
 
-storeProc ACCESS(pixman_storeProcForPicture) (bits_image_t * pict)
+storeProc32 ACCESS(pixman_storeProcForPicture32) (bits_image_t * pict)
 {
     switch(pict->format) {
     case PIXMAN_a8r8g8b8: return fbStore_a8r8g8b8;
index de2378a..7230e08 100644 (file)
@@ -105,7 +105,7 @@ static void fbFetchSolid(bits_image_t * pict, int x, int y, int width, uint32_t
 {
     uint32_t color;
     uint32_t *end;
-    fetchPixelProc fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetchPixelProc32 fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     color = fetch(pict, 0, 0);
 
@@ -116,7 +116,7 @@ static void fbFetchSolid(bits_image_t * pict, int x, int y, int width, uint32_t
 
 static void fbFetch(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
 {
-    fetchProc fetch = ACCESS(pixman_fetchProcForPicture)(pict);
+    fetchProc32 fetch = ACCESS(pixman_fetchProcForPicture32)(pict);
 
     fetch(pict, x, y, width, buffer);
 }
@@ -126,7 +126,7 @@ fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
 {
     uint32_t *bits;
     int32_t stride;
-    storeProc store = ACCESS(pixman_storeProcForPicture)(pict);
+    storeProc32 store = ACCESS(pixman_storeProcForPicture32)(pict);
     const pixman_indexed_t * indexed = pict->indexed;
 
     bits = pict->bits;
index 96f6c21..588e23c 100644 (file)
@@ -146,16 +146,22 @@ typedef struct point point_t;
 typedef FASTCALL void (*CombineMaskU32) (uint32_t *src, const uint32_t *mask, int width);
 typedef FASTCALL void (*CombineFuncU32) (uint32_t *dest, const uint32_t *src, int width);
 typedef FASTCALL void (*CombineFuncC32) (uint32_t *dest, uint32_t *src, uint32_t *mask, int width);
-typedef FASTCALL void (*fetchProc)(bits_image_t *pict, int x, int y, int width,
-                                   uint32_t *buffer);
-typedef FASTCALL uint32_t (*fetchPixelProc)(bits_image_t *pict, int offset, int line);
-typedef FASTCALL void (*storeProc)(pixman_image_t *, uint32_t *bits,
-                                   const uint32_t *values, int x, int width,
-                                   const pixman_indexed_t *);
+typedef FASTCALL void (*fetchProc32)(bits_image_t *pict, int x, int y, int width,
+                                     uint32_t *buffer);
+typedef FASTCALL uint32_t (*fetchPixelProc32)(bits_image_t *pict, int offset, int line);
+typedef FASTCALL void (*storeProc32)(pixman_image_t *, uint32_t *bits,
+                                     const uint32_t *values, int x, int width,
+                                     const pixman_indexed_t *);
 
 typedef FASTCALL void (*CombineMaskU64) (uint64_t *src, const uint64_t *mask, int width);
 typedef FASTCALL void (*CombineFuncU64) (uint64_t *dest, const uint64_t *src, int width);
 typedef FASTCALL void (*CombineFuncC64) (uint64_t *dest, uint64_t *src, uint64_t *mask, int width);
+typedef FASTCALL void (*fetchProc64)(bits_image_t *pict, int x, int y, int width,
+                                     uint64_t *buffer);
+typedef FASTCALL uint64_t (*fetchPixelProc64)(bits_image_t *pict, int offset, int line);
+typedef FASTCALL void (*storeProc64)(pixman_image_t *, uint32_t *bits,
+                                     const uint64_t *values, int x, int width,
+                                     const pixman_indexed_t *);
 
 typedef struct _FbComposeData {
     uint8_t     op;
@@ -193,12 +199,19 @@ void pixman_composite_rect_general_accessors (const FbComposeData *data,
                                               void *dest_buffer);
 void pixman_composite_rect_general (const FbComposeData *data);
 
-fetchProc pixman_fetchProcForPicture (bits_image_t *);
-fetchPixelProc pixman_fetchPixelProcForPicture (bits_image_t *);
-storeProc pixman_storeProcForPicture (bits_image_t *);
-fetchProc pixman_fetchProcForPicture_accessors (bits_image_t *);
-fetchPixelProc pixman_fetchPixelProcForPicture_accessors (bits_image_t *);
-storeProc pixman_storeProcForPicture_accessors (bits_image_t *);
+fetchProc32 pixman_fetchProcForPicture32 (bits_image_t *);
+fetchPixelProc32 pixman_fetchPixelProcForPicture32 (bits_image_t *);
+storeProc32 pixman_storeProcForPicture32 (bits_image_t *);
+fetchProc32 pixman_fetchProcForPicture32_accessors (bits_image_t *);
+fetchPixelProc32 pixman_fetchPixelProcForPicture32_accessors (bits_image_t *);
+storeProc32 pixman_storeProcForPicture32_accessors (bits_image_t *);
+
+fetchProc64 pixman_fetchProcForPicture64 (bits_image_t *);
+fetchPixelProc64 pixman_fetchPixelProcForPicture64 (bits_image_t *);
+storeProc64 pixman_storeProcForPicture64 (bits_image_t *);
+fetchProc64 pixman_fetchProcForPicture64_accessors (bits_image_t *);
+fetchPixelProc64 pixman_fetchPixelProcForPicture64_accessors (bits_image_t *);
+storeProc64 pixman_storeProcForPicture64_accessors (bits_image_t *);
 
 void pixmanFetchSourcePict(source_image_t *, int x, int y, int width,
                            uint32_t *buffer, uint32_t *mask, uint32_t maskBits);
index e3ef17e..3f176d6 100644 (file)
 /*
  * Fetch from region strategies
  */
-typedef FASTCALL uint32_t (*fetchFromRegionProc)(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc fetch, pixman_box16_t *box);
+typedef FASTCALL uint32_t (*fetchFromRegionProc)(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box16_t *box);
 
 static inline uint32_t
-fbFetchFromNoRegion(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc fetch, pixman_box16_t *box)
+fbFetchFromNoRegion(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box16_t *box)
 {
     return fetch (pict, x, y);
 }
 
 static uint32_t
-fbFetchFromNRectangles(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc fetch, pixman_box16_t *box)
+fbFetchFromNRectangles(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box16_t *box)
 {
     pixman_box16_t box2;
     if (pixman_region_contains_point (pict->common.src_clip, x, y, &box2))
@@ -53,7 +53,7 @@ fbFetchFromNRectangles(bits_image_t *pict, int x, int y, uint32_t *buffer, fetch
 }
 
 static uint32_t
-fbFetchFromOneRectangle(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc fetch, pixman_box16_t *box)
+fbFetchFromOneRectangle(bits_image_t *pict, int x, int y, uint32_t *buffer, fetchPixelProc32 fetch, pixman_box16_t *box)
 {
     pixman_box16_t box2 = *box;
     return ((x < box2.x1) | (x >= box2.x2) | (y < box2.y1) | (y >= box2.y2)) ?
@@ -67,12 +67,12 @@ static void
 fbFetchTransformed_Nearest_Normal(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t* box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int x, y, i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
         fetchFromRegion = fbFetchFromNoRegion;
@@ -113,12 +113,12 @@ static void
 fbFetchTransformed_Nearest_Pad(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t *box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int x, y, i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
         fetchFromRegion = fbFetchFromNoRegion;
@@ -160,12 +160,12 @@ static void
 fbFetchTransformed_Nearest_General(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t *box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int x, y, i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
     {
@@ -203,12 +203,12 @@ static void
 fbFetchTransformed_Bilinear_Normal(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t *box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
         fetchFromRegion = fbFetchFromNoRegion;
@@ -280,12 +280,12 @@ static void
 fbFetchTransformed_Bilinear_Pad(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t *box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
         fetchFromRegion = fbFetchFromNoRegion;
@@ -357,12 +357,12 @@ static void
 fbFetchTransformed_Bilinear_General(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t *box = NULL;
-    fetchPixelProc   fetch;
+    fetchPixelProc32   fetch;
     fetchFromRegionProc fetchFromRegion;
     int i;
 
     /* initialize the two function pointers */
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     if(pixman_region_n_rects (pict->common.src_clip) == 1)
     {
@@ -436,7 +436,7 @@ static void
 fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits, pixman_bool_t affine, pixman_vector_t v, pixman_vector_t unit)
 {
     pixman_box16_t dummy;
-    fetchPixelProc fetch;
+    fetchPixelProc32 fetch;
     int i;
 
     pixman_fixed_t *params = pict->common.filter_params;
@@ -444,7 +444,7 @@ fbFetchTransformed_Convolution(bits_image_t * pict, int width, uint32_t *buffer,
     int32_t cheight = pixman_fixed_to_int(params[1]);
     int xoff = (params[0] - pixman_fixed_1) >> 1;
     int yoff = (params[1] - pixman_fixed_1) >> 1;
-    fetch = ACCESS(pixman_fetchPixelProcForPicture)(pict);
+    fetch = ACCESS(pixman_fetchPixelProcForPicture32)(pict);
 
     params += 2;
     for (i = 0; i < width; ++i) {
@@ -671,8 +671,8 @@ ACCESS(fbStoreExternalAlpha)(bits_image_t * pict, int x, int y, int width,
     uint32_t *bits, *alpha_bits;
     int32_t stride, astride;
     int ax, ay;
-    storeProc store;
-    storeProc astore;
+    storeProc32 store;
+    storeProc32 astore;
     const pixman_indexed_t * indexed = pict->indexed;
     const pixman_indexed_t * aindexed;
 
@@ -683,8 +683,8 @@ ACCESS(fbStoreExternalAlpha)(bits_image_t * pict, int x, int y, int width,
        return;
     }
 
-    store = ACCESS(pixman_storeProcForPicture)(pict);
-    astore = ACCESS(pixman_storeProcForPicture)(pict->common.alpha_map);
+    store = ACCESS(pixman_storeProcForPicture32)(pict);
+    astore = ACCESS(pixman_storeProcForPicture32)(pict->common.alpha_map);
     aindexed = pict->common.alpha_map->indexed;
 
     ax = x;