comparison src/video/SDL_blit.c @ 1052:68f607298ca9

Some work on using accelerated alpha blits with hardware surfaces. From Stephane Marchesin's fork, don't know who originally wrote it.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 17 Apr 2005 10:40:41 +0000
parents 9301b429c99f
children b81f54c3963f
comparison
equal deleted inserted replaced
1051:091350827e08 1052:68f607298ca9
277 if ( hw_blit_ok ) { 277 if ( hw_blit_ok ) {
278 SDL_VideoDevice *video = current_video; 278 SDL_VideoDevice *video = current_video;
279 SDL_VideoDevice *this = current_video; 279 SDL_VideoDevice *this = current_video;
280 video->CheckHWBlit(this, surface, surface->map->dst); 280 video->CheckHWBlit(this, surface, surface->map->dst);
281 } 281 }
282 }
283
284 /* if an alpha pixel format is specified, we can accelerate alpha blits */
285 if (((surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE )&&(current_video->displayformatalphapixel))
286 {
287 if ( (surface->flags & SDL_SRCALPHA) )
288 if ( current_video->info.blit_hw_A ) {
289 SDL_VideoDevice *video = current_video;
290 SDL_VideoDevice *this = current_video;
291 video->CheckHWBlit(this, surface, surface->map->dst);
292 }
282 } 293 }
283 294
284 /* Get the blit function index, based on surface mode */ 295 /* Get the blit function index, based on surface mode */
285 /* { 0 = nothing, 1 = colorkey, 2 = alpha, 3 = colorkey+alpha } */ 296 /* { 0 = nothing, 1 = colorkey, 2 = alpha, 3 = colorkey+alpha } */
286 blit_index = 0; 297 blit_index = 0;