Skip to content

Commit c14787e

Browse files
committed
Adding the diagram to the generated files
1 parent 7a67e9e commit c14787e

File tree

7 files changed

+39
-37
lines changed

7 files changed

+39
-37
lines changed

doc/sphinx/.sphinx/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ sphinxcontrib-jquery
1313
sphinx-notfound-page
1414
breathe
1515
exhale
16+
sphinxcontrib-mermaid

doc/sphinx/architecture.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# Overview
1+
# Architecture
22
This document describes the high-level architecture of *Mir*, including a diagram and a brief introduction of the libraries.
33

4-
# Audience
4+
## Audience
55
This document is intended to provide contributors to *Mir* an overview of *Mir*'s systems. It is *not* intended to guide compositor-implementers, unless they are specifically interested in the internals of *Mir*.
66

7-
# Diagram
8-
![Architecture Diagram](./architecture.png "Architecture Diagram")
7+
## Diagram
8+
[Architecture Diagram](./architecture_diagram.rst)
99

10-
# Top-Level Folders
11-
## `/include`
10+
## Top-Level Folders
11+
### `/include`
1212
- The `include` folder at the root of the project provides the public-facing API.
1313
- This directory *strictly* includes the interfaces that are useful to a compositor-implementer.
1414
- If one is only interested in implementing their own *Mir*-based compositor, they need not look any further than this directory.
1515

16-
## `/src`
16+
### `/src`
1717
- The `src` folder at the root of the project comprises the core implementation of *Mir*.
1818

19-
## `/examples`
19+
### `/examples`
2020
- A collection of demo *Mir* compositors that are used as examples of how one might build a true compositor. Examples include:
2121
- `miral-app`
2222
- `miral-shell`
2323
- `mir_demo_server`
2424

25-
## `/tests`
25+
### `/tests`
2626
- Tests for the project, including unit tests, integration tests, acceptance tests, and test framework.
2727

28-
# Libraries
28+
## Libraries
2929
The following is the library tree:
3030
```
3131
├── miral
@@ -54,28 +54,28 @@ The following is the library tree:
5454
└── mirwayland
5555
```
5656

57-
## miral
57+
### miral
5858
- The "Mir Abstraction Layer" (aka `MirAL` or `miral`) is an API that makes Mir easy for compositor-implementers to work with. It provides the core window management concepts and an interface that is more ABI stable than Mir's internal mirserver API.
5959
- Public-facing
6060
- Directories:
6161
- `include/miral`
6262
- `src/miral`
6363

64-
## miroil
64+
### miroil
6565
- A custom *Mir* library for the [Lomiri](https://lomiri.com/) folks
6666
- This is unimportant for 99% of people
6767
- Directories:
6868
- `include/miroil`
6969
- `src/miroil`
7070

71-
## mircore
71+
### mircore
7272
- Fundamental data structures like 2D points, Rectangles, File Descriptor, etc.
7373
- Public-facing
7474
- Directories:
7575
- `include/core`
7676
- `src/core`
7777
-
78-
## mircommon
78+
### mircommon
7979
- Data structures and utility functions like Mir-event building, logging, keymaps, etc.
8080
- Differs from `mircore` in that the concepts map strictly onto *Mir*'s concepts instead of being general concepts like a Rectangle
8181
- Public-facing
@@ -84,15 +84,15 @@ The following is the library tree:
8484
- `src/common`
8585
- `src/include/common`
8686

87-
## mircookie
87+
### mircookie
8888
- Provides event timestamps for inputs events that are difficult to spoof.
8989
- Public-facing
9090
- Directories:
9191
- `include/cookie`
9292
- `src/cookie`
9393
- `src/include/cookie`
9494

95-
## mirserver
95+
### mirserver
9696
- Provides the core *Mir* runtime, with the entry-point being the `mir::Server` class.
9797
- The `Server` class has a `DisplayServer` which provides access to the interfaces that that support the server's runtime.
9898
- The `ServerConfiguration` provides a bunch of methods called `the_XYZ()` to access these various instances, where "XYZ" can be replaced with the interface of interest.
@@ -102,14 +102,14 @@ The following is the library tree:
102102
- `src/server`
103103
- `src/include/server`
104104

105-
## mircompositor
105+
### mircompositor
106106
- Included in `mirserver.so`
107107
- The `Compositor` is responsible for collecting the set of renderables and sending them off to the outputs to be displayed.
108108
- Directories:
109109
- `src/include/server/mir/compositor`
110110
- `src/server/compositor`
111111

112-
## mirinput
112+
### mirinput
113113
- Included in `mirserver.so`
114114
- Deals with everything input (e.g. keyboard presses, mouse clicks)
115115
- The `InputManager` provides access to the specific input platform that is running (e.g. X, Wayland, or libinput).
@@ -118,33 +118,33 @@ The following is the library tree:
118118
- `src/include/server/mir/input`
119119
- `src/server/input`
120120

121-
## mirfrontend-wayland
121+
### mirfrontend-wayland
122122
- The *Mir* implementation of the wayland protocol.
123123
- The `WaylandConnector` class is the glue between the compositor and the specific details of the wayland protocol.
124124
- Directories:
125125
- `src/server/frontend_wayland`
126126

127-
## mirfrontend-xwayland
127+
### mirfrontend-xwayland
128128
- The *Mir* implementation of the xwayland protocol.
129129
- The `XWaylandConnector` class is the glue between the compositor and the specific details of the xwayland protocol.
130130
- This protocol talks to the `xwayland` server, which is spawned as a subprocess.
131131
- Directories:
132132
- `src/server/frontend_xwayland`
133133

134-
## mirshell
134+
### mirshell
135135
- The `Shell` is responsible for managing the surfaces that the compositor wants to show.
136136
- It provides an interface to create, update, and remove these surfaces from the display.
137137
- As an example, the `WaylandConnector` might ask the `Shell` to create a new surface for it.
138138
- Directories:
139139
- `src/include/server/mir/shell`
140140
- `src/server/shell`
141141

142-
## mirshelldecoration
142+
### mirshelldecoration
143143
- Manages *Mir*'s server-side decoration of windows. Currently only used for X11 clients.
144144
- Directories:
145145
- `src/server/shell/decoration`
146146

147-
## mirscene
147+
### mirscene
148148
- The `Scene` provides an interface for the `Compositor` to access the list of renderable items
149149
- These renderables are derived from the surfaces that were added to the `Shell`.
150150
- You can think of the `Scene` as you would think of a "scene graph" in a 3D game engine.
@@ -153,45 +153,45 @@ The following is the library tree:
153153
- `src/include/mir/server/scene`
154154
- `src/server/scene`
155155

156-
## mirgraphics
156+
### mirgraphics
157157
- A graphics abstraction layer sitting between the compositor and the specific graphics platform that it is using to render.
158158
- Directories:
159159
- `src/include/mir/server/graphics`
160160
- `src/server/graphics`
161161

162-
## mirreport
162+
### mirreport
163163
- Default logging and reporting facilities
164164
- Directories:
165165
- `src/server/report`
166166

167-
## mirconsole
167+
### mirconsole
168168
- Handles `logind` and virtual-terminal related tasks for the compositor
169169
- Directories:
170170
- `src/server/console`
171171

172-
## mirgl
172+
### mirgl
173173
- A short list of helpers for GL things
174174
- Directories:
175175
- `src/gl`
176176

177-
## mirrenderergl
177+
### mirrenderergl
178178
- The only supported `Renderer` type for now
179179
- Future renderers will be found alongside it in the `src/renderers` directory
180180
- Directories:
181181
- `src/renderers/gl`
182182

183-
## mirplatform
183+
### mirplatform
184184
- Graphics and input code that is shared between the platforms found in `src/platforms`
185185
- Directories
186186
- `src/include/platform`
187187
- `src/platform`
188188

189-
## mirwayland
189+
### mirwayland
190190
- A subproject used to generate C++ classes from wayland protocol XML files.
191191
- Directories:
192192
- `src/wayland`
193193

194-
## platforms (the directory, not a namespace)
194+
### platforms (the directory, not a namespace)
195195
- A **platform** is a backend that the compositor selects at runtime
196196
- There are three distinct platforms that the compositor makes use of:
197197
- *DisplayPlatform*: determines what the compositor is rendering *to* (e.g gbm-kms, x11, wayland)

doc/sphinx/architecture_diagram.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Architecture Diagram
2+
--------------
3+
4+
.. mermaid:: ./high_level_diagram.mmd

doc/sphinx/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
extensions = [
1919
'sphinx_design',
20-
'sphinx_tabs.tabs',
2120
'sphinx_reredirects',
2221
'youtube-links',
2322
'related-links',

doc/sphinx/custom_conf.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ custom_extensions = [
114114
'breathe',
115115
'exhale',
116116
'sphinx.ext.graphviz',
117+
'sphinxcontrib.mermaid'
117118
]
118119

119120
# Add files or directories that should be excluded from processing.

doc/sphinx/architecture.mermaid renamed to doc/sphinx/high_level_diagram.mmd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ classDiagram
3030
class X11DisplayPlatform
3131
class WaylandDisplayPlatform
3232
}
33-
<<abstract>> DisplayPlatform
34-
<<abstract>> Display
35-
<<abstract>> DisplayBuffer
36-
3733
ServerConfiguration *-- DisplayPlatform
3834
ServerConfiguration *-- MultiplexingDisplay
3935
DisplayPlatform *-- Display
@@ -129,7 +125,6 @@ classDiagram
129125
class Renderer
130126
class GlRenderer
131127
}
132-
<<abstract>> Renderer
133128
DefaultDisplayBufferCompositorFactory *-- RendererFactory
134129
RendererFactory <-- Renderer
135130
Renderer <|-- GlRenderer

doc/sphinx/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ The server API is introduced here: [Introducing the MirAL API](introducing_the_m
3131
3232
getting_and_using_mir
3333
getting_involved_in_mir
34+
architecture
35+
architecture_diagram
3436
api/library_root
3537
```

0 commit comments

Comments
 (0)