From 90c5766caf16e35cb871116a4655a106a3c272dc Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 9 Mar 2010 11:10:00 +0100 Subject: Use macros from rather than duplicate them --- common/canvas_utils.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'common/canvas_utils.c') diff --git a/common/canvas_utils.c b/common/canvas_utils.c index 89ebe121..2ab8f0b6 100644 --- a/common/canvas_utils.c +++ b/common/canvas_utils.c @@ -18,6 +18,8 @@ #include "canvas_utils.h" +#include + #ifdef __GNUC__ #include #include @@ -42,10 +44,6 @@ extern int gdi_handlers; } #endif -#ifndef ALIGN -#define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1)) -#endif - static void release_data(pixman_image_t *image, void *release_data) { PixmanData *data = (PixmanData *)release_data; @@ -154,11 +152,11 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig break; case PIXMAN_a8: bitmap_info.inf.bmiHeader.biBitCount = 8; - nstride = ALIGN(width, 4); + nstride = SPICE_ALIGN(width, 4); break; case PIXMAN_a1: bitmap_info.inf.bmiHeader.biBitCount = 1; - nstride = ALIGN(width, 32) / 8; + nstride = SPICE_ALIGN(width, 32) / 8; break; default: CANVAS_ERROR("invalid format"); @@ -208,10 +206,10 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig stride = width * 4; break; case PIXMAN_a8: - stride = ALIGN(width, 4); + stride = SPICE_ALIGN(width, 4); break; case PIXMAN_a1: - stride = ALIGN(width, 32) / 8; + stride = SPICE_ALIGN(width, 32) / 8; break; default: CANVAS_ERROR("invalid format"); -- cgit