Add support for clients to request the server insert breakpoints at
various points in its processing. These breakpoints are handled
internally by semaphores (visible to tests through helpers): when the
server reaches the specified point, it will pause execution until the
client allows it to restart.
A weston_compositor pointer returned at each breakpoint allows the
client to reach across the thread boundary and access the server's
internal data structures. This can be used to, for example, inspect
paint nodes, internal damage, or any other work which is not necessarily
client-visible.
The majority of tests will not need to use this infrastructure; it is
only intended for tightly-coupled tests which can very specifically
dictate and anticipate the server's execution flow.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Fractional scale is increasingly common in the Wayland ecosystem. Thus,
given simple-egl's role as egl example client, implement support for
the new protocol - even though Weston itself does not support it yet.
Together with buffer_scale and buffer_transform this ensures
simple-egl provides optimally sized and oriented buffers.
Signed-off-by: Robert Mader <robert.mader@collabora.com>
When a dependency path is converted to string and dependency is a
subproject, then accessing such file fails in meson with:
ERROR: Sandbox violation: Tried to grab file ... from a nested subproject.
Use '/' operator as documented in
https://mesonbuild.com/Dependencies.html#dependencies-that-provide-resource-filesFixes: #715
Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
Wayland protocol can't do this, but the way our test protocol handles
touch through a single event can - ensure that we don't by accident.
This will matter more shortly when we add assert()s to prevent having
coordinates with WL_TOUCH_UP events internally later.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Stop using features that Meson 0.63.0 throws deprecation warnings about:
WARNING: Deprecated features used:
* 0.56.0: {'dependency.get_pkgconfig_variable'}
* 0.62.0: {'pkgconfig.generate variable for builtin directories'}
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
There are no internal users left for this protocol, they have been
migrated to the new weston-output-capture protocol. There are no
external users, because this protocol was private and never installed.
Remove this dead code.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This is a completely new screenshooting protocol designed to support:
- color management testing by adding the "blending" source
- KMS testing by adding the "writeback" source
- output decorations testing by adding the "full_framebuffer" source
- proper buffer size negotiation instead of guessing from wl_output
- compositor chosen pixel format, primarily for "blending" source
- proper indication of screenshot failure
- dmabuf target buffers, linear only
This new protocol should be good enough to publish as a Weston public
extension. Hence install it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This protocol allows clients to create single-pixel RGBA buffers. Now
that we have proper support for these buffers internally within Weston,
we can expose them to clients.
This bumps the build container version, as we now depend on
wayland-protocols v1.26.
Signed-off-by: Daniel Stone <daniels@collabora.com>
We want to support staging protocols which have a version too, so don't
assume that anything versioned is unstable.
Signed-off-by: Daniel Stone <daniels@collabora.com>
This allows easily co-developing a Wayland protocol and Weston.
Example setup:
ln -s subprojects/wayland-protocols /path/to/wayland-protocols
meson configure build/ --force-fallback-for=wayland-protocols
Signed-off-by: Simon Ser <contact@emersion.fr>
Bump the wayland-protocol dependency version in order to include dma-buf
feedback, whose support in Weston is added in the next commits.
Also, as we need the newer EGL extension EGL_EXT_device_drm_render_node
to add the support for dma-buf feedback, bump the Mesa dependency
version as well.
It also includes some minor changes in order to keep build-deps.sh more
consistent.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Because we weren't properly pinning the wayland-protocols version, and I
can't read, we missed updating this in !563.
Signed-off-by: Daniel Stone <daniels@collabora.com>
This is a follow-up of commit "tests: start to use Weston's
default screenshooter in the test suite".
As we've started to use Weston's default screenshooter
implementation and protocol extension in the test suite,
we don't need what we've created specifically for the test
suite anymore.
Drop test suite screenshooter implementation and protocol
extension.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
We have two functions with the name weston_screenshooter_shoot():
1. screenshot protocol function that the screenshooter
client uses to request screenshots to the compositor
2. libweston function used by the compositor to take
screenshots as requested by the screenshooter client
Until now we had no problem with that, but in the next commits
we are going to use the screenshot protocol in the test suite,
which is also user of libweston. So rename screenshot protocol
function to weston_screenshooter_take_shot() to avoid the conflict.
For consistency, also rename screenshooter_shoot() to
screenshooter_take_shot() in compositor/weston-screenshooter.c
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Weston extension to assure clients that the dmabuf buffer will be
forwarded directly to the display controller.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This protocol allows a client to ask the compositor to only allow it to
be displayed on a "secure" output. This initial version of the protocol
supports HDCP.
This is loosely based on the chromium secure-output protocol [1].
This protocol is mostly useful for closed system, where the client can
trust the compositor, such as set-top boxes. This is not a way to
implement any kind of Digital Rights Management on desktops. The
compositor would be free to lie to the client, anyway.
Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
[1]
https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/secure-output/secure-output-unstable-v1.xml
Some clients like the mpv video player now request the xdg_shell
protocol so these will fail if the compositor only provides the
xdg_shell_unstable_v6 protocol. Compositors like mir and gnome provide
both protocols.
The two protocols are very similar therefore the code in xdg-shell-v6.c
has been refactored to work with the new xdg_shell protocol and now
resides in xdg-shell.c.
Pekka:
- split the patch
- fix continued line alignment
Daniel
- allow anchor_rect to initially have zero dimensions
- account for get_popup allowing NULL parent surface
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
Introduce support for the zwp_linux_explicit_synchronization_unstable_v1
protocol with an implementation of the zwp_linux_explicit_synchronization_v1
interface.
Explicit synchronization provides a more versatile notification
mechanism for buffer readiness and availability, and can be used to
improve efficiency by integrating with related functionality in display
and graphics APIs.
In addition, the per-commit nature of the release events provided by
this protocol potentially offers a solution to a deficiency of the
wl_buffer.release event (see
https://gitlab.freedesktop.org/wayland/wayland/issues/46).
Support for this protocol depends on the capabilities of the backend, so
we don't register it by default but provide a function which each
backend will need to call. In this commit only the headless backend when
using the noop renderer supports this to enable testing.
Note that the zwp_surface_synchronization_v1 interface, which contains
the core functionality of the protocol, is not implemented in this
commit. Support for it will be added in future commits.
Changes in v7:
- Added some information in the commit message about the benefits of
the explicit sync protocol.
Changes in v6:
- Fall back to advertising minor version 1 of the explicit sync protocol,
although we support minor version 2 features, until the new
wayland-protocols version is released.
Changes in v5:
- Meson support.
- Advertise minor version 2 of the explicit sync protocol.
Changes in v4:
- Enable explicit sync support in the headless backend for all
renderers.
Changes in v3:
- Use wl_resource_get_version() instead of hardcoding version 1.
- Use updated protocol interface names.
- Use correct format specifier for resource id.
- Change test name to 'linux-explicit-synchronization.weston'
(s/_/-/g).
Changes in v2:
- Move implementation to separate file so protocol can be registered
on demand by backends.
- Register protocol in headless+noop backend for testing purposes.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.
More information at http://mesonbuild.com
Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.
This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.
It is expected that the autotools build system will be removed soon
after the next Weston release.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
This is a new debugging extension for non-production environments. The
aim is to replace all build-time choosable debug prints in the
compositor with runtime subscribable debug streams.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Added new libweston-$MAJOR-protocols.pc file and install that
for external projects to find the XML files installed by libweston.
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop
unnecessary EXTRA_DIST of weston-debug.xml.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add explicit advertisement of available debug interfaces.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
This is a Wayland protocol extension to allow the calibration of
touchscreens in Weston.
See: https://phabricator.freedesktop.org/T7868
v2:
- replace "server" with "compositor"
- rephrase error conditions to be simpler
- reword the matrix description in 'save' request
- rephrase when touch_device events are sent
- change device id to DEVPATH with "/sys" prefix
- qualify calibration units better
- replace wrong_touch event with a more generic invalid_touch
- fix error enum and add bad_coordinates
- convert while cancelled will not raise any errors
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
v1 Tested-by: Matt Hoosier <matt.hoosier@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Add test to verify the server correctly emits pointer axis events. This
requires updating the weston-test protocol with a new request for
pointer axis events.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add test to verify that the server correctly sets the timestamps of
touch events. This requires updating the weston-test protocol with a new
request for touch events.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add test to verify that the server correctly sets the timestamps of
keyboard key events. This requires updating the weston-test protocol to
support passing key event timestamps.
simple_keyboard_test now uses the create_client_with_keyboard_focus()
helper function which changes the initial state of the surface to be
focused. This leads to one additional iteration of the test loop when
starting, during which the surface is deactivated, i.e., loses focus.
After this initial iteration the test continues as before.
Furthermore, simple_keyboard_test now uses the send_key() helper
function which performs a roundtrip internally. To account for this, the
client_roundtrip() function is now directly called in the loop only when
it is still required, i.e., when deactivating the surface.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Enhance the existing pointer motion and button event tests to
additionally verify the event timestamps. This requires updating the
weston-test protocol to support passing motion and button event
timestamps.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
buffer-count was introduced in line with a Mesa change which forced
an earlier block on frame events to try to enforce double-buffering
where available.
The Mesa change has since been reverted (Mesa commit 9ca6711faa), as
this had unpleasant interactions with buffer_age in particular, so this
test is no longer valid.
Additionally, it only worked on backends which initialised EGL (not
headless-backend, where tests generally run), which can be flaky due to
initialisation races. Not only that, but on the DRM backend, we can
legitimately enter triple-buffering due to promoting the surface to a
hardware plane, skipping GPU composition.
In light of all this, just remove the test.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
The stable version of the scaling and cropping extension is found in
wayland-protocols as viewporter.xml.
Remove scaler.xml as nothing uses it.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Remove the unstable presentation_timing.xml file, and use
presentation-time.xml from wayland-protocols instead to generate all the
Presentation extension bindings.
The following renames are done according to the XML changes:
- generated header includes
- enum constants and macros prefixed with WP_
- interface symbol names prefixed with wp_
- protocol API calls prefixed with wp_
Clients use wp_presentation_interface.name rather than hardcoding the
global interface name: presentation-shm, weston-info, presentation-test.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
[Pekka: updated wayland-protocols dependency to 1.2]
The DTD requires elements in certain order, scanner itself doesn't.
Anyway, fix the warning with a simple reordering to match how all other
protocols are written.
Fixes:
protocol:107: element request: validity error : Element request content
does not follow the DTD, expecting (description? , arg*), got (arg
description )
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
It doesn't fill a useful function and is not intended to be continued.
If there is need for workspace manipulation from clients a protocol
based on those future needs need to be properly designed.
workspaces.xml is probably not very relevant since it did the bare
minimum.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Due to the effort of moving a way from non-prefixed protocols, rename
the weston specific screenshooter protocol to weston_screenshooter.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
In the effort of going away from generic names of protocols only
relevant for weston, rename the weston desktop shell
weston_desktop_shell.
This also resets the version to 1, as there will be no prior versions
to weston_desktop_shell.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Use the fullscreen-shell protocol XML from the wayland-protocols
installation, and remove the one we provide ourself.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Right now many toolkits (toytoolkit, gtk+ and EFL) will send an
ack_configure request immediately in response to a configure event,
even if they're not immediately committing the surface at that time.
This leads to a situation where multiple configures receive ack_configure
before any commit happens.
There's really no reason for that sequence of events to bother a compositor,
so this just clarifies the language to make it ok.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol
extension for creating dmabuf-based wl_buffers in a generic manner.
This does not include proper dmabuf metadata negotiation because
there is no way to communicate all dmabuf constraints from the
compositor to a client before-hand. The client has to create a
wl_buffer wrapping one or more dmabuf buffers and then listen at
the feedback object returned to know if the operation was successful.
RFCv1 changes (after a first draft without code):
- some renames of interfaces and argument, no semantic changes
- added destructor protocol to dmabuf_batch
- added feedback interface for buffer creation
v2 changes:
- use drm_fourcc.h as authoritative source for format codes
- add support for the 64-bit layout qualifier and y-inverted dmabufs
- simplify the 'add' request (no need to preserve fd numerical id)
- add explicit plane index in the 'add' request
- integrate the 'feedback' object events to the batch interface
- rename 'create_buffer' to 'create' and move it into the batch interface
- add requirements needed from the graphics stack and clients
- improve existing errors and add batch error codes
- removed error codes from the global interface
- improve documentation for arguments, enums, etc.
- rename dmabuf_batch to zlinux_buffer_params
- The y-inverted property makes more sense as a whole buffer property.
Y-flipping individual planes of the same buffer object is hardly useful.
The y-invert is also converted into a flag, so we may add more flags
later.
- add flags for interlaced buffer content
v3 changes:
- Apply Daniel Vetter's comments about wording on coherency.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Documentation for the prepare_lock_surface event description is
incorrect. The summary says "Tell the client..." however the full-text
description says "tell the shell..."
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
[This time include the actual changes.]