Commit Graph

8899 Commits

Author SHA1 Message Date
Marius Vlad 65ada65973 meson.build: Bump to version 11.0.91 for the alpha release
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-26 16:24:49 +03:00
Robert Mader 445ff6728b pipewire-[backend|plugin]: Add timestamps to buffers
In Pipewire and Gstreamer terminology Weston is a "live" source (as we
do not explicitly set PW_KEY_STREAM_IS_LIVE to false).
Such sources, be it compositors, cameras or microphones, usually set
the current system time as timestamps on buffers in order to make life
easier for consumers. Thus let's do so as well.

This notably helps when recording using `gstpipewiresrc` with the
`keepalive-time` property set.

Signed-off-by: Robert Mader <robert.mader@collabora.com>
2023-04-20 12:32:49 +00:00
Sebastian Wick 34400d7d16 clients/simple-dmabuf-feedback: get buffer size from configure events
instead of the output mode. The mode doesn't say anything about the
actual output geometry which could lead to buffers extending the output
region on rotated monitors. This now also works with moving the window
to different monitors.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-04-20 11:42:15 +00:00
Sebastian Wick 6c27f0b87c clients/simple-dmabuf-feedback: create buffers on demand
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-04-20 11:42:15 +00:00
Sebastian Wick 62d7a46ba2 clients/simple-dmabuf-feedback: fullscreen surface from the start
Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-04-20 11:42:15 +00:00
Sebastian Wick 57cba6afb4 clients/simple-dmabuf-feedback: fix dangling pointers
to presentation feedback objects.

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
2023-04-20 11:42:15 +00:00
Marius Vlad af4fb2b9f6 CONTRIBUTING.md: Fix link for patchwork
Noticed this giving a 404 when accessing and it seems that the correct
link is with the 's'.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-20 09:46:51 +03:00
Marius Vlad 837ebaf487 CONTRIBUTING.md: Inform users that they'd need to ask for perms
Due to the latest developments fdo no longer allows new users to fork
the Weston project so let's inform users about that.

This also swaps 'Finding something to work on' with 'Sending patches'
paragraph as the first thing users need to look into.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-20 09:44:14 +03:00
Philipp Zabel 2d3e170955 backend-pipewire: remove linear modifier for now
As of PipeWire version 0.3.69, the gstpipewiresrc element uses the
existence of a modifier as a trigger to select dmabuf memory, failing
caps negotiation as we don't send DMA buffers yet.

Remove the linear modifier for now, to be added back when we add dmabuf
support to the PipeWire backend. This allows testing the PipeWire
backend with current GStreamer + PipeWire.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-04-19 13:56:44 +00:00
Philipp Zabel dfa821d4c0 backend-pipewire: pass backend to weston_pipewire_output_api::create_head()
Pass the backend instead of the compositor to the PipeWire output API
create_head() method and increment the API version.

That way the backend will not have to find the backend pointer from the
compositor. This is trivial now, but in the multi-backend case would
entail iterating over all backends to find the correct one.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-04-19 13:36:45 +00:00
Philipp Zabel 9e070c0840 backend-drm: obtain DRM backend from listener in session_notify()
The session_listener is embedded in the DRM backend structure.
Use this to obtain the DRM backend with container_of().

That way the DRM backend will not have to be found from the compositor.
This is trivial now, but in the multi-backend case would entail
iterating over all backends to find the correct one.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-04-19 13:36:45 +00:00
Daniel Stone d0301c9a82 tests/xwayland: Don't leak XCB reply
Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 10:17:19 +01:00
Daniel Stone 3ac2748021 xwayland: Reuse weston_client_launch
Now that our process-launching internals are identical between the
(still-misnamed) weston_client_launch and the frontend's Xwayland
launcher, we can reuse the internals instead of open-coding it.

As a result, we now additionally prevent Xwayland from inheriting
Weston's signal mask, by clearing SIG_UNBLOCK on all signals. This
should have no observable effect as we do not depend on signal handling
within Xwayland, instead using the displayfd readiness mechanism since
c2f4201ed2.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone dfda0ca9d2 xwayland: Use an array for CLOEXEC FDs
This gets us closer to the implementation of weston_client_launch, so we
can reuse that instead of open-coding it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 4e6a978e34 xwayland: Don't leak fds on failure
Trivial fixup to not leak socketpairs if we need to exit early in the
function.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone c0a75ee379 frontend: Split process and client handling
weston_client_start() takes only a single path with no arguments,
forking a process to start that command line, and creating a client from
it.

