Mercurial > sdl-ios-xcode
comparison src/video/SDL_fill.c @ 2830:af3dd02cf043
fixed formatting
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 05 Dec 2008 06:19:09 +0000 |
parents | 6d99edd791bf |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2829:16fe3b867887 | 2830:af3dd02cf043 |
---|---|
29 /* *INDENT-OFF* */ | 29 /* *INDENT-OFF* */ |
30 | 30 |
31 #ifdef _MSC_VER | 31 #ifdef _MSC_VER |
32 #define SSE_BEGIN \ | 32 #define SSE_BEGIN \ |
33 __m128 c128; \ | 33 __m128 c128; \ |
34 c128.m128_u32[0] = color; \ | 34 c128.m128_u32[0] = color; \ |
35 c128.m128_u32[1] = color; \ | 35 c128.m128_u32[1] = color; \ |
36 c128.m128_u32[2] = color; \ | 36 c128.m128_u32[2] = color; \ |
37 c128.m128_u32[3] = color; | 37 c128.m128_u32[3] = color; |
38 #else | 38 #else |
39 #define SSE_BEGIN \ | 39 #define SSE_BEGIN \ |
40 DECLARE_ALIGNED(Uint32, cccc[4], 16); \ | 40 DECLARE_ALIGNED(Uint32, cccc[4], 16); \ |
41 cccc[0] = color; \ | 41 cccc[0] = color; \ |
42 cccc[1] = color; \ | 42 cccc[1] = color; \ |
69 if (n > 15) { \ | 69 if (n > 15) { \ |
70 int adjust = 16 - ((uintptr_t)p & 15); \ | 70 int adjust = 16 - ((uintptr_t)p & 15); \ |
71 if (adjust < 16) { \ | 71 if (adjust < 16) { \ |
72 n -= adjust; \ | 72 n -= adjust; \ |
73 adjust /= bpp; \ | 73 adjust /= bpp; \ |
74 while(adjust--) { \ | 74 while (adjust--) { \ |
75 *((type *)p) = (type)color; \ | 75 *((type *)p) = (type)color; \ |
76 p += bpp; \ | 76 p += bpp; \ |
77 } \ | 77 } \ |
78 } \ | 78 } \ |
79 SSE_WORK; \ | 79 SSE_WORK; \ |
80 } \ | 80 } \ |
81 if (n & 63) { \ | 81 if (n & 63) { \ |
82 int remainder = (n & 63); \ | 82 int remainder = (n & 63); \ |
83 remainder /= bpp; \ | 83 remainder /= bpp; \ |
84 while(remainder--) { \ | 84 while (remainder--) { \ |
85 *((type *)p) = (type)color; \ | 85 *((type *)p) = (type)color; \ |
86 p += bpp; \ | 86 p += bpp; \ |
87 } \ | 87 } \ |
88 } \ | 88 } \ |
89 pixels += pitch; \ | 89 pixels += pitch; \ |
134 if (n > 7) { \ | 134 if (n > 7) { \ |
135 int adjust = 8 - ((uintptr_t)p & 7); \ | 135 int adjust = 8 - ((uintptr_t)p & 7); \ |
136 if (adjust < 8) { \ | 136 if (adjust < 8) { \ |
137 n -= adjust; \ | 137 n -= adjust; \ |
138 adjust /= bpp; \ | 138 adjust /= bpp; \ |
139 while(adjust--) { \ | 139 while (adjust--) { \ |
140 *((type *)p) = (type)color; \ | 140 *((type *)p) = (type)color; \ |
141 p += bpp; \ | 141 p += bpp; \ |
142 } \ | 142 } \ |
143 } \ | 143 } \ |
144 MMX_WORK; \ | 144 MMX_WORK; \ |
145 } \ | 145 } \ |
146 if (n & 63) { \ | 146 if (n & 63) { \ |
147 int remainder = (n & 63); \ | 147 int remainder = (n & 63); \ |
148 remainder /= bpp; \ | 148 remainder /= bpp; \ |
149 while(remainder--) { \ | 149 while (remainder--) { \ |
150 *((type *)p) = (type)color; \ | 150 *((type *)p) = (type)color; \ |
151 p += bpp; \ | 151 p += bpp; \ |
152 } \ | 152 } \ |
153 } \ | 153 } \ |
154 pixels += pitch; \ | 154 pixels += pitch; \ |