Greatly improved X11 DGA video speed (thanks Cezary!)
authorSam Lantinga <slouken@libsdl.org>
Sat, 09 Nov 2002 06:20:46 +0000
changeset 540 4bcfb93e0dfe
parent 539 a9e38f3b8e4d
child 541 796f2fe699be
Greatly improved X11 DGA video speed (thanks Cezary!)
docs.html
src/video/dga/SDL_dgavideo.c
--- a/docs.html	Sat Nov 09 06:13:28 2002 +0000
+++ b/docs.html	Sat Nov 09 06:20:46 2002 +0000
@@ -20,6 +20,7 @@
 Major changes since SDL 1.0.0:
 </H2>
 <UL>
+	<LI> 1.2.6: Greatly improved X11 DGA video speed (thanks Cezary!)
 	<LI> 1.2.6: Added MMX audio mixing code for gcc (thanks Stephane!)
 	<LI> 1.2.6: Fixed potential dropped events under DirectInput
 	<LI> 1.2.6: Added Visual C++ 7 (.NET) projects (thanks James!)
--- a/src/video/dga/SDL_dgavideo.c	Sat Nov 09 06:13:28 2002 +0000
+++ b/src/video/dga/SDL_dgavideo.c	Sat Nov 09 06:20:46 2002 +0000
@@ -816,7 +816,9 @@
   printf("Hardware accelerated rectangle fill: %dx%d at %d,%d\n", w, h, x, y);
 #endif
 	SDL_NAME(XDGAFillRectangle)(DGA_Display, DGA_Screen, x, y, w, h, color);
-	XFlush(DGA_Display);
+	if ( !(this->screen->flags & SDL_DOUBLEBUF) ) {
+		XFlush(DGA_Display);
+	}
 	DGA_AddBusySurface(dst);
 	UNLOCK_DISPLAY();
 	return(0);
@@ -856,7 +858,9 @@
 		SDL_NAME(XDGACopyArea)(DGA_Display, DGA_Screen,
 			srcx, srcy, w, h, dstx, dsty);
 	}
-	XFlush(DGA_Display);
+	if ( !(this->screen->flags & SDL_DOUBLEBUF) ) {
+		XFlush(DGA_Display);
+	}
 	DGA_AddBusySurface(src);
 	DGA_AddBusySurface(dst);
 	UNLOCK_DISPLAY();