Remove workaround for flushing wl_release events
authorFufu Fang <fufu.fang@arm.com>
Thu, 29 Apr 2021 23:19:25 +0000 (00:19 +0100)
committerFufu Fang <fufu.fang@arm.com>
Fri, 30 Apr 2021 10:36:44 +0000 (11:36 +0100)
This workaround was required when using Weston 3.0.91 or earlier
versions.

Change-Id: Ie89afb8644aaac156fd35a15b4bb8959065a9393
Signed-off-by: Fufu Fang <fufu.fang@arm.com>
wsi/wayland/swapchain.cpp

index cafc6a4..8b26d0f 100644 (file)
@@ -696,24 +696,6 @@ void swapchain::present_image(uint32_t pendingIndex)
          wl_callback_add_listener(cb, &frame_listener, &m_present_pending);
       }
    }
-   else
-   {
-      assert(m_present_mode == VK_PRESENT_MODE_MAILBOX_KHR);
-      /* weston only _queues_ wl_buffer::release events. This means when the
-       * compositor flushes the client it only sends the events if some other events
-       * have been posted.
-       *
-       * As such we have to request a sync callback - we discard it straight away
-       * as we don't actually need the callback, but it means the
-       * wl_buffer::release event is actually sent.
-       */
-      wl_callback *cb = wl_display_sync(m_display);
-      assert(cb);
-      if (cb)
-      {
-         wl_callback_destroy(cb);
-      }
-   }
 
    wl_surface_commit(m_surface);
    res = wl_display_flush(m_display);