weston_client_launch(), which was always misnamed and will be renamed in
the next patch, now only handles the child process and nothing else.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 11c9ec11fa frontend: Use array for clearing CLOEXEC in child
When we launch a child, we need to clear CLOEXEC on any FDs we want to
survive the exec. Use an array for doing this, so it's more generic and
we can allow callers to pass in their own.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 7397030f70 frontend: Don't log when an unknown child process exits
This can happen and it's not an error condition. No reason to shout
about it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 17331a0c7d frontend: Add FDSTR_INIT macro
This initialises fdstr to 'safe' values so we can reliably deinit them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 97421545b4 screenshooter: Use wl_client, not wet_process
See discussion in wayland/weston!951 for the reasoning why: the
screenshooter must only deal with wl_client.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone 961be270b0 screenshooter: Exit early when screenshot in progress
When we're asked to take a screenshot but are already taking one, just
exit out of the function early.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Daniel Stone ed35fc7f6a screenshooter: Rename compositor_destroy_listener
Make it more descriptive in order to add a client_destroy_listener.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-19 08:28:21 +00:00
Michael Olbrich a3a8431634 ivi-layout: simplify API
Use assert() to check for invalid NULL arguments. Something like that happens
during development and assert() makes it easier to find the error. And it avoids
unnecessary additional error handling.
The hmi-controller asserted anyways so this just moves the assert on level
deeper. Other controller probably do the same thing, or don't check the return
values at all.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2023-04-19 09:38:09 +03:00
Michael Olbrich 3805bcad90 hmi-controller: prepare for API simplification
The return values for most of the API functions will be removed and replaced by
asserts. So remove the return value checks. The end result will be the same:
These functions only fail for incorrect API usage, so basically the asserts are
moved from the hmi-controller into the shell.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2023-04-19 09:38:09 +03:00
Michael Olbrich c30da2aa32 tests: ivi-shell: prepare for API simplification
The return values for most of the API functions will be removed and replaced by
asserts. So checking return values will no longer work and passing invalid
arguments will trigger asserts. Modify and remove the tests accordingly.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2023-04-19 09:38:09 +03:00
Bram Stolk 26de6e35a9 simple-dmabuf-v4l: Add support to NV12 devices that combine planes
There are V4L2 devices that will output NV12 but will do so using one dma
buffer. To support this, we need to add the same dma buffer twice but with
a different offset for the chrominance plane.
Also supports situations of 3 planes (e.g. YU12) inside a single dma buffer.

Fixes: #712
Signed-off-by: Bram Stolk (b.stolk@gmail.com)
2023-04-18 10:57:55 +00:00
Philipp Zabel fe69b9f52e doc, man: document PipeWire backend
Add documentation for the PipeWire backend.

Co-authored-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-04-18 10:48:50 +00:00
Philipp Zabel ebc3a22b09 backend-pipewire: add PipeWire backend
Add a separate PipeWire backend based on the PipeWire plugin. The backend
requires PipeWire 0.3.x.

The PipeWire backend can be used as a standalone-backend backend for streaming
and composing Wayland clients to PipeWire.

The backend supports the on-demand creation of heads via the
weston_pipewire_output_api_v1. It also supports per-output pixel format
configuration via a gbm-format option.

Multiple PipeWire outputs can be created by setting the num-outputs option in
the [pipewire] section.

Co-authored-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-04-18 10:48:50 +00:00
Michael Tretter bcacd9ec5a backend-drm: schedule connector disable for detached head
Currently, if a head is detached, the entire state of the device is invalidated
to make sure that the connector is disabled on the next atomic commit. Side
effect of the invalid state is that all planes are disabled on the next commit.
This includes planes that are used with a different head that is not part of the
next atomic commit. Disabling the planes of unrelated outputs causes a blanking
of these outputs until output is repainted and the plane is reenabled.

Store the detached heads in a list on the output and disable the connectors for
all heads in this list in the next atomic commit.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-04-18 11:11:21 +02:00
Philipp Zabel 78818c6d24 backend-vnc: pass vnc_backend to vnc_head_create()
Pass the VNC backend to vnc_head_create().

