Use a consistent type for stride and more importantly, use always a signed type.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 17 Sep 2007 16:08:31 +0000 (17:08 +0100)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 17 Sep 2007 16:08:31 +0000 (17:08 +0100)
pixman/pixman-compose.c
pixman/pixman-edge-imp.h
pixman/pixman-edge.c

index 31ad490..b2b977c 100644 (file)
@@ -3674,7 +3674,7 @@ static void pixmanFetchSourcePict(source_image_t * pict, int x, int y, int width
 static void fbFetchTransformed(bits_image_t * pict, int x, int y, int width, uint32_t *buffer, uint32_t *mask, uint32_t maskBits)
 {
     uint32_t     *bits;
-    uint32_t    stride;
+    int    stride;
     fetchPixelProc   fetch;
     pixman_vector_t    v;
     pixman_vector_t  unit;
@@ -4187,7 +4187,7 @@ static void fbFetchExternalAlpha(bits_image_t * pict, int x, int y, int width, u
 static void fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
 {
     uint32_t *bits;
-    uint32_t stride;
+    int stride;
     storeProc store = storeProcForPicture(pict);
     const pixman_indexed_t * indexed = pict->indexed;
 
@@ -4201,7 +4201,7 @@ static void fbStore(bits_image_t * pict, int x, int y, int width, uint32_t *buff
 static void fbStoreExternalAlpha(bits_image_t * pict, int x, int y, int width, uint32_t *buffer)
 {
     uint32_t *bits, *alpha_bits;
-    uint32_t stride, astride;
+    int stride, astride;
     int ax, ay;
     storeProc store;
     storeProc astore;
@@ -4257,7 +4257,7 @@ PIXMAN_COMPOSITE_RECT_GENERAL (const FbComposeData *data,
     unsigned int srcClass = SOURCE_IMAGE_CLASS_UNKNOWN;
     unsigned int maskClass = SOURCE_IMAGE_CLASS_UNKNOWN;
     uint32_t *bits;
-    uint32_t stride;
+    int stride;
     int xoff, yoff;
 
     if (data->op == PIXMAN_OP_CLEAR)
index c89a449..5a95abe 100644 (file)
@@ -35,8 +35,8 @@ rasterizeEdges (pixman_image_t  *image,
     pixman_fixed_t  y = t;
     uint32_t  *line;
     uint32_t *buf = (image)->bits.bits;
-    int32_t stride = (image)->bits.rowstride;
-    int32_t width = (image)->bits.width;
+    int stride = (image)->bits.rowstride;
+    int width = (image)->bits.width;
 
     line = buf + pixman_fixed_to_int (y) * stride;
 
index d9e2d9a..1e7acb0 100644 (file)
@@ -128,8 +128,8 @@ fbRasterizeEdges8 (pixman_image_t       *image,
     int fill_start = -1, fill_end = -1;
     int fill_size = 0;
     uint32_t *buf = (image)->bits.bits;
-    int32_t stride = (image)->bits.rowstride;
-    int32_t width = (image)->bits.width;
+    int stride = (image)->bits.rowstride;
+    int width = (image)->bits.width;
 
     line = buf + pixman_fixed_to_int (y) * stride;