Detach proxies from queue

Instead of destroying the wayland buffers from the private data
we just remove the proxies from the queue.

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I0e9dd158feaffa697ea30b3c49d41661ec3d924c
This commit is contained in:
Iason Paraskevopoulos 2025-12-02 16:24:43 +00:00
parent 0866cfc352
commit 5e225e0896

View file

@ -75,6 +75,11 @@ public:
return m_buffer.get();
}
void remove_proxy()
{
wl_proxy_set_queue(reinterpret_cast<wl_proxy *>(m_buffer.get()), nullptr);
}
private:
wayland::wayland_owner<wl_buffer> m_buffer;
};
@ -99,7 +104,11 @@ swapchain::~swapchain()
{
for (auto &img : m_swapchain_images)
{
img.set_data(util::unique_ptr<swapchain_image_data>());
auto data = img.get_data<wayland_image_data>();
if (data != nullptr)
{
data->remove_proxy();
}
}
wl_display_roundtrip_queue(m_display, m_buffer_queue);