From de632fc9c8d7d026ccad1afc2f72224ee9639023 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 26 Jan 2018 16:23:24 +1000 Subject: Renderer: Handle resize events on-demand instead of polling We now differentiate between a resize event and surface change/destroyed event, reducing the overhead for resizes in the Vulkan backend. It is also now now safe to change the surface multiple times if the video thread is lagging behind. --- Source/Core/DolphinNoGUI/MainNoGUI.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp') diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp index c78a67589a..def748832f 100644 --- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp +++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp @@ -321,12 +321,8 @@ class PlatformX11 : public Platform { last_window_width = event.xconfigure.width; last_window_height = event.xconfigure.height; - - // We call Renderer::ChangeSurface here to indicate the size has changed, - // but pass the same window handle. This is needed for the Vulkan backend, - // otherwise it cannot tell that the window has been resized on some drivers. if (g_renderer) - g_renderer->ChangeSurface(s_window_handle); + g_renderer->ResizeSurface(last_window_width, last_window_height); } } break; -- cgit v1.2.3