pixman: Branch 'master'
Carl Worth
cworth at kemper.freedesktop.org
Sat Aug 25 23:36:37 PDT 2007
pixman/pixman-edge-imp.h | 4 ++--
pixman/pixman-edge.c | 2 +-
pixman/pixman-private.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
diff-tree 8ff7213f39edc1b2b8b60d6b0cc5d5f14ca1928d (from 028993aacb9ec48aa9d347d0d189250b464cf30f)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Sat Aug 25 23:30:41 2007 -0700
rasterize traps that extend outside of the image bounds correctly
Traps that extend outside of the image bounds are rasterized incorrectly
currently; the problem is a signed vs. unsigned comparison that got
introduced when a width parameter went from int -> uint. This patch
puts it back to int (since it's stored as an int in the bits structure
to begin with), and also fixes a similar warning in the memset wrapper
diff --git a/pixman/pixman-edge-imp.h b/pixman/pixman-edge-imp.h
index 5655318..c242aa4 100644
--- a/pixman/pixman-edge-imp.h
+++ b/pixman/pixman-edge-imp.h
@@ -35,8 +35,8 @@ rasterizeEdges (pixman_image_t *image,
pixman_fixed_t y = t;
uint32_t *line;
uint32_t *buf = (image)->bits.bits;
- uint32_t stride = (image)->bits.rowstride;
- uint32_t width = (image)->bits.width;
+ int32_t stride = (image)->bits.rowstride;
+ int32_t width = (image)->bits.width;
line = buf + pixman_fixed_to_int (y) * stride;
diff --git a/pixman/pixman-edge.c b/pixman/pixman-edge.c
index 191752f..24758c3 100644
--- a/pixman/pixman-edge.c
+++ b/pixman/pixman-edge.c
@@ -129,7 +129,7 @@ fbRasterizeEdges8 (pixman_image_t
int fill_size = 0;
uint32_t *buf = (image)->bits.bits;
int32_t stride = (image)->bits.rowstride;
- uint32_t width = (image)->bits.width;
+ int32_t width = (image)->bits.width;
line = buf + pixman_fixed_to_int (y) * stride;
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
index 89abf8f..775f7a7 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -630,7 +630,7 @@ union pixman_image
do { \
size_t _i; \
uint8_t *_dst = (uint8_t*)(dst); \
- for(_i = 0; _i < size; _i++) { \
+ for(_i = 0; _i < (size_t) size; _i++) { \
WRITE(_dst +_i, (val)); \
} \
} while (0)
More information about the xorg-commit
mailing list