-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurfaces_diagram.puml
60 lines (46 loc) · 1.67 KB
/
surfaces_diagram.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@startuml surfaces_diagram
class Surface {
+ Surface(<color:LightSlateGray>surfaces: Surfaces&</color>)
+ ~Surface()
+ SetRegion(<color:LightSlateGray>region: Region</color>)
+ Attach(<color:LightSlateGray>buffer: wl_resource*</color>)
+ Commit()
+ SetVirtioGpuScanoutId(<color:LightSlateGray>scanout: uint32_t</color>)
- surfaces_: Surfaces&
- state_mutex_: std::mutex
- state_: State
}
class Region {
+ x: int32_t
+ y: int32_t
+ w: int32_t
+ h: int32_t
}
class State {
+ current_frame_number: uint32_t
+ current_buffer: struct wl_resource*
+ pending_buffer: struct wl_resource*
+ region: Region
+ virtio_gpu_metadata_: VirtioGpuMetadata
+ has_notified_surface_create: bool
}
class Surfaces {
+ Surfaces()
+ SetFrameCallback(<color:LightSlateGray>callback: FrameCallback</color>)
+ SetDisplayEventCallback(<color:LightSlateGray>callback: DisplayEventCallback</color>)
- callback_mutex_: std::mutex
- callback_: std::optional<FrameCallback>
- event_callback_: std::optional<DisplayEventCallback>
- HandleSurfaceFrame(<color:LightSlateGray>...</color>)
- HandleSurfaceCreated(<color:LightSlateGray>...</color>)
- HandleSurfaceDestroyed(<color:LightSlateGray>...</color>)
}
WaylandServerState ..> Surfaces : sets GenerateProcessedFrameCallbackImpl (a.k.a. FrameCallback)\nand DisplayEventCallback >
Surfaces "1" o-- "0..1" FrameCallback : called by HandleSurfaceFrame >
Surfaces "1" o-- "0..1" DisplayEventCallback : called by HandleSurfaceCreated and HandleSurfaceDestroyed >
Surface ..> Surfaces : HandleSurfaceFrame\nHandleSurfaceCreated\nHandleSurfaceDestroyed >
Surface o-- State
State o-- Region
Surface +-- Region
Surface +-- State
@enduml