doc: output management sequence diagrams

Graphics / Wayland / Weston - Pekka Paalanen [collabora.com] - 27 January 2020 12:14 EST

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

9dccfd1e doc: output management sequence diagrams
doc/sphinx/conf.py.in | 3 +
doc/sphinx/toc/libweston.rst | 3 +-
doc/sphinx/toc/libweston/head.rst | 40 ++++++--
doc/sphinx/toc/libweston/images/create_output.msc | 31 ++++++
doc/sphinx/toc/libweston/images/create_output.png | Bin 0 -> 39923 bytes
doc/sphinx/toc/libweston/images/destroy-output.msc | 29 ++++++
doc/sphinx/toc/libweston/images/destroy-output.png | Bin 0 -> 30249 bytes
doc/sphinx/toc/libweston/images/head-destroyed.msc | 26 ++++++
doc/sphinx/toc/libweston/images/head-destroyed.png | Bin 0 -> 28457 bytes
doc/sphinx/toc/libweston/images/initial-heads.msc | 35 +++++++
doc/sphinx/toc/libweston/images/initial-heads.png | Bin 0 -> 37770 bytes
doc/sphinx/toc/libweston/images/meson.build | 13 +++
.../libweston/images/react-to-heads-changed.msc | 24 +++++
.../libweston/images/react-to-heads-changed.png | Bin 0 -> 27241 bytes
doc/sphinx/toc/libweston/meson.build | 10 +-
doc/sphinx/toc/libweston/output-management.rst | 104 +++++++++++++++++++++
doc/sphinx/toc/libweston/output.rst | 22 ++++-
include/libweston/libweston.h | 11 ++-
18 files changed, 330 insertions(+), 21 deletions(-)

Upstream: cgit.freedesktop.org


  • Share