summaryrefslogtreecommitdiff
path: root/src/surface.c
diff options
context:
space:
mode:
authorLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-09-26 19:16:58 +0200
committerLeon Henrik Plickat <leonhenrik.plickat@stud.uni-goettingen.de>2020-09-28 02:36:04 +0200
commite7adc6269c8a054d5a4e1139ccc6b667407b108e (patch)
tree49312549dce2f551ec5bd00cb6788cb733624b0b /src/surface.c
parent646f6545b9405aae65812470ba518a9701295751 (diff)
downloadwlclock-e7adc6269c8a054d5a4e1139ccc6b667407b108e.tar.gz
wlclock-e7adc6269c8a054d5a4e1139ccc6b667407b108e.tar.bz2
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...
Diffstat (limited to 'src/surface.c')
-rw-r--r--src/surface.c10
1 files changed, 3 insertions, 7 deletions
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);
}