9dccfd1ef3
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>
31 lines
1.1 KiB
ReStructuredText
31 lines
1.1 KiB
ReStructuredText
.. _libweston-output:
|
|
|
|
Outputs
|
|
=======
|
|
|
|
A :type:`weston_output` determines what part of the global compositor
|
|
coordinate space will be composited into an image and when. That image is
|
|
presented on the attached heads (weston_head).
|
|
|
|
An output object is resposible for the framebuffer management, damage tracking,
|
|
display timings, and the repaint state machine. Video mode, output scale and
|
|
output transform are properties of an output.
|
|
|
|
In display hardware, a weston_output represents a CRTC, but only if it has been
|
|
successfully enabled. The CRTC may be switched to another during an output's
|
|
lifetime.
|
|
|
|
The lifetime of a weston_output is controlled by the libweston user.
|
|
|
|
With at least a :type:`weston_head` attached, you can construct a
|
|
:type:`weston_output` object which can be used by the compositor, by enabling
|
|
the output using :func:`weston_output_enable`. The output **must not** be
|
|
already enabled.
|
|
|
|
The reverse operation, :func:`weston_output_disable`, should be used when there's
|
|
a need to reconfigure the output or it will be destroyed.
|
|
|
|
|
|
.. doxygengroup:: output
|
|
:content-only:
|