diff 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
line wrap: on
line diff
--- a/src/video/SDL_blit.c	Sun Apr 17 10:36:03 2005 +0000
+++ b/src/video/SDL_blit.c	Sun Apr 17 10:40:41 2005 +0000
@@ -280,6 +280,17 @@
 			video->CheckHWBlit(this, surface, surface->map->dst);
 		}
 	}
+	
+	/* if an alpha pixel format is specified, we can accelerate alpha blits */
+	if (((surface->flags & SDL_HWSURFACE) == SDL_HWSURFACE )&&(current_video->displayformatalphapixel)) 
+	{
+		if ( (surface->flags & SDL_SRCALPHA) ) 
+			if ( current_video->info.blit_hw_A ) {
+				SDL_VideoDevice *video = current_video;
+				SDL_VideoDevice *this  = current_video;
+				video->CheckHWBlit(this, surface, surface->map->dst);
+			}
+	}
 
 	/* Get the blit function index, based on surface mode */
 	/* { 0 = nothing, 1 = colorkey, 2 = alpha, 3 = colorkey+alpha } */