That way the already known backend will not have to be found from the
compositor. This is trivial now, but in the multi-backend case would
entail iterating over all backends to find the correct one.

Also remove the now unused to_vnc_backend() helper.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-04-17 09:40:52 +02:00
Philipp Zabel 0a1d77a728 backend-rdp: pass rdp_backend to rdp_head_create()
Pass the RDP backend to rdp_head_create().

That way the already known backend will not have to be found from the
compositor. This is trivial now, but in the multi-backend case would
entail iterating over all backends to find the correct one.

Also remove the now unused to_rdp_backend() helper.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-04-17 09:40:52 +02:00
Philipp Zabel 7d2112c713 libweston: pass backend to weston_windowed_output_api::create_head()
Pass the backend instead of the compositor to the windowed output API
create_head() method and increment the API version.

That way the backend will not have to find the backend pointer from the
compositor. This is trivial now, but in the multi-backend case would
entail iterating over all backends to find the correct one.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-04-17 09:38:50 +02:00
Philipp Zabel 5dd796e447 backend-vnc: remove output move listener leftovers
The output move listener removal was incomplete. Remove the remaining
bits to fix a segfault on shutdown.

Fixes: 40f5eaf401 ("backend-vnc: use output power_state to disable repainting while disconnected")
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
2023-04-15 09:13:21 +02:00
Pekka Paalanen eb2a12a92c xwayland: comment on cleanup_after_cairo()
I tried this, and it causes a crash. Leave a note for the future when we
happen to use some other backend with xwayland and find a "leak".

The reason this is a comment and not a Gitlab issue is that you probably
would not go looking for a Gitlab issue saying an idea is a bad one.
This comment is more likely to be found.

It's not really a leak either, it only needs to be fixed if you want a
clean ASan leak report.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-04-12 12:34:58 +00:00
Pekka Paalanen 741c9e6a99 backend-wayland: fully release pango and fontconfig
This was not found in the test suite, but if you run wayland-backend
manually with ASan, you see the same leaks as in

  backend-headless: fully release pango and fontconfig

Fix them the same way.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-04-12 12:34:58 +00:00
Pekka Paalanen 823580e070 backend-headless: fully release pango and fontconfig
In the color-icc-output test, this fixes the following ASan reports:

Direct leak of 6912 byte(s) in 27 object(s) allocated from:
    #0 0x7f36bf0a9e8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f36bd9c2704  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20704)
    #2 0x7f36bd9c2dc8  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20dc8)
    #3 0x7f36bd9c439c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2239c)
    #4 0x7f36bd9cb24c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2924c)
    #5 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #6 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #7 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #8 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #9 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #10 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #11 0x7f36bd9c977c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2777c)
    #12 0x7f36bd9c9c9e  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27c9e)
    #13 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #14 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #15 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #16 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #17 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #18 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #19 0x7f36bd9bb507  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19507)
    #20 0x7f36bd9bb766  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19766)
    #21 0x7f36bd9ad926  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xb926)
    #22 0x7f36bd9af8c6 in FcConfigSubstituteWithPat (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xd8c6)
    #23 0x7f36ba21caae  (/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0+0xbaae)
    #24 0x7f36b9b8a6df  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xc6df)
    #25 0x7f36b9b88bd9  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xabd9)
    #26 0x7f36b9db218d  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2418d)
    #27 0x7f36b9db313b  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2513b)
    #28 0x7f36b9db39aa  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x259aa)
    #29 0x7f36b9db84c8  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a4c8)
    #30 0x7f36b9db8702 in pango_layout_get_pixel_extents (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a702)
    #31 0x7f36ba05fbb3 in theme_render_frame ../../git/weston/shared/cairo-util.c:586
    #32 0x7f36ba06c7b7 in frame_repaint ../../git/weston/shared/frame.c:1071
    #33 0x7f36ba07191b in weston_gl_borders_update ../../git/weston/libweston/gl-borders.c:81
    #34 0x7f36ba0544c3 in headless_output_update_gl_border ../../git/weston/libweston/backend-headless/headless.c:150
    #35 0x7f36ba0545a3 in headless_output_repaint ../../git/weston/libweston/backend-headless/headless.c:165
    #36 0x7f36bea58238 in weston_output_repaint ../../git/weston/libweston/compositor.c:3115
    #37 0x7f36bea5921d in weston_output_maybe_repaint ../../git/weston/libweston/compositor.c:3186
    #38 0x7f36bea5a100 in output_repaint_timer_handler ../../git/weston/libweston/compositor.c:3267
    #39 0x7f36beee6766 in wl_timer_heap_dispatch ../../git/wayland/src/event-loop.c:526
    #40 0x7f36beee6766 in wl_event_loop_dispatch ../../git/wayland/src/event-loop.c:1020
    #41 0x7f36beee41d4 in wl_display_run ../../git/wayland/src/wayland-server.c:1431
    #42 0x7f36bfaa3dc3 in wet_main ../../git/weston/compositor/main.c:4080
    #43 0x557d4f1e1703 in execute_compositor ../../git/weston/tests/weston-test-fixture-compositor.c:410
    #44 0x557d4f1ebd43 in weston_test_harness_execute_as_client ../../git/weston/tests/weston-test-runner.c:534
    #45 0x557d4f1c8568 in fixture_setup ../../git/weston/tests/color-icc-output-test.c:462
    #46 0x557d4f1c861f in fixture_setup_run_ ../../git/weston/tests/color-icc-output-test.c:464
    #47 0x557d4f1ec92e in main ../../git/weston/tests/weston-test-runner.c:682
    #48 0x7f36bda4ed09 in __libc_start_main ../csu/libc-start.c:308
    #49 0x557d4f1c5a89 in _start (/home/pq/build/weston-meson/tests/test-color-icc-output+0x3da89)

