Although we already supported minor version 2 of the explicit sync
protocol, we couldn't advertise it previously, since it was not in any
released version of wayland-protocols. With the release of
wayland-protocols 1.18, which includes minor version 2 of this protocol,
and the recent update in weston to require 1.18, we can now safely
advertise minor version 2.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Commit 4fc5dd0099 ("compositor: add capability CAPTURE_YFLIP")
introduced a capability flag which indicates whether y-flipping is
necessary. As already indicated in that commit message, it seems
that pixman flipps the y-axis only due to historic reasons.
Drop y-flipping and use the WESTON_CAP_CAPTURE_YFLIP flag to
indicate that y-flipping is not necessary. This simplifies code
and improves screen share performance (on my test by about 3% down
to 18% CPU load on the sharing instance of Weston).
Signed-off-by: Stefan Agner <stefan@agner.ch>
To fully allow parallel-installation of libweston, we have to make sure
anything that is implemented in libweston is in a versioned directory.
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
When building without GL renderer the compiler prints the following
warning:
../clients/subsurfaces.c: In function ‘egl_state_create’:
../clients/subsurfaces.c:225:35: warning: passing argument 1 of
‘weston_platform_get_egl_display’ makes pointer from integer without a
cast [-Wint-conversion]
225 | weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
| ^~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
...
Define the fallback implementation of weston_platform_get_egl_display
to take an integer which is the underlaying datatype of EGLenum.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Destroy seats when they get removed. This makes sure that seats
properly disappear when screen-share RDP clients disconnect.
There will be no excessive amount of mouse pointer anymore after
several client connection/disconnections.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Currently, the HDCP support in drm-backend is under review and no
other backend supports HDCP yet. This patch is just to update the
weston.ini with this information.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
It is quite similar to the remoting plugin. It just exports the frames via
pipewire instead of the builtin GStreamer pipeline.
It implements the same virtual output API. Virtual outputs can be created
by adding 'pipewire-output' sections to weston.ini.
The generated frames can be accessed with any pipewire client. e.g. with
GStreamer:
gst-launch-1.0 pipewiresrc ! video/x-raw,format=BGRx ! ...
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This details the logging/debugging framework with the latest changes,
making use of the groups added by "weston-log: Start adding
documentation" and "libweston/log: Add 'wlog' group".
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Adds initial grouping for sphinx/breathe for the logging/debugging
framework. We add a few groups: log (public API), internal-log (private API,
not exported) and debug-protocol, specific to the weston
debug protocol.
In latest version of breathe, '\memberof' command is recognized as such.
But it conflicts with '\ingroup' command and can't be used in the same
time (leading to duplicate symbols), so we follow a simple rule: object
tagging with '\ingroup' then use '\memberof' command for the functions
that work on that object.
There's also a caveat here: we have objects that are private (opaque)
but the functions are public. For those cases we resort to using
'internal-log' for the object (class) and 'log' for the functions.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
We have dedicated header for the internal parts of the logging
framework, use that for the set-up part instead of the libweston public
API header.
Further more this removes weston_vlog() from public header as well and
moves them to weston-log-internal.h file.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Place the subscribe parts and displaying of available scopes out of
main as it makes no sense to keep them there.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Uses (debug key-binding mod+shift+space) KEY_D to display/dump
the contents of the flight recorder.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Like a black box in an airplane, the flight recorder can be used to
accumulate data and, when needed, to display its contents.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Avoids a potential dependency on the log scope being set-up before
actually creating the scope. Destroy part of the log context could
suffer from the same issue if the log scope is destroyed before.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Logging should start as early as possible so create the log scope as
early as possible, before subscribing to it.
Open the logfile before creating the 'logger' subscriber, making sure
we're logging to the file properly.
Also migrate `weston_log_set_handler()` to avoid potential calls to
`weston_log` before installing the log handler.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Destroying the compositor after destroying the log scope will not print
out the messages in the tear down/clean-up phase of the compositor, so
add a new tear_down function which allows keeping a valid reference to
the compositor. This way we can destroy the compositor before destroying
the scope and keep the debug messages.
While at it remove the log context destroy part from the clean-up
of the compositor and make it stand on its own.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Pass log scopes from the command line to subscribe log scopes
dynamically to the 'logger' subscriber.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
With the logging infrastructure in place this patch add a new user: file
type of stream backed-up by a std file descriptor.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Rather than using 'begin_cb' rename it to a more suitable name.
Further more instead of using the scope use the subscription to pass as
an argument. The source scope is attached to the subscription when
creating it so we can access it that way.
This also adds a _complete and a _printf method for the subscription
such that the callbacks can use to write data to only _that_
subscription and to close/complete it, otherwise writing to a scope
results in writing to all subscriptions for that scope which is not
correct.
In the same time, the scope counter-parts of _write and _complete will
now use the subscription function as well.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniels@collabora.com>
This avoids duplicated bits, by calling the scopes's callback (if any)
and adding the subscription to the scope's subscription list. Further
more, the scope's name when creating the subscription is not needed so
removed that as well.
In mirror, also inline removing of subscription for scope's subscription
list. Fix a potential corner case when the user can request a
subscription to an invalid scope in stream_destroy().
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
As described in e10c9f89826bb: "weston-debug: Introduce...", the
subscriber object need further functionality to make use of it.
Current form of the weston-debug protocol would not need this, as it
creates underneath a new subscriber each time a client connects and
subscriptions are created/destroyed automatically with the help of
wayland protocol. For other types of streams, we require to manually
create a subscriber and to subscribe to log scopes.
This patch introduces the ability to create subscriptions, and
implicitly to subscribe to (previously created) scopes.
In the event the scope(s) are not created we temporary store the
subscription as a pending one: a subscription for which a scope doesn't
exist at the time of the subscription. When the scope for which the
subscription has been created we take care to create the subscription as
well.
While at it the documentation bits are modified accommodate the subscribe
method and its further functionality.
Lastly, it removes an unlikely case when a scope is not created so we
avoid any kind of dandling (pending) subscription in case there is
subscription to it. We can only do something about in the destroy part
of the scope.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Adds a minimalistic API for managing the subscription object. The
subscribe functionality will be brought in once we re-organize a bit
weston-debug-stream and split it properly. It extends the logging
context with a linked list of potential subscription and adds a linked
list of subscriptions in the log scope.
This patch represents the start of a logging framework for weston. It's
being built around weston-debug, with the intent to superseded it, and
make weston-debug a client of the framework. Further more the logging
framework should replace current logging handler and allow other types
of streams to be used.
Currently present in libweston under weston-debug we have log scopes, debug
streams and a logging context.
With this patch, two (internal) objects are being added: the concept of
a subscriber and the concept of subscription. The subscription object
is a ephemeral object, implicitly managed which is created each time one
would want to a subscribe to a scope. The scope will maintain a list of
subscriptions and will continue to be explicitly managed.
The streams will use the subscriber object as a base class to extend
upon. By doing so it allows to customize the stream with specific
functions that manipulate the underlaying storage. The subscriber object
will require a subscribe function and specific stream functions and like
the scope, will be explicitly managed.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Introduce a new private header file that only internal backends are
allowed to use. Starts by migrating functions that operate on the
'struct weston_head'.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Introduce a new private header file that only internal parts of the
library are allowed to use and shouldn't be exposed in the public header
of libweston.
Start by adding by adding functions that operate on the 'weston_buffer*'.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>