comparison src/video/SDL_blit_copy.c @ 2262:bee005ace1bf

Work in progress: merging new texture features into SDL blit system
author Sam Lantinga <slouken@libsdl.org>
date Fri, 17 Aug 2007 06:21:58 +0000
parents 79e00f5561f4
children c785543d1843
comparison
equal deleted inserted replaced
2261:c20476d7d7b3 2262:bee005ace1bf
93 { 93 {
94 Uint8 *src, *dst; 94 Uint8 *src, *dst;
95 int w, h; 95 int w, h;
96 int srcskip, dstskip; 96 int srcskip, dstskip;
97 97
98 w = info->d_width * info->dst->BytesPerPixel; 98 w = info->dst_w * info->dst->BytesPerPixel;
99 h = info->d_height; 99 h = info->dst_h;
100 src = info->s_pixels; 100 src = info->src;
101 dst = info->d_pixels; 101 dst = info->dst;
102 srcskip = w + info->s_skip; 102 srcskip = w + info->s_skip;
103 dstskip = w + info->d_skip; 103 dstskip = w + info->dst_pitch;
104 104
105 #ifdef __SSE__ 105 #ifdef __SSE__
106 if (SDL_HasSSE() && !((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) { 106 if (SDL_HasSSE() && !((uintptr_t) src & 15) && !((uintptr_t) dst & 15)) {
107 while (h--) { 107 while (h--) {
108 SDL_memcpySSE(dst, src, w); 108 SDL_memcpySSE(dst, src, w);
137 { 137 {
138 Uint8 *src, *dst; 138 Uint8 *src, *dst;
139 int w, h; 139 int w, h;
140 int skip; 140 int skip;
141 141
142 w = info->d_width * info->dst->BytesPerPixel; 142 w = info->dst_w * info->dst->BytesPerPixel;
143 h = info->d_height; 143 h = info->dst_h;
144 src = info->s_pixels; 144 src = info->src;
145 dst = info->d_pixels; 145 dst = info->dst;
146 skip = w + info->s_skip; 146 skip = w + info->s_skip;
147 if ((dst < src) || (dst >= (src + h * skip))) { 147 if ((dst < src) || (dst >= (src + h * skip))) {
148 SDL_BlitCopy(info); 148 SDL_BlitCopy(info);
149 } else { 149 } else {
150 src += ((h - 1) * skip); 150 src += ((h - 1) * skip);