MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_ConvertSurfaceFormat

Function SDL_ConvertSurfaceFormat

deps/SDL2/src/video/SDL_surface.c:1185–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183}
1184
1185SDL_Surface *
1186SDL_ConvertSurfaceFormat(SDL_Surface * surface, Uint32 pixel_format,
1187 Uint32 flags)
1188{
1189 SDL_PixelFormat *fmt;
1190 SDL_Surface *convert = NULL;
1191
1192 fmt = SDL_AllocFormat(pixel_format);
1193 if (fmt) {
1194 convert = SDL_ConvertSurface(surface, fmt, flags);
1195 SDL_FreeFormat(fmt);
1196 }
1197 return convert;
1198}
1199
1200/*
1201 * Create a surface on the stack for quick blit operations

Callers 5

mainFunction · 0.85
SDL_CreateColorCursorFunction · 0.85
SDL_SetWindowIconFunction · 0.85
Emscripten_CreateCursorFunction · 0.85
Android_CreateCursorFunction · 0.85

Calls 3

SDL_AllocFormatFunction · 0.85
SDL_ConvertSurfaceFunction · 0.85
SDL_FreeFormatFunction · 0.85

Tested by 1

mainFunction · 0.68