You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weston/doc/sphinx/toc/libweston/images/initial-heads.msc

36 lines
949 B

doc: output management sequence diagrams 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>
5 years ago
#!/usr/bin/mscgen -Tpng
msc {
hscale="1.5";
c [label = "compositor"], w [label = "libweston core"],
b [label = "backend"];
|||;
c => w [label = "weston_compositor_load_backend()"];
w => b [label = "init"];
--- [label = "Create initial heads"];
b box b [label = "Backend discovers an entity to create a head for."];
w <: b [label = "weston_head_init()"];
b box b [label = "assign hw resource to head"];
w <: b [label = "weston_head_set_monitor_strings()"];
w <: b [label = "weston_head_set_physical_size()"];
w <: b [label = "weston_head_set_subpixel()"];
w <: b [label = "weston_head_set_connection_status()"];
w <= b [label = "weston_compositor_add_head()"];
w <= w [label = "schedule heads_changed"];
w << b [label = "init success"];
c << w [label = "load success"];
|||;
--- [label = "Compositor start-up"];
c => w [label = "weston_compositor_flush_heads_changed()"];
c <<= w [label = "heads_changed callback"];
}