mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-01 20:48:03 +02:00
tests: assert that capture info was received before trying screenshot
If the source is not supported, we won't receive the capture
information. So the capture info (size/format) will be zeroed, and we
fail while trying to create a buffer for the screenshot with size/format
zeroed.
With this patch we fail if we don't receive the capture info, what makes
the failure reason more explicit.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
(cherry picked from commit cf64fbe784)
This commit is contained in:
parent
8b0c2e313e
commit
ea821df74b
1 changed files with 3 additions and 0 deletions
|
|
@ -1705,6 +1705,9 @@ client_capture_output(struct client *client,
|
|||
|
||||
client_roundtrip(client);
|
||||
|
||||
assert(capt.width != 0 && capt.height != 0 && capt.drm_format != 0 &&
|
||||
"capture source not available");
|
||||
|
||||
buf = create_shm_buffer(client,
|
||||
capt.width, capt.height, capt.drm_format);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue