Added SDL_CreateSurfaceUninitialized()

Currently this is an internal API, but we can expose it in the future.
This commit is contained in:
Sam Lantinga
2026-06-05 07:46:31 -07:00
parent 2fd15d9e0d
commit fa2a726cc3
27 changed files with 65 additions and 48 deletions

View File

@@ -958,7 +958,7 @@ static SDL_Surface *GLES_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect
SDL_PixelFormat format = renderer->target ? renderer->target->format : SDL_PIXELFORMAT_RGBA32;
SDL_Surface *surface;
surface = SDL_CreateSurface(rect->w, rect->h, format);
surface = SDL_CreateSurfaceUninitialized(rect->w, rect->h, format);
if (!surface) {
return NULL;
}