wayland: get rid of buffer->copied_data boolean

We currently track whether or not a buffer can be released early
by looking at the copied_data boolean on the buffer.  This boolean
is, practically speaking, always set to TRUE for shm buffers and is
always false otherwise.

We can just as easily check if the buffer is a shm buffer to decide
whether or not to do an early release.  That's better from a
theoretical point of view since copied_data assumes a 1-to-1
relationship between surface and buffer, which may not actually hold.

This commit drops copied_data and changes the check to instead see
if the buffer is shm.

https://bugzilla.gnome.org/show_bug.cgi?id=761613
This commit is contained in:
Ray Strode
2016-02-08 16:07:34 -05:00
parent 4e82a751fb
commit e097bc8353
3 changed files with 10 additions and 5 deletions

View File

@ -140,9 +140,6 @@ meta_wayland_buffer_ensure_texture (MetaWaylandBuffer *buffer)
buffer->texture = texture;
if (shm_buffer)
buffer->copied_data = TRUE;
out:
return buffer->texture;
}