Indirect leak of 1696 byte(s) in 53 object(s) allocated from:
    #0 0x7f36bf0aa037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f36bd9c2d48  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20d48)
    #2 0x7f36bd9c439c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2239c)
    #3 0x7f36bd9cb24c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2924c)
    #4 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #5 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #6 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #7 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #8 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #9 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #10 0x7f36bd9c977c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2777c)
    #11 0x7f36bd9c9c9e  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27c9e)
    #12 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #13 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #14 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #15 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #16 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #17 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #18 0x7f36bd9bb507  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19507)
    #19 0x7f36bd9bb766  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19766)
    #20 0x7f36bd9ad926  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xb926)
    #21 0x7f36bd9af8c6 in FcConfigSubstituteWithPat (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xd8c6)
    #22 0x7f36ba21caae  (/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0+0xbaae)
    #23 0x7f36b9b8a6df  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xc6df)
    #24 0x7f36b9b88bd9  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xabd9)
    #25 0x7f36b9db218d  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2418d)
    #26 0x7f36b9db313b  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2513b)
    #27 0x7f36b9db39aa  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x259aa)
    #28 0x7f36b9db84c8  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a4c8)
    #29 0x7f36b9db8702 in pango_layout_get_pixel_extents (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a702)
    #30 0x7f36ba05fbb3 in theme_render_frame ../../git/weston/shared/cairo-util.c:586
    #31 0x7f36ba06c7b7 in frame_repaint ../../git/weston/shared/frame.c:1071
    #32 0x7f36ba07191b in weston_gl_borders_update ../../git/weston/libweston/gl-borders.c:81
    #33 0x7f36ba0544c3 in headless_output_update_gl_border ../../git/weston/libweston/backend-headless/headless.c:150
    #34 0x7f36ba0545a3 in headless_output_repaint ../../git/weston/libweston/backend-headless/headless.c:165
    #35 0x7f36bea58238 in weston_output_repaint ../../git/weston/libweston/compositor.c:3115
    #36 0x7f36bea5921d in weston_output_maybe_repaint ../../git/weston/libweston/compositor.c:3186
    #37 0x7f36bea5a100 in output_repaint_timer_handler ../../git/weston/libweston/compositor.c:3267
    #38 0x7f36beee6766 in wl_timer_heap_dispatch ../../git/wayland/src/event-loop.c:526
    #39 0x7f36beee6766 in wl_event_loop_dispatch ../../git/wayland/src/event-loop.c:1020
    #40 0x7f36beee41d4 in wl_display_run ../../git/wayland/src/wayland-server.c:1431
    #41 0x7f36bfaa3dc3 in wet_main ../../git/weston/compositor/main.c:4080
    #42 0x557d4f1e1703 in execute_compositor ../../git/weston/tests/weston-test-fixture-compositor.c:410
    #43 0x557d4f1ebd43 in weston_test_harness_execute_as_client ../../git/weston/tests/weston-test-runner.c:534
    #44 0x557d4f1c8568 in fixture_setup ../../git/weston/tests/color-icc-output-test.c:462
    #45 0x557d4f1c861f in fixture_setup_run_ ../../git/weston/tests/color-icc-output-test.c:464
    #46 0x557d4f1ec92e in main ../../git/weston/tests/weston-test-runner.c:682
    #47 0x7f36bda4ed09 in __libc_start_main ../csu/libc-start.c:308
    #48 0x557d4f1c5a89 in _start (/home/pq/build/weston-meson/tests/test-color-icc-output+0x3da89)

