Commit 64c1a907 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

present: Drop flip_idler member from present_vblank_rec

It's redundant with the pixmap member of struct xwl_present_event.
parent 51dc27b4
Pipeline #338522 passed with stages
in 4 minutes and 41 seconds
...@@ -279,8 +279,11 @@ xwl_present_flip_notify_vblank(present_vblank_ptr vblank, uint64_t ust, uint64_t ...@@ -279,8 +279,11 @@ xwl_present_flip_notify_vblank(present_vblank_ptr vblank, uint64_t ust, uint64_t
xorg_list_del(&vblank->event_queue); xorg_list_del(&vblank->event_queue);
if (xwl_present_window->flip_active) { if (xwl_present_window->flip_active) {
if (xwl_present_window->flip_active->flip_idler) struct xwl_present_event *event =
xwl_present_free_idle_vblank(xwl_present_window->flip_active); xwl_present_event_from_id((uintptr_t)xwl_present_window->flip_active);
if (!event->pixmap)
xwl_present_free_event(event);
else else
/* Put the previous flip in the idle_queue and wait for further notice from /* Put the previous flip in the idle_queue and wait for further notice from
* the Wayland compositor * the Wayland compositor
...@@ -358,21 +361,20 @@ xwl_present_buffer_release(void *data) ...@@ -358,21 +361,20 @@ xwl_present_buffer_release(void *data)
{ {
struct xwl_present_window *xwl_present_window; struct xwl_present_window *xwl_present_window;
struct xwl_present_event *event = data; struct xwl_present_event *event = data;
present_vblank_ptr vblank;
if (!event) if (!event)
return; return;
xwl_present_window = xwl_present_window_priv(event->vblank.window); vblank = &event->vblank;
if (xwl_present_window->flip_active == &event->vblank || present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
xwl_present_get_pending_flip(xwl_present_window) == &event->vblank) {
event->vblank.flip_idler = TRUE;
xwl_present_window = xwl_present_window_priv(vblank->window);
if (xwl_present_window->flip_active == vblank ||
xwl_present_get_pending_flip(xwl_present_window) == vblank)
xwl_present_release_pixmap(event); xwl_present_release_pixmap(event);
else
return; xwl_present_free_event(event);
}
xwl_present_free_idle_vblank(&event->vblank);
} }
static void static void
......
...@@ -81,7 +81,6 @@ struct present_vblank { ...@@ -81,7 +81,6 @@ struct present_vblank {
Bool queued; /* on present_exec_queue */ Bool queued; /* on present_exec_queue */
Bool flip; /* planning on using flip */ Bool flip; /* planning on using flip */
Bool flip_ready; /* wants to flip, but waiting for previous flip or unflip */ Bool flip_ready; /* wants to flip, but waiting for previous flip or unflip */
Bool flip_idler; /* driver explicitly permitted idling */
Bool sync_flip; /* do flip synchronous to vblank */ Bool sync_flip; /* do flip synchronous to vblank */
Bool abort_flip; /* aborting this flip */ Bool abort_flip; /* aborting this flip */
PresentFlipReason reason; /* reason for which flip is not possible */ PresentFlipReason reason; /* reason for which flip is not possible */
......
...@@ -106,7 +106,6 @@ present_vblank_init(present_vblank_ptr vblank, ...@@ -106,7 +106,6 @@ present_vblank_init(present_vblank_ptr vblank,
vblank->notifies = notifies; vblank->notifies = notifies;
vblank->num_notifies = num_notifies; vblank->num_notifies = num_notifies;
vblank->has_suboptimal = (options & PresentOptionSuboptimal); vblank->has_suboptimal = (options & PresentOptionSuboptimal);
vblank->flip_idler = FALSE;
if (pixmap != NULL && if (pixmap != NULL &&
!(options & PresentOptionCopy) && !(options & PresentOptionCopy) &&
......
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