From e7adc6269c8a054d5a4e1139ccc6b667407b108e Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Sat, 26 Sep 2020 19:16:58 +0200 Subject: Rip out frame callback Apparently, requesting a callback is asking "when can I render the /next/ frame?", not asking "when can I render /this/ frame?". Huh... --- src/surface.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/surface.c') diff --git a/src/surface.c b/src/surface.c index 63b56b3..ea4387d 100644 --- a/src/surface.c +++ b/src/surface.c @@ -133,9 +133,6 @@ bool create_surface (struct Wlclock_output *output) surface->hands_surface = NULL; surface->layer_surface = NULL; surface->configured = false; - surface->frame_callback = NULL; - surface->background_dirty = false; - surface->hands_dirty = false; if ( NULL == (surface->background_surface = wl_compositor_create_surface(clock->compositor)) ) { @@ -188,8 +185,6 @@ void destroy_surface (struct Wlclock_surface *surface) wl_surface_destroy(surface->background_surface); if ( surface->hands_surface != NULL ) wl_surface_destroy(surface->hands_surface); - if ( surface->frame_callback != NULL ) - wl_callback_destroy(surface->frame_callback); finish_buffer(&surface->background_buffers[0]); finish_buffer(&surface->background_buffers[1]); finish_buffer(&surface->hands_buffers[0]); @@ -212,7 +207,8 @@ void update_surface (struct Wlclock_surface *surface) return; configure_layer_surface(surface); configure_subsurface(surface); - schedule_frame(surface, true, true); + render_background_frame(surface); + render_hands_frame(surface); wl_surface_commit(surface->hands_surface); wl_surface_commit(surface->background_surface); } @@ -233,7 +229,7 @@ void update_all_hands (struct Wlclock *clock) wl_list_for_each_safe(op, tmp, &clock->outputs, link) if ( op->surface != NULL ) { - schedule_frame(op->surface, false, true); + render_hands_frame(op->surface); wl_surface_commit(op->surface->hands_surface); wl_surface_commit(op->surface->background_surface); } -- cgit v1.2.3