Indirect leak of 537 byte(s) in 52 object(s) allocated from:
    #0 0x7f36bf057817 in __interceptor_strdup ../../../../src/libsanitizer/asan/asan_interceptors.cpp:452
    #1 0x7f36bd9c1fa4 in FcValueSave (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1ffa4)
    #2 0x7f36bd9c2d5d  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20d5d)
    #3 0x7f36bd9c439c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2239c)
    #4 0x7f36bd9cb24c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2924c)
    #5 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #6 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #7 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #8 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #9 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #10 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #11 0x7f36bd9c977c  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2777c)
    #12 0x7f36bd9c9c9e  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27c9e)
    #13 0x7f36bd29c4a9  (/lib/x86_64-linux-gnu/libexpat.so.1+0xc4a9)
    #14 0x7f36bd29ada7  (/lib/x86_64-linux-gnu/libexpat.so.1+0xada7)
    #15 0x7f36bd29ba59  (/lib/x86_64-linux-gnu/libexpat.so.1+0xba59)
    #16 0x7f36bd29f8b0 in XML_ParseBuffer (/lib/x86_64-linux-gnu/libexpat.so.1+0xf8b0)
    #17 0x7f36bd9c9152  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x27152)
    #18 0x7f36bd9c956b  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2756b)
    #19 0x7f36bd9bb507  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19507)
    #20 0x7f36bd9bb766  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0x19766)
    #21 0x7f36bd9ad926  (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xb926)
    #22 0x7f36bd9af8c6 in FcConfigSubstituteWithPat (/lib/x86_64-linux-gnu/libfontconfig.so.1+0xd8c6)
    #23 0x7f36ba21caae  (/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0+0xbaae)
    #24 0x7f36b9b8a6df  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xc6df)
    #25 0x7f36b9b88bd9  (/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0+0xabd9)
    #26 0x7f36b9db218d  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2418d)
    #27 0x7f36b9db313b  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2513b)
    #28 0x7f36b9db39aa  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x259aa)
    #29 0x7f36b9db84c8  (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a4c8)
    #30 0x7f36b9db8702 in pango_layout_get_pixel_extents (/lib/x86_64-linux-gnu/libpango-1.0.so.0+0x2a702)
    #31 0x7f36ba05fbb3 in theme_render_frame ../../git/weston/shared/cairo-util.c:586
    #32 0x7f36ba06c7b7 in frame_repaint ../../git/weston/shared/frame.c:1071
    #33 0x7f36ba07191b in weston_gl_borders_update ../../git/weston/libweston/gl-borders.c:81
    #34 0x7f36ba0544c3 in headless_output_update_gl_border ../../git/weston/libweston/backend-headless/headless.c:150
    #35 0x7f36ba0545a3 in headless_output_repaint ../../git/weston/libweston/backend-headless/headless.c:165
    #36 0x7f36bea58238 in weston_output_repaint ../../git/weston/libweston/compositor.c:3115
    #37 0x7f36bea5921d in weston_output_maybe_repaint ../../git/weston/libweston/compositor.c:3186
    #38 0x7f36bea5a100 in output_repaint_timer_handler ../../git/weston/libweston/compositor.c:3267
    #39 0x7f36beee6766 in wl_timer_heap_dispatch ../../git/wayland/src/event-loop.c:526
    #40 0x7f36beee6766 in wl_event_loop_dispatch ../../git/wayland/src/event-loop.c:1020
    #41 0x7f36beee41d4 in wl_display_run ../../git/wayland/src/wayland-server.c:1431
    #42 0x7f36bfaa3dc3 in wet_main ../../git/weston/compositor/main.c:4080
    #43 0x557d4f1e1703 in execute_compositor ../../git/weston/tests/weston-test-fixture-compositor.c:410
    #44 0x557d4f1ebd43 in weston_test_harness_execute_as_client ../../git/weston/tests/weston-test-runner.c:534
    #45 0x557d4f1c8568 in fixture_setup ../../git/weston/tests/color-icc-output-test.c:462
    #46 0x557d4f1c861f in fixture_setup_run_ ../../git/weston/tests/color-icc-output-test.c:464
    #47 0x557d4f1ec92e in main ../../git/weston/tests/weston-test-runner.c:682
    #48 0x7f36bda4ed09 in __libc_start_main ../csu/libc-start.c:308
    #49 0x557d4f1c5a89 in _start (/home/pq/build/weston-meson/tests/test-color-icc-output+0x3da89)

