Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11video.c @ 270:37fa1484f71b
From: "Mattias Engdeg�rd" <f91-men@nada.kth.se>
To: slouken@devolution.com
Subject: Re: [SDL] Question about SDL_FillRect()
I benchmarked with and without clipping UpdateRects and was unable to find
any difference on my moderately slow machine. Anyway, I haven't added
clipping in this patch, but fixed a couple of bugs and generally cleaned
up some of the X11 image code. Most importantly, UpdateRects now checks
for both zero height and width. Also, I eliminated the entire code to
byteswap X11 images since X11 can do that automatically if you ask it
nicely :-)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 18 Jan 2002 22:02:03 +0000 |
parents | e8157fcb3114 |
children | f6ffac90895c |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c Fri Jan 18 19:41:59 2002 +0000 +++ b/src/video/x11/SDL_x11video.c Fri Jan 18 22:02:03 2002 +0000 @@ -404,26 +404,14 @@ /* use default screen (from $DISPLAY) */ SDL_Screen = DefaultScreen(SDL_Display); + use_mitshm = 0; #ifndef NO_SHARED_MEMORY /* Check for MIT shared memory extension */ - use_mitshm = 0; if ( local_X11 ) { use_mitshm = XShmQueryExtension(SDL_Display); } #endif /* NO_SHARED_MEMORY */ - /* See whether or not we need to swap pixels */ - swap_pixels = 0; - if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) { - if ( XImageByteOrder(SDL_Display) == MSBFirst ) { - swap_pixels = 1; - } - } else { - if ( XImageByteOrder(SDL_Display) == LSBFirst ) { - swap_pixels = 1; - } - } - /* Get the available video modes */ if(X11_GetVideoModes(this) < 0) return -1;