src/video/SDL_surface.c
changeset 5375 16877f74123c
parent 5296 48067bfc300c
child 5438 b705640cb34a
equal deleted inserted replaced
5374:dacb4f5e0dd3 5375:16877f74123c
   812 
   812 
   813     /* We're ready to go! */
   813     /* We're ready to go! */
   814     return (convert);
   814     return (convert);
   815 }
   815 }
   816 
   816 
       
   817 SDL_Surface *
       
   818 SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format,
       
   819                          Uint32 flags)
       
   820 {
       
   821     SDL_PixelFormat *fmt;
       
   822     SDL_Surface *convert;
       
   823 
       
   824     fmt = SDL_AllocFormat(pixel_format);
       
   825     if (fmt) {
       
   826         convert = SDL_ConvertSurface(surface, fmt, flags);
       
   827         SDL_FreeFormat(fmt);
       
   828     }
       
   829     return convert;
       
   830 }
       
   831 
   817 /*
   832 /*
   818  * Create a surface on the stack for quick blit operations
   833  * Create a surface on the stack for quick blit operations
   819  */
   834  */
   820 static __inline__ SDL_bool
   835 static __inline__ SDL_bool
   821 SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format,
   836 SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format,