mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-08 10:56:27 +00:00
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:
@@ -1328,6 +1328,8 @@ SDL_FreeSurface(SDL_Surface * surface)
|
||||
}
|
||||
SDL_InvalidateMap(surface->map);
|
||||
|
||||
SDL_InvalidateAllBlitMap(surface);
|
||||
|
||||
if (--surface->refcount > 0) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user