Skip to content

Commit 793292a

Browse files
sferrogooDatabean
authored andcommitted
This change coincides with aosp/3502986 display composition feature.
It implements the 'overlays' parser for cvd. To use the feature, something similair to the following is needed in the canonical config withint the 'displays' stanza: "overlays": [ { "vm_index": 0, "display_index":0 } ]
1 parent c5c29fd commit 793292a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

base/cvd/cuttlefish/host/commands/cvd/cli/parser/instance/cf_graphics_configs.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ Result<std::string> GenerateDisplayFlag(const EnvironmentSpecification& cfg) {
6767
} else {
6868
out_display.set_refresh_rate_hertz(CF_DEFAULTS_DISPLAY_REFRESH_RATE);
6969
}
70+
for (const auto& overlay_entry : in_display.overlays()) {
71+
DisplayOverlay* overlay_proto = out_display.add_overlays();
72+
overlay_proto->set_vm_index(overlay_entry.vm_index());
73+
overlay_proto->set_display_index(overlay_entry.display_index());
74+
}
7075
}
7176
}
7277

base/cvd/cuttlefish/host/commands/cvd/cli/parser/load_config.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ message Display {
8686
optional uint32 height = 2;
8787
optional uint32 dpi = 3;
8888
optional uint32 refresh_rate_hertz = 4;
89+
repeated DisplayOverlay overlays = 5;
8990
}
9091

9192
message Disk {
@@ -155,3 +156,8 @@ message DeviceState {
155156
message Metrics {
156157
optional bool enable = 1;
157158
}
159+
160+
message DisplayOverlay {
161+
int32 vm_index = 1;
162+
int32 display_index = 2;
163+
}

0 commit comments

Comments
 (0)