xwayland/present: Drop sync_flip member of struct xwl_present_window
The same information can be determined from the flip queue. Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
fc53e3c536
commit
b2a06e0700
|
@ -122,7 +122,9 @@ xwl_present_get_pending_flip(struct xwl_present_window *xwl_present_window)
|
||||||
static inline Bool
|
static inline Bool
|
||||||
xwl_present_has_pending_events(struct xwl_present_window *xwl_present_window)
|
xwl_present_has_pending_events(struct xwl_present_window *xwl_present_window)
|
||||||
{
|
{
|
||||||
return !!xwl_present_window->sync_flip ||
|
present_vblank_ptr flip_pending = xwl_present_get_pending_flip(xwl_present_window);
|
||||||
|
|
||||||
|
return (flip_pending && flip_pending->sync_flip) ||
|
||||||
!xorg_list_is_empty(&xwl_present_window->wait_list);
|
!xorg_list_is_empty(&xwl_present_window->wait_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,17 +444,17 @@ xwl_present_buffer_release(void *data)
|
||||||
static void
|
static void
|
||||||
xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
|
xwl_present_msc_bump(struct xwl_present_window *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;
|
struct xwl_present_event *event, *tmp;
|
||||||
|
|
||||||
xwl_present_window->ust = GetTimeInMicros();
|
xwl_present_window->ust = GetTimeInMicros();
|
||||||
|
|
||||||
event = xwl_present_window->sync_flip;
|
if (flip_pending && flip_pending->sync_flip) {
|
||||||
xwl_present_window->sync_flip = NULL;
|
event = xwl_present_event_from_id((uintptr_t)flip_pending);
|
||||||
if (event) {
|
|
||||||
event->pending = FALSE;
|
event->pending = FALSE;
|
||||||
|
|
||||||
xwl_present_flip_notify_vblank(&event->vblank, xwl_present_window->ust, msc);
|
xwl_present_flip_notify_vblank(flip_pending, xwl_present_window->ust, msc);
|
||||||
|
|
||||||
if (!event->pixmap) {
|
if (!event->pixmap) {
|
||||||
/* If the buffer was already released, clean up now */
|
/* If the buffer was already released, clean up now */
|
||||||
|
@ -757,8 +759,6 @@ xwl_present_flip(WindowPtr present_window,
|
||||||
event->pending = TRUE;
|
event->pending = TRUE;
|
||||||
|
|
||||||
xorg_list_init(&event->list);
|
xorg_list_init(&event->list);
|
||||||
if (sync_flip)
|
|
||||||
xwl_present_window->sync_flip = event;
|
|
||||||
|
|
||||||
xwl_pixmap_set_buffer_release_cb(pixmap, xwl_present_buffer_release, event);
|
xwl_pixmap_set_buffer_release_cb(pixmap, xwl_present_buffer_release, event);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
#ifdef GLAMOR_HAS_GBM
|
#ifdef GLAMOR_HAS_GBM
|
||||||
struct xwl_present_window {
|
struct xwl_present_window {
|
||||||
struct xwl_present_event *sync_flip;
|
|
||||||
WindowPtr window;
|
WindowPtr window;
|
||||||
struct xorg_list frame_callback_list;
|
struct xorg_list frame_callback_list;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue