A client can reliably avoid allocating a second buffer per surface, if the compositor sends the wl_buffer.release event before the frame callback. To enable clients' single-buffering, release the wl_buffer early if possible. Otherwise clients will double-buffer. Releasing early is not possible, if the backend needs the buffer for migrating a surface to or from a non-primary weston_plane. In that case, a new buffer must arrive, before the old can be released. Backends will indicate this by setting weston_surface:keep_buffer to 1 in assign_planes(). A proper buffer reference in the backends would be better than the keep_buffer flag, but that would require a per-surface backend private. The rpi and DRM backends are updated to set keep_buffer, other backends do not support planes, so do not have to set it. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
parent
fb003d3457
commit
ccfeae2ad7
Loading…
Reference in new issue