Skip to content

Commit da34f4b

Browse files
committed
[documentation](fonts&inline): Add first crude documentation for Inline
Layout and font matching. Signed-off-by: Desiatkin Dmitrii <[email protected]>
1 parent d4c87ea commit da34f4b

File tree

6 files changed

+448
-0
lines changed

6 files changed

+448
-0
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@
3131
- [Concurrency and parallelism\*](architecture/concurrency-and-parallelism.md)
3232
- [Further reading\*](architecture/further-reading.md)
3333
- [Directory structure\*](architecture/directory-structure.md)
34+
- [Fonts\*](architecture/fonts.md)
3435
- [Script\*](architecture/script.md)
3536
- [Microtasks\*](architecture/microtasks.md)
3637
- [Style\*](architecture/style.md)
3738
- [Layout\*](architecture/layout.md)
39+
- [Inline Layout](architecture/inline-layout.md)
3840
- [Compositor\*](architecture/compositor.md)
3941
- [WebXR](architecture/webxr.md)
4042
- [WebGPU](architecture/webgpu.md)
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
flowchart LR
2+
subgraph Content Process
3+
subgraph Script Thread
4+
Script[[Script]]
5+
FontContext[FontContext]
6+
FontCache[Font Cache]
7+
ScriptSystemFontServiceProxy[System Font Service Proxy]
8+
ImageCache[Image Cache]
9+
10+
Script-->ScriptSystemFontServiceProxy
11+
Script-->FontContext
12+
Script-->ImageCache
13+
FontContext-->FontCache
14+
end
15+
16+
subgraph Layout Thread
17+
Layout[[Layout]]
18+
end
19+
20+
Script-->Layout
21+
Layout<-->ImageCache
22+
Layout<-->FontCache
23+
24+
end
25+
26+
subgraph Main Process
27+
subgraph Embedder or Main Thread
28+
Embedder[[Embedder]]
29+
Compositor[Compositor]
30+
WebRender[WebRender]
31+
32+
Embedder<-->Compositor
33+
Compositor-->WebRender
34+
end
35+
36+
subgraph Constellation Thread
37+
Constellation[[Constellation]]
38+
ConstellationSystemFontServiceProxy[System Font Service Proxy]
39+
ResourceManager[Resource Manager]
40+
41+
Constellation-->ConstellationSystemFontServiceProxy
42+
Constellation-->ResourceManager
43+
end
44+
45+
subgraph System Font Service Thread
46+
SystemFontService[[System Font Service]]
47+
FontStore@{ shape: bow-rect, label: "Font Store" }
48+
49+
subgraph Platforms
50+
subgraph MacOS
51+
MacFontList[Font List]
52+
end
53+
54+
subgraph Windows
55+
WinFontList[Font List]
56+
end
57+
58+
subgraph Linux / Android / OpenHarmony
59+
LAOFontList[Font List]
60+
end
61+
end
62+
63+
SystemFontService<-->FontStore
64+
SystemFontService-->MacFontList
65+
SystemFontService-->WinFontList
66+
SystemFontService-->LAOFontList
67+
end
68+
69+
70+
Embedder-->Constellation
71+
Embedder-->SystemFontService
72+
Constellation<-->Compositor
73+
Constellation-->FontCache
74+
Constellation-->ImageCache
75+
end
76+
77+
Layout-->Compositor
78+
ScriptSystemFontServiceProxy<-->SystemFontService
79+
ConstellationSystemFontServiceProxy<-->SystemFontService
80+
Constellation<-->Script
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
sequenceDiagram
2+
box rgb(255, 173, 173) main thread
3+
participant Embedder
4+
participant WebRender
5+
participant Compositor
6+
end
7+
8+
box rgb(255, 214, 165) DevTools thread
9+
participant DevtoolsServer
10+
end
11+
12+
box rgb(253, 255, 182) JSEngine thread
13+
participant JSEngine
14+
end
15+
16+
box rgb(202, 255, 191) Constellation thread
17+
participant Constellation
18+
end
19+
20+
box rgb(155, 246, 255) Bluetooth thread
21+
participant Bluetooth
22+
end
23+
24+
box rgb(160, 196, 255) ResourceManager thread
25+
participant ResourceManager
26+
end
27+
28+
box rgb(189, 178, 255) Fonts thread
29+
participant SystemFontService
30+
end
31+
32+
box rgb(255, 198, 255) Canvas Paint thread
33+
participant CanvasPaintThread
34+
end
35+
36+
box rgb(255, 255, 252) Webdriver thread
37+
participant Webdriver
38+
end
39+
40+
41+
Embedder->>DevtoolsServer: devtools::start_server
42+
Embedder->>WebRender: webrender::create_webrender_instance
43+
alt opts.multiprocess == false
44+
Embedder->>JSEngine: script::init
45+
end
46+
Embedder->>Constellation: create_constellation
47+
Constellation->>Bluetooth: BluetoothThreadFactory::new
48+
Constellation->>ResourceManager: new_resource_threads
49+
Constellation->>SystemFontService: SystemFontService::spawn
50+
Constellation->>CanvasPaintThread: CanvasPaintThread::start
51+
Embedder->>Webdriver: webdriver
52+
Embedder->>Compositor: IOCompositor::new

0 commit comments

Comments
 (0)