[M120 Migration][VD] Enable direct rendering for TVPlus
[platform/framework/web/chromium-efl.git] / fuchsia_web / shell / cast_streaming_shell.cml
1 // Copyright 2022 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 {
5   include: [
6     // CML shards intended for tests are used here because this component is
7     // launched as a test. While it doesn't fit the typical use-case for a test
8     // component, it's a useful way to be able to launch the component from a
9     // host tool and have it run somewhere it can get the capabilities it needs
10     // to function correctly.
11     // TODO(crbug.com/1410937): Run as a non-test component.
12     "//build/config/fuchsia/test/chromium_system_test_facet.shard.test-cml",
13     "//build/config/fuchsia/test/elf_test_runner.shard.test-cml",
14     "sys/component/realm_builder_absolute.shard.cml",
15
16     "syslog/client.shard.cml",
17   ],
18   program: {
19     binary: "cast_streaming_shell_exe",
20   },
21   offer: [
22     {
23       // Required capabilities for WebInstanceHost in a child Component.
24       protocol: [
25         "fuchsia.feedback.ComponentDataRegister",
26         "fuchsia.feedback.CrashReportingProductRegister",
27       ],
28       from: "parent",
29       to: "#realm_builder",
30     },
31
32     // Offered for use by the relaunched
33     // `fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml`
34     // TODO(crbug.com/1410937): Remove when running as a non-test component and
35     // thus the relaunch is no longer needed.
36     {
37       protocol: [
38         // Required to display the View in Scene Manager unless running in
39         // `--headless` mode.
40         "fuchsia.element.GraphicalPresenter",
41       ],
42       from: "parent",
43       to: "#realm_builder",
44       availability: "optional",
45     },
46
47     // The remaining are offered from the parent to `web_instance.cm` via
48     // `RealmBuilder` when not in `--use-context-provider` mode.
49
50     {
51       // The chromium test realm offers the system-wide config-data dir to test
52       // components. Route the web_engine sub-directory of this as required by
53       // WebInstanceHost.
54       directory: "config-data",
55       from: "parent",
56       as: "config-data-for-web-instance",
57       to: "#realm_builder",
58       subdir: "web_engine",
59       availability: "optional",
60     },
61     {
62       // Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
63       directory: "root-ssl-certificates",
64       from: "parent",
65       to: "#realm_builder",
66     },
67     {
68       // Required capabilities for all WebInstance configurations.
69       protocol: [
70         "fuchsia.buildinfo.Provider",
71         "fuchsia.device.NameProvider",
72         "fuchsia.fonts.Provider",
73         "fuchsia.hwinfo.Product",
74         "fuchsia.intl.PropertyProvider",
75         // "fuchsia.logger/LogSink", is included by the shard above.
76         "fuchsia.memorypressure.Provider",
77         "fuchsia.process.Launcher",
78         "fuchsia.sysmem.Allocator",
79       ],
80       from: "parent",
81       to: "#realm_builder",
82     },
83     {
84       protocol: [
85         // Allows CPU scheduling profiles to be applied to threads to
86         // tune their performance, especially for media rendering.
87         // TODO(crbug.com/1224707): Migrate to `fuchsia.scheduler`.
88         "fuchsia.media.ProfileProvider",
89
90         // Optionally used by the tracing service.
91         // TODO(crbug.com/1364196): Offer only when enabled.
92         "fuchsia.tracing.perfetto.ProducerConnector",
93       ],
94       from: "parent",
95       to: "#realm_builder",
96       availability: "optional",
97     },
98     {
99       protocol: [
100         // Required by `fuchsia.web/ContextFeatureFlags.NETWORK`.
101         "fuchsia.net.interfaces.State",
102         "fuchsia.net.name.Lookup",
103         "fuchsia.posix.socket.Provider",
104
105         // Required by `fuchsia.web/ContextFeatureFlags.AUDIO`.
106         "fuchsia.media.Audio",
107         "fuchsia.media.AudioDeviceEnumerator",
108         "fuchsia.media.SessionAudioConsumerFactory",
109
110         // Required by `fuchsia.web/ContextFeatureFlags.VULKAN`.
111         // "fuchsia.tracing.provider.Registry" is optionally used by the
112         // tracing service.
113         "fuchsia.tracing.provider.Registry",
114         "fuchsia.vulkan.loader.Loader",
115
116         // Required by `fuchsia.web/ContextFeatureFlags.HARDWARE_VIDEO_DECODER`.
117         "fuchsia.mediacodec.CodecFactory",
118       ],
119       from: "parent",
120       to: "#realm_builder",
121     },
122     {
123       protocol: [
124         // Required by the absence of
125         // `fuchsia.web/ContextFeatureFlags.HEADLESS`.
126         "fuchsia.accessibility.semantics.SemanticsManager",
127         "fuchsia.ui.composition.Allocator",
128         "fuchsia.ui.composition.Flatland",
129       ],
130       from: "parent",
131       to: "#realm_builder",
132     },
133     {
134       protocol: [
135         // Required by the absence of
136         // `fuchsia.web/ContextFeatureFlags.DISABLE_DYNAMIC_CODE_GENERATION`.
137         "fuchsia.kernel.VmexResource",
138       ],
139       from: "parent",
140       to: "#realm_builder",
141     },
142   ],
143   facets: {
144     // TODO(crbug.com/1410937): Remove when converting to a non-test component.
145     "fuchsia.test": {
146       "deprecated-allowed-packages": [ "web_engine" ],
147     },
148   },
149 }