From 40b4735f915a264884bc7382cd3fab4af12b07fd Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Tue, 17 Jun 2008 14:39:27 +0000 Subject: Change u_int32_t to uint32_t svn path=/trunk/netsurf/; revision=4376 --- image/rsvg.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'image') diff --git a/image/rsvg.c b/image/rsvg.c index 740d2cc7d..bc483e8d3 100644 --- a/image/rsvg.c +++ b/image/rsvg.c @@ -46,7 +46,7 @@ #include "utils/messages.h" #include "utils/talloc.h" -static inline void rsvg_argb_to_abgr(u_int32_t pixels[], int width, int height, +static inline void rsvg_argb_to_abgr(uint32_t pixels[], int width, int height, size_t rowstride); bool rsvg_create(struct content *c, const char *params[]) @@ -97,15 +97,15 @@ bool rsvg_process_data(struct content *c, char *data, * \param rowstride Number of bytes to skip after each row (this * implementation requires this to be a multiple of 4.) */ -static inline void rsvg_argb_to_abgr(u_int32_t pixels[], int width, int height, +static inline void rsvg_argb_to_abgr(uint32_t pixels[], int width, int height, size_t rowstride) { - u_int32_t *p = &pixels[0]; + uint32_t *p = &pixels[0]; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - u_int32_t e = p[x]; - u_int32_t s = (((e & 0xff) << 24) | + uint32_t e = p[x]; + uint32_t s = (((e & 0xff) << 24) | ((e & 0xff00) << 8) | ((e & 0xff0000) >> 8) | ((e & 0xff000000) >> 24)); @@ -166,7 +166,7 @@ bool rsvg_convert(struct content *c, int iwidth, int iheight) } rsvg_handle_render_cairo(d->rsvgh, d->ct); - rsvg_argb_to_abgr((u_int32_t *)bitmap_get_buffer(d->bitmap), + rsvg_argb_to_abgr((uint32_t *)bitmap_get_buffer(d->bitmap), c->width, c->height, bitmap_get_rowstride(d->bitmap)); -- cgit v1.2.3