weston/clients
Pekka Paalanen 949b2eb751 clients: rewrite screenshot.c for new protocol
The functionality of this screenshooting helper client is kept exactly
the same as before: if you have multiple outputs, some transformed, some
scale, in any layout, this will create a "multi-image" where the
framebuffer (the physical image) of each output is pasted into a row of
images in the order the outputs were advertised thrugh wl_registry.
Output transform or scale are not accounted for. If you have a monitor
rotated sideways, the screenshot will have the image of that monitor
reverse-sideways.

Otherwise the client is almost completely re-written, so trying to read
the diff is not that useful.

The old screenshooting protocol is replaced with the new
weston-output-capture protocol. This makes it unnecessary to listen for
wl_output information (since we do not handle output transform or scale
anyway).

The buffer sizes and formats are dictated by the compositor, which also
means we cannot hardcode the format. Hence, use Pixman for the blitting,
in case it needs to do format conversion. It is good to get rid of
hand-crafted pixel data manipulation code too.

For that reason we also need a pixel format database to convert between
DRM fourcc, wl_shm and Pixman codes. We link to libweston to borrow its
database instead of inventing another partial copy of it. It's weird to
use compositor library private API in a client, but better than the
alternative.

The original code had no tear-down code at all. Now, if everything
succeeds, the program ends with no unfreed memory according to ASan. If
something fails, it still YOLO's it (doesn't free stuff). That's how far
my pedantry carried.

I also did not bother taking output transform or scale into account,
since the old code did not either. It would be nice to create a seamless
image of the desktop with shots rotated and scaled to align, in the max
scale over all outputs. Meh.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2022-11-29 11:12:32 +02: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 desktop-shell: Use custom_env to launch panel clients 2022-07-19 14:12:37 +00: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/eventdemo: Remove duplicated param entries 2022-09-14 16:46:24 +03: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
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: rewrite screenshot.c for new protocol 2022-11-29 11:12:32 +02:00
multi-resource.c multi-resource: Convert to xdg-shell 2021-10-14 09:28:04 +00:00
presentation-shm.c helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +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 clients: rewrite screenshot.c for new protocol 2022-11-29 11:12:32 +02: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-egl: drop Y_INVERT flag 2022-11-07 11:28:29 +02:00
simple-dmabuf-feedback.c simple-dmabuf-feedback: Correct the rectangle orientation 2022-11-07 11:54:15 +02:00
simple-dmabuf-v4l.c helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +00:00
simple-egl.c simple-egl: Add option for fixed width/height fullscreen ratio 2022-10-05 15:42:35 +03: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 clients/simple-touch: use xzalloc() for buffer 2022-07-20 12:45:04 +03: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 weston-terminal: Don't leak Cairo fonts 2022-06-29 14:33:21 +01: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 helpers: Add a u64 from 2 u32 helper 2022-10-27 08:13:30 +00:00
window.h toytoolkit: Delete remnants of EGL support 2022-06-29 14:33:21 +01:00