weston/clients
Leandro Ribeiro 7724c5ea38 clients/simple-dmabuf-feedback: do not use buffer before compositor's response
This fixes an issue when running simple-dmabuf-feedback:
"wl_display@1: error 1: invalid arguments for wl_surface@3.attach".

As we are not using create_immed request from zwp_linux_dmabuf_v1, we
can't start to use a dma-buf buffer before we process compositor's event
telling us that the creation succeeded.

This was causing problems in the following scenario:

1. buffer is marked to be recreated (because of dma-buf feedback);
2. in buffer_release() event, we destroy the buffer and recreate it;
3. after we recreate it, roundtrip is not called, as we don't want to
   block during the drawing loop;
4. buffer status is not being properly tracked, so we are trying to
   use a buffer before receiving the event from the compositor telling
   us that the creation succeeded.

To fix this, this patch improves buffer status tracking. Now we only
pick a buffer in the drawing loop when it is available. Also, if we have
no buffers available we perform a roundtrip and try again, as we may
have recreated all of them but still didn't have the chance to process
compositor's events telling us that creation succeeded.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2022-04-27 11:52:00 +00:00
..
calibrator.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
clickdot.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
cliptest.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
confine.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
content_protection.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
desktop-shell.c clients/desktop-shell: Add a displayname= option for launchers 2022-02-24 00:38:55 +02:00
dnd.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
editor.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
eventdemo.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
flower.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
fullscreen.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
gears.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
image.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
ivi-shell-user-interface.c log: remove "%m" from format strings by using strerror(errno) 2019-05-02 22:10:30 +02:00
keyboard.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
meson.build clients: drop weston-info 2022-02-03 16:19:27 +00:00
multi-resource.c multi-resource: Convert to xdg-shell 2021-10-14 09:28:04 +00:00
nested-client.c Unify the include style of shared/ headers 2019-10-04 16:04:48 +03:00
nested.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
presentation-shm.c clients/presentation-shm: use xdg_shell instead of wl_shell 2019-06-27 17:44:19 +00:00
resizor.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
scaler.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
screenshot.c screenshooter: rename some functions to avoid conflicts 2020-10-27 12:19:39 +00:00
simple-damage.c clients/simple-*: Add appids for other clients 2022-01-21 18:39:23 +00:00
simple-dmabuf-egl.c clients/simple-dmabuf-*: Increase buffer limit to four 2022-02-17 12:26:41 +01:00
simple-dmabuf-feedback.c clients/simple-dmabuf-feedback: do not use buffer before compositor's response 2022-04-27 11:52:00 +00:00
simple-dmabuf-v4l.c clients/simple-dmabuf-*: Increase buffer limit to four 2022-02-17 12:26:41 +01:00
simple-egl.c clients/simple-*: Add appids for other clients 2022-01-21 18:39:23 +00:00
simple-im.c log: remove "%m" from format strings by using strerror(errno) 2019-05-02 22:10:30 +02:00
simple-shm.c clients/simple-*: Add appids for other clients 2022-01-21 18:39:23 +00:00
simple-touch.c simple-touch: Exit on xdg_toplevel::close 2021-10-15 16:52:08 +00:00
smoke.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
stacking.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
subsurfaces.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
terminal.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
touch-calibrator.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
transformed.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
weston-debug.c weston-debug: Handle destruction of stream description 2021-06-01 13:55:33 +03:00
window.c clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00
window.h clients/window: Add functions to set/retrieve app_id 2022-01-21 18:39:23 +00:00