From c17ac8c599a0a5808d3197b2623d68c64302aa82 Mon Sep 17 00:00:00 2001 From: Arjan Molenaar Date: Sat, 27 Jan 2024 15:34:59 +0100 Subject: [PATCH] Add empty callbacks for Gdk.DrawContext.empty_frame on macOS --- gdk/macos/gdkmacoscairocontext.c | 6 ++++++ gdk/macos/gdkmacosglcontext.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gdk/macos/gdkmacoscairocontext.c b/gdk/macos/gdkmacoscairocontext.c index 31a9091b75..df29a7b524 100644 --- a/gdk/macos/gdkmacoscairocontext.c +++ b/gdk/macos/gdkmacoscairocontext.c @@ -271,6 +271,11 @@ _gdk_macos_cairo_context_end_frame (GdkDrawContext *draw_context, [CATransaction commit]; } +static void +_gdk_macos_cairo_context_empty_frame (GdkDrawContext *draw_context) +{ +} + static void _gdk_macos_cairo_context_surface_resized (GdkDrawContext *draw_context) { @@ -287,6 +292,7 @@ _gdk_macos_cairo_context_class_init (GdkMacosCairoContextClass *klass) draw_context_class->begin_frame = _gdk_macos_cairo_context_begin_frame; draw_context_class->end_frame = _gdk_macos_cairo_context_end_frame; + draw_context_class->empty_frame = _gdk_macos_cairo_context_empty_frame; draw_context_class->surface_resized = _gdk_macos_cairo_context_surface_resized; cairo_context_class->cairo_create = _gdk_macos_cairo_context_cairo_create; diff --git a/gdk/macos/gdkmacosglcontext.c b/gdk/macos/gdkmacosglcontext.c index af52479c44..2e56f9e269 100644 --- a/gdk/macos/gdkmacosglcontext.c +++ b/gdk/macos/gdkmacosglcontext.c @@ -545,6 +545,11 @@ gdk_macos_gl_context_end_frame (GdkDrawContext *context, [CATransaction commit]; } +static void +gdk_macos_gl_context_empty_frame (GdkDrawContext *draw_context) +{ +} + static void gdk_macos_gl_context_surface_resized (GdkDrawContext *draw_context) { @@ -667,6 +672,7 @@ gdk_macos_gl_context_class_init (GdkMacosGLContextClass *klass) draw_context_class->begin_frame = gdk_macos_gl_context_begin_frame; draw_context_class->end_frame = gdk_macos_gl_context_end_frame; + draw_context_class->empty_frame = gdk_macos_gl_context_empty_frame; draw_context_class->surface_resized = gdk_macos_gl_context_surface_resized; gl_class->get_damage = gdk_macos_gl_context_get_damage;