gdkvulkancontext-win32.c: Implement ->begin_frame()

By doing so, we ensure that resizes of windows will work on Vulkan renderer, by
first calling gdk_win32_surface_handle_queued_move_resize() before we proceed
as usual
This commit is contained in:
Chun-wei Fan 2020-08-03 18:43:46 +08:00
parent 46a8a3fe31
commit 5ce0098adc

View File

@ -72,12 +72,23 @@ gdk_win32_vulkan_context_create_surface (GdkVulkanContext *context,
return result;
}
static void
gdk_win32_vulkan_context_begin_frame (GdkDrawContext *draw_context,
cairo_region_t *update_area)
{
gdk_win32_surface_handle_queued_move_resize (draw_context);
GDK_DRAW_CONTEXT_CLASS (gdk_win32_vulkan_context_parent_class)->begin_frame (draw_context, update_area);
}
static void
gdk_win32_vulkan_context_class_init (GdkWin32VulkanContextClass *klass)
{
GdkVulkanContextClass *context_class = GDK_VULKAN_CONTEXT_CLASS (klass);
GdkDrawContextClass *draw_context_class = GDK_DRAW_CONTEXT_CLASS (klass);
context_class->create_surface = gdk_win32_vulkan_context_create_surface;
draw_context_class->begin_frame = gdk_win32_vulkan_context_begin_frame;
}
static void