SDL_Surface refcount: destination surface keep track of surfaces

that are mapped to it and automatically invalidate them when it is freed

- refcount is kept so that an external application can still create a reference
to SDL_Surface.

- lock_data was un-used and is now renamed and used as a list keep track of the blitmap
This commit is contained in:
Sylvain Becker
2020-09-07 18:50:30 +02:00
parent cce6c60518
commit ebc12a2fd2
4 changed files with 67 additions and 13 deletions

View File

@@ -80,7 +80,9 @@ typedef struct SDL_Surface
/** information needed for surfaces requiring locks */
int locked; /**< Read-only */
void *lock_data; /**< Read-only */
/** list of BlitMap that hold a reference to this surface */
void *list_blitmap; /**< Private */
/** clipping information */
SDL_Rect clip_rect; /**< Read-only */