Simplified internal SDL_Surface structure

This commit is contained in:
Sam Lantinga
2024-09-30 22:15:38 -07:00
parent 1f3a0d12e6
commit 3234a3b902
52 changed files with 514 additions and 519 deletions

View File

@@ -86,9 +86,7 @@ typedef enum SDL_FlipMode
SDL_FLIP_VERTICAL /**< flip vertically */
} SDL_FlipMode;
/* Internal surface data */
typedef struct SDL_SurfaceData SDL_SurfaceData;
#ifndef SDL_INTERNAL
/**
* A collection of pixels used in software blitting.
*
@@ -105,8 +103,11 @@ typedef struct SDL_SurfaceData SDL_SurfaceData;
* alignment, and have undefined contents.
*
* \since This struct is available since SDL 3.0.0.
*
* \sa SDL_CreateSurface
* \sa SDL_DestroySurface
*/
typedef struct SDL_Surface
struct SDL_Surface
{
SDL_SurfaceFlags flags; /**< The flags of the surface, read-only */
SDL_PixelFormat format; /**< The format of the surface, read-only */
@@ -117,10 +118,11 @@ typedef struct SDL_Surface
int refcount; /**< Application reference count, used when freeing surface */
SDL_SurfaceData *internal; /**< Private */
} SDL_Surface;
void *reserved; /**< Reserved for internal use */
};
#endif /* !SDL_INTERNAL */
typedef struct SDL_Surface SDL_Surface;
/**
* Allocate a new surface with a specific pixel format.