mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-15 09:49:23 -05:00
* Fix leaky swapchain when resizing on game mode and dispose of handle after usage VideoRecorder would get a strong handle copy of the swapchain every frame and retain it, causing native to fail to shutdown the copies from it Made usage of getting native swapchain consistent on managed on other stuff, doing it like this ensures GC properly disposes of the strong handles even not disposing explicitly Remove now unused ScreenRecorder.def and ScreenshotService.def There are still optimizations to swapchain I'd like to send on another commit, game is allocating way more swapchains than needed even without the leak, has two completely different paths depending if you are MSAA or not, this can all be much simpler https://files.facepunch.com/sampavlovic/1b1811b1/EjDyxbTahs.png * Remove NativeLayerRenderTarget, was unused and fucked * Keep it as an ITexture/HRenderTextureStrong in managed so we avoid IDisposable, ReadTextureAsync with ITexture