Merge 'Destroy attached objects before destroying the queue' into 'main'

See merge request mesa/vulkan-wsi-layer!106
This commit is contained in:
Rosen Zhelev 2024-09-13 15:21:24 +00:00
commit 7d3f40f2ec
2 changed files with 9 additions and 7 deletions

View file

@ -128,10 +128,10 @@ struct surface::init_parameters
surface::surface(const init_parameters &params)
: wsi::surface()
, wayland_display(params.display)
, surface_queue(nullptr)
, wayland_surface(params.surf)
, supported_formats(params.allocator)
, properties(this, params.allocator)
, surface_queue(nullptr)
, last_frame_callback(nullptr)
, present_pending(false)
{

View file

@ -148,6 +148,14 @@ private:
/** The native Wayland display */
wl_display *wayland_display;
/**
* Container for a private queue for surface events generated by the layer.
* The queue is also used for dispatching frame callback events.
* It should be destroyed after the objects that attached to it.
*/
wayland_owner<wl_event_queue> surface_queue;
/** The native Wayland surface */
wl_surface *wayland_surface;
/** A list of DRM formats supported by the Wayland compositor on this surface */
@ -163,12 +171,6 @@ private:
/** Container for the surface specific zwp_linux_surface_synchronization_v1 interface. */
wayland_owner<zwp_linux_surface_synchronization_v1> surface_sync_interface;
/**
* Container for a private queue for surface events generated by the layer.
* The queue is also used for dispatching frame callback events.
*/
wayland_owner<wl_event_queue> surface_queue;
/**
* Container for a callback object for the latest frame done event.
*