summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-08-03 18:43:46 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-08-05 16:23:14 +0800
commit5ce0098adccbb26e8939c4e35278e25437a33205 (patch)
treedbcb2d106c55aa23bed1d58f2f6c2bcc1a8c3a08
parent46a8a3fe31aa539f4d557b6501a84149d9ae9b28 (diff)
downloadgtk+-5ce0098adccbb26e8939c4e35278e25437a33205.tar.gz
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
-rw-r--r--gdk/win32/gdkvulkancontext-win32.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdk/win32/gdkvulkancontext-win32.c b/gdk/win32/gdkvulkancontext-win32.c
index 607658dde9..e0d9ae8473 100644
--- a/gdk/win32/gdkvulkancontext-win32.c
+++ b/gdk/win32/gdkvulkancontext-win32.c
@@ -73,11 +73,22 @@ gdk_win32_vulkan_context_create_surface (GdkVulkanContext *context,
}
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