Mercurial > sdl-ios-xcode
diff src/video/SDL_draw.h @ 2899:a0c837a16e4c
Added ARGB optimized case for Mac OS X
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 21 Dec 2008 08:55:06 +0000 |
parents | e40448bc7727 |
children | 3a9636c83849 |
line wrap: on
line diff
--- a/src/video/SDL_draw.h Sun Dec 21 08:28:25 2008 +0000 +++ b/src/video/SDL_draw.h Sun Dec 21 08:55:06 2008 +0000 @@ -165,6 +165,37 @@ DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_RGB888) /* + * Define draw operators for ARGB8888 + */ + +#define DRAW_SETPIXEL_ARGB8888 \ + DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) + +#define DRAW_SETPIXEL_BLEND_ARGB8888 \ + DRAW_SETPIXEL_BLEND(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ + ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) + +#define DRAW_SETPIXEL_ADD_ARGB8888 \ + DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ + ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) + +#define DRAW_SETPIXEL_MOD_ARGB8888 \ + DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \ + ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa)) + +#define DRAW_SETPIXELXY_ARGB8888(x, y) \ + DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888) + +#define DRAW_SETPIXELXY_BLEND_ARGB8888(x, y) \ + DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_BLEND_ARGB8888) + +#define DRAW_SETPIXELXY_ADD_ARGB8888(x, y) \ + DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ADD_ARGB8888) + +#define DRAW_SETPIXELXY_MOD_ARGB8888(x, y) \ + DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_MOD_ARGB8888) + +/* * Define draw operators for general RGB */