Commit 2bfc46d4 authored by Michel Dänzer's avatar Michel Dänzer Committed by Adam Jackson

xwayland: Rename xwl_present_events_notify to xwl_present_msc_bump

And consolidate more code from xwl_present_timer_callback and
xwl_present_frame_callback in it.
parent 5e8b9a3a
...@@ -192,11 +192,13 @@ static const struct wl_buffer_listener xwl_present_release_listener = { ...@@ -192,11 +192,13 @@ static const struct wl_buffer_listener xwl_present_release_listener = {
}; };
static void static void
xwl_present_events_notify(struct xwl_present_window *xwl_present_window) xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
{ {
uint64_t msc = xwl_present_window->msc; uint64_t msc = ++xwl_present_window->msc;
struct xwl_present_event *event, *tmp; struct xwl_present_event *event, *tmp;
xwl_present_window->ust = GetTimeInMicros();
xorg_list_for_each_entry_safe(event, tmp, xorg_list_for_each_entry_safe(event, tmp,
&xwl_present_window->event_list, &xwl_present_window->event_list,
list) { list) {
...@@ -218,10 +220,8 @@ xwl_present_timer_callback(OsTimerPtr timer, ...@@ -218,10 +220,8 @@ xwl_present_timer_callback(OsTimerPtr timer,
struct xwl_present_window *xwl_present_window = arg; struct xwl_present_window *xwl_present_window = arg;
xwl_present_window->frame_timer_firing = TRUE; xwl_present_window->frame_timer_firing = TRUE;
xwl_present_window->msc++;
xwl_present_window->ust = GetTimeInMicros();
xwl_present_events_notify(xwl_present_window); xwl_present_msc_bump(xwl_present_window);
xwl_present_reset_timer(xwl_present_window); xwl_present_reset_timer(xwl_present_window);
return 0; return 0;
...@@ -242,10 +242,7 @@ xwl_present_frame_callback(void *data, ...@@ -242,10 +242,7 @@ xwl_present_frame_callback(void *data,
return; return;
} }
xwl_present_window->msc++; xwl_present_msc_bump(xwl_present_window);
xwl_present_window->ust = GetTimeInMicros();
xwl_present_events_notify(xwl_present_window);
/* we do not need the timer anymore for this frame, /* we do not need the timer anymore for this frame,
* reset it for potentially the next one * reset it for potentially the next one
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment