With the recent changes, weston could be started as user service. This
adds some examples and howtos one might do that. Includes some simple
systemd unit files.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
warning: Tag 'TCL_SUBST' at line 250 of file '/home/pq/build/weston-meson/doc/sphinx/doxygen.ini' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1094 of file '/home/pq/build/weston-meson/doc/sphinx/doxygen.ini' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'PERL_PATH' at line 2159 of file '/home/pq/build/weston-meson/doc/sphinx/doxygen.ini' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
warning: Tag 'MSCGEN_PATH' at line 2181 of file '/home/pq/build/weston-meson/doc/sphinx/doxygen.ini' has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Observed with Doxygen 1.9.1 in Debian Bullseye.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The standard style of LCOV HTML reports is a bit harsh to look at. This
commit replaces it with a new one.
The new CSS was written from scratch by looking at the HTML source code
of a generated LCOV report. The original gcov.css file was not used.
The color scheme is neutral, trying to avoid a Christmas tree effect.
The colors are intended to be calm while also distinguishable, and not
hamper text readability.
The font lists were taken from Gitlab with the hope that it will blend
in a little better when viewing from MR artifacts.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This used a cargo-culted form of the ACTION check. Kernel is allowed to
invent new ACTIONs and IIRC there are already actions like bind and
unbind.
Udev events before rule processing always start with a clean property
list. This means that if you only match ACTION==add to add some value to
the event, then that value will not be present for ACTION==bind. Udev
event consumers do not accumulate values, so inconsistent value setting
may confuse them.
Therefore one needs to match ACTION!=remove, not ACTION==add|change, to
keep the device properties consistent for every event. It doesn't hurt
to set them on remove either, but it's a habit to try to avoid
processing when not strictly needed.
This issue came up in
https://gitlab.freedesktop.org/wayland/weston/-/issues/476#note_841430
For more information, see
https://lists.freedesktop.org/archives/systemd-devel/2020-November/045570.html
the part "KERNEL API INCOMPATIBILITY" near the beginning.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Documentation file for explaning in more detail how to run weston, using
launcher direct and specifying a non-default seat. This explains how to
create a udev file and assign a particular GPU card to it, and
potentially, other input devices. It also describes a bit additional
arguments that can be passed on, as an introduction to using the DRM
node for that particular seat.
Fixes#460
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
kiosk-shell is fullscreen shell for apps that use the xdg-shell
protocol. The goal is to make life easier for people shipping embedded
devices with simple fullscreen shell requirements, and reduce the
proliferation of desktop-shell hacks.
Top level surfaces are made fullscreen, whereas dialogs are placed on
top in the center of the output and retain their natural sizes. Dialogs
can be moved and (un)maximized, but resizing is currently not supported.
An app can be directed to a particular output by populating the
"app-ids" field with the app's XDG app id, in the relevant
"[output]" section in the weston config file.
Fixes: #277
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
With this patch we add support to run DRM-backend tests locally
in the test suite. For now this won't work in the CI, as there
are no cards available. But the plan is to achieve this by using
VKMS (virtual KMS) in the future.
To run DRM-backend tests locally, first of all the user has to
set the environment variable WESTON_TEST_SUITE_DRM_DEVICE to
'card0', 'card1' or any other device where he wants to run
the tests. Also, for now it only works if it is run as root,
but in the future this problem will be solved.
The tests will run on a non-default seat. The reason for that
is that we want to avoid opening input devices unnecessarily.
Also, since DRM-backend usage requires gaining DRM master status
on a DRM KMS device, nothing else must be using the device at
the same time. To achieve this we use a lock to run the
DRM-backend tests sequentially.
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
The only reason why we have both weston_compositor_tear_down() and
weston_compositor_destroy() is that the only we had to destroy
the log context was keeping weston_compositor alive and calling
weston_log_ctx_compositor_destroy().
After commit "weston-log: replace weston_log_ctx_compositor_destroy()
by weston_log_ctx_destroy()", it's not necessary to keep a zombie
weston_compositor just to be able to call
weston_log_ctx_compositor_destroy().
Fold weston_compositor_tear_down() into weston_compositor_destroy(),
as this split is useless now.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
The function weston_log_ctx_compositor_destroy(), which destroys struct
weston_log_context, takes weston_compositor as argument. We may have a
weston_log_context unlinked from a weston_compositor and currently there
is no way to destroy it.
Add function weston_log_ctx_destroy(), what makes the destruction of
weston_log_context independent of weston_compositor.
With this change, one could destroy a weston_compositor and keep the
related weston_log_context (since now weston_log_context can be destroyed
without the need of a weston_compositor). But if weston_compositor gets
destroyed it's also necessary to destroy weston_log_context::global,
as the debug protocol depends on the compositor. So a listener has been
added to the destroy signal of weston_compositor.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
Since weston_log_ctx_compositor_create() does not have any relation
with weston_compositor, rename it to weston_log_ctx_create().
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
If we use the function weston_log_context_add_log_scope()
in non-core code, it's necessary to access
weston_compositor::weston_log_ctx.
This is not ideal, since the goal is to make core structs
(weston_compositor, weston_surface, weston_output, etc)
opaque.
Add function weston_compositor_add_log_scope(), so non-core
users are able to pass weston_compositor as argument instead
of weston_compositor::weston_log_ctx.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
There's a function named weston_compositor_log_scope_destroy()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_scope_destroy(), as the argument is a
struct weston_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
There's a function named weston_compositor_add_log_scope()
but it doesn't take a struct weston_compositor argument.
Rename it to weston_log_ctx_add_log_scope(), as
the log_scope is being added to a log_context.
Also, bump libweston_major to 9.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
When we were designing the libweston output API, I wrote a design document
as a Phabricator wiki page. Phabricator is no longer accessible so that
information needs to be migrated to a new place. Here I am converting most of
it into libweston Sphinx documentation, particularly pulling in the sequence
diagrams I drew. This should help people understand how libweston output
configuration works.
The diagrams are committed as both MSC source files and rendered PNG files. I
did not bother tinkering with the build to run mscgen automatically and then
with the CI images to install the tool.
The Sphinx configuration need numref explicitly enabled so that figures are
automatically numbered and can be referenced by their number rather than their
whole caption text(!).
The document structure is changed a little better flowing with Output
Management being the overview page and the Heads and Outputs being the API
pages.
First I wrote the struct weston_output and weston_head descriptions in Doxygen
comments in libweston.h, but then in the API page that text would have been
buried somewhere towards the end of the page. So I put that text in ReST
instead where it comes as first on the pages as it should. The doc for the
structs only contain a link to the top of the page. Yes, the comment style in
libweston.h is a little broken. If I left the asterisk there it would show up
as a bullet point in Sphinx. OTOH putting everything from \rst in a single line
did not produce anything.
Because Sphinx cannot look in two places, the images need to be copied into the
build dir too.
mscgen: http://www.mcternan.me.uk/mscgen/
Fixes: https://gitlab.freedesktop.org/wayland/weston/issues/25
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Mimics the C version that displays the contents of the flight recorder.
With a core-dump in place source the python file then call
'display_flight_rec' to dump the data.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Use doxygen ingroup command as to show the symbols in the sphinx
documentation.
Include some basic comments and document the exported functions from
timeline.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
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>
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>
Unfortunate left over which was not removed once we had the script in
place to regenerate the documentation. A side-effect was the fact that
we still ran the script even if 'docs' target was called, effectively
nullifying the fact that 'docs' target was ran at all. For instance,
'install' would've been executing the script even if 'docs' target
was called before.
This removes the doxygen_target entirely and the depends of sphinx
target on it, makes building and installing docs a bit faster.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
With the introduction of the 'docs' target we make sure that we always
build the documentation, but currently breathe is unaware of the fact
that the doxygen XML database was changed in between runs. It is obvious
when changing only source code not rST bits.
This patch makes sphinx ignore the saved environment and always
rebuild the docs.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
These definitions were just set to the default (off), but their presence
causes Fedora's Doxygen to emit a warning as it is not compiled with
Clang support.
Remove them as they are no-ops anyway.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Demonstrates how to call/use the 'doxygen*' breathe directives. Make
use of previous patches that tag symbols using 'ingroup' doxygen
command.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
With these aliases we can use rST directives inside comment blocks. This
adds also a doxygen command '\rststar' where ignores the asterisk --
typical to multi-line comment blocks.
While at it, add a simple example on how to use them.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Turn warnings into errors so we can spot them immediately.
While at it: no need to generate class graphs as we're not using it and
make doxygen run quieter.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This is adds basic configuration files for doxygen and for breathe,
which is a doxygen-to-sphinx bridge that can document C symbols.
Breathe is configured with default project 'weston' and implicitly adds
:members: and :undoc-members: to breathe configuration options.
This allows a shorter way to call breathe directives without the need
specify the project and also to display implicitly all the members,
documented or not.
A 'docs' run_target to force the docs to be re-built has been added.
Initially (the first time the build system is ran) the documentation
will automatically be built, but later re-builds will require the use of
the 'docs' target. This avoid further delays in building weston but in
the same time allows the possiblity to update/improve the documentation
bits to those who want that.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Remoting plugin support streaming image of virtual output on drm-backend
to remote output. By appending remote-output section in weston.ini,
weston loads remoting plugin module and creates virtual outputs via
remoting plugin. The mode, host, and port properties are configurable in
remote-output section.
This plugin send motion jpeg images to client via RTP using gstreamer.
Client can receive by using following pipeline of gst-launch.
gst-launch-1.0 rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,
encoding-name=JPEG,payload=26" port=[PORTNUMBER] !
rtpbin.recv_rtp_sink_0 \
rtpbin. ! rtpjpegdepay ! jpegdec ! autovideosink \
udpsrc port=[PORTNUMBER+1] ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 !
udpsink port=[PORTNUMBER+2] sync=false async=false
where, PORTNUMBER is specified in weston.ini.
Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
Move the README file to Markdown, and update it to attempt to explain
the current status and use of Weston.
The first sections are user-facing, so they can quickly understand what
Weston is, what it does, what it doesn't do, and how to go about using
it. The following sections on libweston and for distribution packagers
are left intact, but should probably be moved to separate documents.
This includes a screenshot of Weston running weston-terminal, Chrome and
simple-egl, which was taken by myself and subject to the same licensing
terms as the rest of the tree.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This is not to be installed, except maybe as a doc. It is just an
example of what one might do. It also has not been tested, it's just
for giving an idea of what it should do.
It also contains untested speculation.
v2:
- use syspath instead of devpath
- add license blurb
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Adds a config item to prevent doxygen from using absolute paths in
generated diagrams. This trims off the base directory during config to
leave just relative paths.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>