mirror of
https://github.com/brl/mutter.git
synced 2025-07-23 10:01:35 +00:00
wayland: Move buffer use count to MetaWaylandSurface
Each wl_surface.commit with a newly attached buffer should result in one wl_buffer.release for the attached buffer. For example attaching the same buffer to two different surfaces must always result in two wl_buffer.release events being emitted by the server. The client is responsible for counting the wl_buffer.release events and be sure to have received as many release events as it has attached and committed the buffer, before reusing it. https://bugzilla.gnome.org/show_bug.cgi?id=762828
This commit is contained in:
@ -726,7 +726,7 @@ client_window_should_be_mapped (MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
|
||||
!window->surface->buffer)
|
||||
!meta_wayland_surface_get_buffer (window->surface))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
@ -1554,7 +1554,7 @@ meta_window_should_be_showing (MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_WAYLAND
|
||||
if (window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND &&
|
||||
!window->surface->buffer)
|
||||
!meta_wayland_surface_get_buffer (window->surface))
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user