xwayland/present: Use present_vblank_ptr instead of xwl_present_event*
Where the latter isn't really needed. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
fe8c7855f3
commit
212cfbcf68
|
@ -380,21 +380,19 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
|
||||||
{
|
{
|
||||||
present_vblank_ptr flip_pending = xwl_present_get_pending_flip(xwl_present_window);
|
present_vblank_ptr flip_pending = xwl_present_get_pending_flip(xwl_present_window);
|
||||||
uint64_t msc = ++xwl_present_window->msc;
|
uint64_t msc = ++xwl_present_window->msc;
|
||||||
struct xwl_present_event *event, *tmp;
|
present_vblank_ptr vblank, tmp;
|
||||||
|
|
||||||
xwl_present_window->ust = GetTimeInMicros();
|
xwl_present_window->ust = GetTimeInMicros();
|
||||||
|
|
||||||
if (flip_pending && flip_pending->sync_flip)
|
if (flip_pending && flip_pending->sync_flip)
|
||||||
xwl_present_flip_notify_vblank(flip_pending, xwl_present_window->ust, msc);
|
xwl_present_flip_notify_vblank(flip_pending, xwl_present_window->ust, msc);
|
||||||
|
|
||||||
xorg_list_for_each_entry_safe(event, tmp,
|
xorg_list_for_each_entry_safe(vblank, tmp, &xwl_present_window->wait_list, event_queue) {
|
||||||
&xwl_present_window->wait_list,
|
if (vblank->exec_msc <= msc) {
|
||||||
vblank.event_queue) {
|
|
||||||
if (event->vblank.exec_msc <= msc) {
|
|
||||||
DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n",
|
DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n",
|
||||||
event->vblank.event_id, xwl_present_window->ust, msc));
|
vblank->event_id, xwl_present_window->ust, msc));
|
||||||
|
|
||||||
xwl_present_execute(&event->vblank, xwl_present_window->ust, msc);
|
xwl_present_execute(vblank, xwl_present_window->ust, msc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -435,14 +433,13 @@ xwl_present_sync_callback(void *data,
|
||||||
struct wl_callback *callback,
|
struct wl_callback *callback,
|
||||||
uint32_t time)
|
uint32_t time)
|
||||||
{
|
{
|
||||||
struct xwl_present_event *event = data;
|
present_vblank_ptr vblank = data;
|
||||||
struct xwl_present_window *xwl_present_window =
|
struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(vblank->window);
|
||||||
xwl_present_window_get_priv(event->vblank.window);
|
|
||||||
|
|
||||||
wl_callback_destroy(xwl_present_window->sync_callback);
|
wl_callback_destroy(xwl_present_window->sync_callback);
|
||||||
xwl_present_window->sync_callback = NULL;
|
xwl_present_window->sync_callback = NULL;
|
||||||
|
|
||||||
xwl_present_flip_notify_vblank(&event->vblank, xwl_present_window->ust, xwl_present_window->msc);
|
xwl_present_flip_notify_vblank(vblank, xwl_present_window->ust, xwl_present_window->msc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wl_callback_listener xwl_present_sync_listener = {
|
static const struct wl_callback_listener xwl_present_sync_listener = {
|
||||||
|
@ -706,7 +703,7 @@ xwl_present_flip(WindowPtr present_window,
|
||||||
wl_display_sync(xwl_window->xwl_screen->display);
|
wl_display_sync(xwl_window->xwl_screen->display);
|
||||||
wl_callback_add_listener(xwl_present_window->sync_callback,
|
wl_callback_add_listener(xwl_present_window->sync_callback,
|
||||||
&xwl_present_sync_listener,
|
&xwl_present_sync_listener,
|
||||||
event);
|
&event->vblank);
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_display_flush(xwl_window->xwl_screen->display);
|
wl_display_flush(xwl_window->xwl_screen->display);
|
||||||
|
|
Loading…
Reference in New Issue