wayland: don't prematurely release EGL buffers
commit 0165cb6974
changed
mutter to release committed shm buffers as soon as they were
uploaded to the GPU.
It also inadvertently changed mutter to prematurely
release EGL buffers (which never get copied, but get used
directly).
This commit corrects that mistake.
https://bugzilla.gnome.org/show_bug.cgi?id=761312
This commit is contained in:
parent
0165cb6974
commit
7adbb58736
@ -140,6 +140,9 @@ meta_wayland_buffer_ensure_texture (MetaWaylandBuffer *buffer)
|
|||||||
|
|
||||||
buffer->texture = texture;
|
buffer->texture = texture;
|
||||||
|
|
||||||
|
if (shm_buffer)
|
||||||
|
buffer->copied_data = TRUE;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
return buffer->texture;
|
return buffer->texture;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ struct _MetaWaylandBuffer
|
|||||||
uint32_t ref_count;
|
uint32_t ref_count;
|
||||||
|
|
||||||
uint32_t accessible : 1;
|
uint32_t accessible : 1;
|
||||||
|
uint32_t copied_data : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource);
|
MetaWaylandBuffer * meta_wayland_buffer_from_resource (struct wl_resource *resource);
|
||||||
|
@ -608,7 +608,7 @@ apply_pending_state (MetaWaylandSurface *surface,
|
|||||||
if (!cairo_region_is_empty (pending->damage))
|
if (!cairo_region_is_empty (pending->damage))
|
||||||
surface_process_damage (surface, pending->damage);
|
surface_process_damage (surface, pending->damage);
|
||||||
|
|
||||||
if (pending->buffer)
|
if (pending->buffer && pending->buffer->copied_data)
|
||||||
meta_wayland_buffer_release_control (pending->buffer);
|
meta_wayland_buffer_release_control (pending->buffer);
|
||||||
|
|
||||||
surface->offset_x += pending->dx;
|
surface->offset_x += pending->dx;
|
||||||
|
Loading…
Reference in New Issue
Block a user