XSyncSetCounter (display, counter, sync_value);
}
-static void
-surface_pre_damage (GdkSurface *surface)
+void
+gdk_x11_surface_pre_damage (GdkSurface *surface)
{
GdkSurface *toplevel_surface = gdk_surface_get_toplevel (surface);
GdkSurfaceImplX11 *impl;
GdkSurfaceImplX11 *impl = GDK_SURFACE_IMPL_X11 (surface->impl);
if (impl->tracking_damage)
- surface_pre_damage (surface);
+ gdk_x11_surface_pre_damage (surface);
}
/* We want to know when cairo drawing causes damage to the window,
impl->toplevel->configure_counter_value = 0;
- surface_pre_damage (surface);
+ gdk_x11_surface_pre_damage (surface);
}
else if (force_frame)
{
/* When mapping the surface, we really want to freeze the
rendering of the surface by the compositor until we've
actually painted something into the surface's buffer. */
- surface_pre_damage (surface);
+ gdk_x11_surface_pre_damage (surface);
}
else
{
if (height < 1)
height = 1;
- surface_pre_damage (surface);
+ gdk_x11_surface_pre_damage (surface);
XResizeWindow (GDK_SURFACE_XDISPLAY (surface),
GDK_SURFACE_XID (surface),
if (height < 1)
height = 1;
- surface_pre_damage (surface);
+ gdk_x11_surface_pre_damage (surface);
XMoveResizeWindow (GDK_SURFACE_XDISPLAY (surface),
GDK_SURFACE_XID (surface),
surface);
}
+static void
+gdk_x11_vulkan_context_end_frame (GdkDrawContext *context,
+ cairo_region_t *painted,
+ cairo_region_t *damage)
+{
+ GdkSurface *surface = gdk_draw_context_get_surface (context);
+
+ gdk_x11_surface_pre_damage (surface);
+
+ GDK_DRAW_CONTEXT_CLASS (gdk_x11_vulkan_context_parent_class)->end_frame (context, painted, damage);
+}
+
static void
gdk_x11_vulkan_context_class_init (GdkX11VulkanContextClass *klass)
{
GdkVulkanContextClass *context_class = GDK_VULKAN_CONTEXT_CLASS (klass);
+ GdkDrawContextClass *draw_context_class = GDK_DRAW_CONTEXT_CLASS (klass);
+
+ draw_context_class->end_frame = gdk_x11_vulkan_context_end_frame;
context_class->create_surface = gdk_x11_vulkan_context_create_surface;
}