SDL/src/video
Sam Lantinga 67f9348baa Fixed bug 3790 - Memory leak with surfaces blitting on each other
bastien.bouclet

When creating two surfaces and blitting them onto the other, SDL's internal reference counting fails, and one of the surfaces is not freed when calling SDL_FreeSurface.

Example code :

SDL_Surface *s1 = SDL_CreateRGBSurfaceWithFormat(0, 640, 480, 32, SDL_PIXELFORMAT_ARGB8888);
SDL_Surface *s2 = SDL_CreateRGBSurfaceWithFormat(0, 640, 480, 32, SDL_PIXELFORMAT_ARGB8888);

SDL_BlitSurface(s1, NULL, s2, NULL);
SDL_BlitSurface(s2, NULL, s1, NULL);

SDL_FreeSurface(s2);
SDL_FreeSurface(s1);

With this example, s1 is not freed after calling SDL_FreeSurface, its refcount attribute is still positive.
2017-09-04 11:46:14 -07:00
..
android Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
cocoa macOS: bug-fix for #3793, "fullscreen toggle does not maintain SDL_Renderer's logical size" 2017-09-03 17:33:49 -04:00
directfb Fixed 3783 - Default libGL path for directFB on Linux differs from x11 path 2017-08-28 09:51:25 -07:00
dummy Updated copyright for 2017 2017-01-01 18:33:28 -08:00
emscripten Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
haiku Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
khronos Fixed bug 3616 - SDL_GL_CreateContext fails with SDL_GL_CONTEXT_DEBUG_FLAG and ANGLE/GLES 2.0 2017-08-29 22:04:43 -07:00
kmsdrm Fixed bug 3792 - [KMS/DRM] Wrong GBM format 2017-09-01 12:54:38 -07:00
mir Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
nacl Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
pandora Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
psp Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
qnx Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
raspberry video: Let video targets optionally decide their default OpenGL configs. 2017-09-02 19:35:32 -04:00
uikit Code style cleanup in the Cocoa and UIKit vulkan files. 2017-08-31 21:26:13 -03:00
vivante Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
wayland Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
windows Fixed bug 3785 - fix windows build after revision 11382 2017-08-28 22:44:48 -07:00
winrt Fixed mingw Windows build, since SDL_vulkan_internal.h includes windows.h 2017-08-28 00:43:14 -07:00
x11 x11: Correctly restore previous GL context after sacrificial context is done. 2017-09-01 14:08:09 -04:00
SDL_RLEaccel.c Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks 2017-08-14 06:28:21 -07:00
SDL_RLEaccel_c.h Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks 2017-08-14 06:28:21 -07:00
SDL_blit.c Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks 2017-08-14 06:28:21 -07:00
SDL_blit.h Fixed bug 3746 - remove SDLCALL attribute from SDL_BlitFunc() funcptr 2017-08-13 21:09:00 -07:00
SDL_blit_0.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_1.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_A.c Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
SDL_blit_N.c Fixed comment style. 2017-02-26 21:20:39 +01:00
SDL_blit_auto.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_auto.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_copy.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_copy.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_slow.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_blit_slow.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_bmp.c Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
SDL_clipboard.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_egl.c egl: Cast to size_t, in case platform's NativeDisplayType isn't a pointer. 2017-08-29 16:30:49 -04:00
SDL_egl_c.h Fixed bug 3690 - SDL2 KMS/DRM render context support 2017-08-02 10:22:48 -07:00
SDL_fillrect.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_pixels.c Fixed bug 3158 - SDL display window scrambled over VNC 2017-08-12 16:02:33 -07:00
SDL_pixels_c.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_rect.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_rect_c.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_shape.c Fixed bug 3699 - Shaped windows are distorted unless width is divisible by 8 2017-07-11 08:16:00 -07:00
SDL_shape_internals.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
SDL_stretch.c Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
SDL_surface.c Fixed bug 3790 - Memory leak with surfaces blitting on each other 2017-09-04 11:46:14 -07:00
SDL_sysvideo.h video: Let video targets optionally decide their default OpenGL configs. 2017-09-02 19:35:32 -04:00
SDL_video.c video: Let video targets optionally decide their default OpenGL configs. 2017-09-02 19:35:32 -04:00
SDL_vulkan_internal.h Fixed build when Wayland is dynamically loaded 2017-08-28 01:42:18 -07:00
SDL_vulkan_utils.c Removed unneeded Vulkan symbol definitions 2017-08-28 13:40:32 -07:00
sdlgenblit.pl Updated copyright for 2017 2017-01-01 18:33:28 -08:00