Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11render.c @ 4619:b9a205e6369f
Moved brace to the beginning of the line for the beginning of functions
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 28 Jul 2010 01:05:58 -0700 |
parents | 844b5ef4b149 |
children | f4a93bde905f |
comparison
equal
deleted
inserted
replaced
4618:844b5ef4b149 | 4619:b9a205e6369f |
---|---|
182 texture->h, data->pixels, data->pitch); | 182 texture->h, data->pixels, data->pitch); |
183 } | 183 } |
184 | 184 |
185 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER | 185 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER |
186 static SDL_bool | 186 static SDL_bool |
187 CheckXRender(Display *display, int *major, int *minor) { | 187 CheckXRender(Display *display, int *major, int *minor) |
188 { | |
188 const char *env; | 189 const char *env; |
189 | 190 |
190 *major = *minor = 0; | 191 *major = *minor = 0; |
191 | 192 |
192 env = SDL_getenv("SDL_VIDEO_X11_XRENDER"); | 193 env = SDL_getenv("SDL_VIDEO_X11_XRENDER"); |
207 } | 208 } |
208 #endif | 209 #endif |
209 | 210 |
210 #ifdef SDL_VIDEO_DRIVER_X11_XFIXES | 211 #ifdef SDL_VIDEO_DRIVER_X11_XFIXES |
211 static SDL_bool | 212 static SDL_bool |
212 CheckXFixes(Display *display, int *major, int *minor) { | 213 CheckXFixes(Display *display, int *major, int *minor) |
214 { | |
213 const char *env; | 215 const char *env; |
214 | 216 |
215 *major = *minor = 0; | 217 *major = *minor = 0; |
216 | 218 |
217 env = SDL_getenv("SDL_VIDEO_X11_XFIXES"); | 219 env = SDL_getenv("SDL_VIDEO_X11_XFIXES"); |
232 } | 234 } |
233 #endif | 235 #endif |
234 | 236 |
235 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE | 237 #ifdef SDL_VIDEO_DRIVER_X11_XDAMAGE |
236 static SDL_bool | 238 static SDL_bool |
237 CheckXDamage(Display *display, int *major, int *minor) { | 239 CheckXDamage(Display *display, int *major, int *minor) |
240 { | |
238 const char *env; | 241 const char *env; |
239 | 242 |
240 *major = *minor = 0; | 243 *major = *minor = 0; |
241 | 244 |
242 env = SDL_getenv("SDL_VIDEO_X11_XDAMAGE"); | 245 env = SDL_getenv("SDL_VIDEO_X11_XDAMAGE"); |
257 } | 260 } |
258 #endif | 261 #endif |
259 | 262 |
260 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER | 263 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER |
261 static Uint32 | 264 static Uint32 |
262 XRenderPictFormatToSDLPixelFormatEnum(XRenderPictFormat *pict_format) { | 265 XRenderPictFormatToSDLPixelFormatEnum(XRenderPictFormat *pict_format) |
266 { | |
263 if (pict_format->type != PictTypeDirect) { | 267 if (pict_format->type != PictTypeDirect) { |
264 SDL_SetError("Indexed pict formats not supported ATM"); | 268 SDL_SetError("Indexed pict formats not supported ATM"); |
265 return 0; | 269 return 0; |
266 } | 270 } |
267 Uint32 Amask, Rmask, Gmask, Bmask; | 271 Uint32 Amask, Rmask, Gmask, Bmask; |
714 return 0; | 718 return 0; |
715 } | 719 } |
716 | 720 |
717 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER | 721 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER |
718 static void | 722 static void |
719 SDLMaskToXRenderMask(Uint32 sdl_mask, short *comp, short *compMask) { | 723 SDLMaskToXRenderMask(Uint32 sdl_mask, short *comp, short *compMask) |
724 { | |
720 if (sdl_mask == 0) { | 725 if (sdl_mask == 0) { |
721 *comp = 0; | 726 *comp = 0; |
722 *compMask = 0; | 727 *compMask = 0; |
723 } else { | 728 } else { |
724 (*comp) = 0; | 729 (*comp) = 0; |
733 } | 738 } |
734 } | 739 } |
735 } | 740 } |
736 | 741 |
737 static XRenderPictFormat* | 742 static XRenderPictFormat* |
738 PixelFormatEnumToXRenderPictFormat(SDL_Renderer * renderer, Uint32 format) { | 743 PixelFormatEnumToXRenderPictFormat(SDL_Renderer * renderer, Uint32 format) |
744 { | |
739 XRenderPictFormat* pict_fmt = NULL; | 745 XRenderPictFormat* pict_fmt = NULL; |
740 X11_RenderData *data = (X11_RenderData *) renderer->driverdata; | 746 X11_RenderData *data = (X11_RenderData *) renderer->driverdata; |
741 | 747 |
742 if (data->use_xrender) { | 748 if (data->use_xrender) { |
743 | 749 |
763 } | 769 } |
764 | 770 |
765 return pict_fmt; | 771 return pict_fmt; |
766 } | 772 } |
767 | 773 |
768 | |
769 static Visual* | 774 static Visual* |
770 PixelFormatEnumToVisual(SDL_Renderer * renderer, Uint32 format) { | 775 PixelFormatEnumToVisual(SDL_Renderer * renderer, Uint32 format) |
776 { | |
771 X11_RenderData *data = (X11_RenderData *) renderer->driverdata; | 777 X11_RenderData *data = (X11_RenderData *) renderer->driverdata; |
772 | 778 |
773 if (data->use_xrender) { | 779 if (data->use_xrender) { |
774 int bpp; | 780 int bpp; |
775 Uint32 Amask, Rmask, Gmask, Bmask; | 781 Uint32 Amask, Rmask, Gmask, Bmask; |
796 | 802 |
797 return NULL; | 803 return NULL; |
798 } | 804 } |
799 | 805 |
800 static XRenderColor | 806 static XRenderColor |
801 SDLColorToXRenderColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a) { | 807 SDLColorToXRenderColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a) |
808 { | |
802 double rd, gd, bd, ad; | 809 double rd, gd, bd, ad; |
803 XRenderColor ret; | 810 XRenderColor ret; |
804 rd = r / 255.0; | 811 rd = r / 255.0; |
805 gd = g / 255.0; | 812 gd = g / 255.0; |
806 bd = b / 255.0; | 813 bd = b / 255.0; |