SUMMARY: AddressSanitizer: 9145 byte(s) leaked in 132 allocation(s).

We do the clean-up unconditionally because xwayland plugin may also need
it, but cannot easily do it itself. This reduces reported leaks in
xwayland test too.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-04-12 12:34:58 +00:00
Philipp Zabel 40f5eaf401 backend-vnc: use output power_state to disable repainting while disconnected
With weston_output_power_on/off() we can use power_state to disable
repainting completely while no VNC client is connected. This allows
to remove the initial repaint and per-output damage tracking.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-04-12 14:44:13 +03:00
marius vlad 1446d9cb3c client-shm: Add basic keyboard support
And use it to exit with using the KEY_ESC, similar to simple-egl.
This was ripped from simple-egl ad litteram.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-12 14:40:38 +03:00
marius vlad 2e0b67e5be simple-shm: Add maximized/fullscreen support
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-12 14:40:38 +03:00
marius vlad cd634c34ed simple-shm: Use buffers as a list
Rather than having them as an array. This would simplify handling of
maximized and fullscreen and make things easier to reason with.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-12 14:40:38 +03:00
Marius Vlad 76f689e370 simple-touch: Add maximized/fullscreen states
Helpful to have other states like maximized or fullscreen for
the simple-touch client.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2023-04-12 14:40:38 +03:00
Daniel Stone c7a29b5196 tests: Allow DRM fixture setup to cleanly skip
Move our DRM test fixture setup later, where we already have a bunch of
per-backend splits, so we can choose to skip our tests at the right
time.

Doing this allows us to skip DRM tests with no memory leaks.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-12 10:52:57 +00:00
Daniel Stone 3ae62c208c tests: Move prog_args_save() later
This allows us to append to the arguments later on.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-12 10:52:57 +00:00
Daniel Stone 03add7dce5 input: Destroy tablet-tool bindings on exit
Make sure we don't leak any tablet tool bindings.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2023-04-12 10:10:25 +00:00
Leandro Ribeiro a62cb45b6e tests/color-icc-output: make use of color debug scopes
Now that we have color profile, transformation and optimizer debug
scopes, make use them in this test.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-04-12 10:03:32 +00:00
Leandro Ribeiro 84eb3158b4 color-lcms: add debug scope for pipeline optimizer
Whenever a color transformation is being created, this debug scope
prints its pipeline before and after being optimized. It should be used
with the color-lcms-transformations scope.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-04-12 10:03:32 +00:00
Leandro Ribeiro a28e0c26e1 color-lcms: add debug scope for color profiles
It prints the existent color profiles for new subscribers. Also prints
any creation/destruction of color profiles.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-04-12 10:03:32 +00:00
Leandro Ribeiro d827bdd5d4 color-lcms: add debug scope for color tranformations
It prints the existent color transformations for new subscribers. Also
prints any creation/destruction of color transformations.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-04-12 10:03:32 +00:00
Leandro Ribeiro cb542dd56a color-lcms: save ICC profile version string with a single decimal value
We have a string describing the ICC profile. cmsGetProfileVersion()
returns a float value, and we are converting that to string with "%f"
and saving to this description. Instead, use "%.1f" to restrict it to a
single decimal value, which is enough. With this change we have e.g.
"version 4.4" instead of "version 4.4000000".

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-04-12 10:03:32 +00:00
Pekka Paalanen 8a1f56310c compositor: free renderer string
Fixes a leak found by ASan.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2023-04-11 17:48:15 +03:00