-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The goal of this change is to ensure we only need to add new routes to/from scenic in one CML file. Bug: 110658 Test: built each affected product Change-Id: I93f6c00bff986d7f2ccfd3dcf0a2f4cb51aa904d Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/732362 Reviewed-by: Caroline Liu <[email protected]> Commit-Queue: Alexander Brusher <[email protected]> Reviewed-by: Sahil Madan <[email protected]>
- Loading branch information
Showing
6 changed files
with
147 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright 2022 The Fuchsia Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// This shard is shared across all production and test UI realms that | ||
// contain scenic. | ||
// | ||
// It contains any capabilities that: | ||
// | ||
// (1) Scenic exposes from every production or test UI realm in which it's | ||
// present. | ||
// (2) Scenic always consumes from the same source in every production or | ||
// test UI realm in which it's present. | ||
// | ||
// This shard should **NOT** include: | ||
// | ||
// (1) Routes that have different sources in different ui realms. For | ||
// example, scenic consumes the metrics logger factory from "parent" | ||
// in production ui realms, but "#mock_cobalt" in test ui realms. | ||
// (2) Scenic's child definition, as we may use a differnt url for | ||
// scenic in test vs. production ui realms. | ||
// (3) Capabilities that other components consume from scenic. Those | ||
// routes belong on those components' routing shards. | ||
{ | ||
offer: [ | ||
{ | ||
protocol: [ | ||
"fuchsia.logger.LogSink", | ||
"fuchsia.scheduler.ProfileProvider", | ||
"fuchsia.stash.Store", | ||
"fuchsia.sysmem.Allocator", | ||
"fuchsia.tracing.provider.Registry", | ||
"fuchsia.vulkan.loader.Loader", | ||
], | ||
from: "parent", | ||
to: [ "#scenic" ], | ||
}, | ||
], | ||
expose: [ | ||
{ | ||
// Expose FlatlandDisplay to the V1 realm for the benefit of | ||
// flatland_benchmark. | ||
// TODO(fxbug.dev/104906): Remove this when no longer needed. | ||
protocol: [ "fuchsia.ui.composition.FlatlandDisplay" ], | ||
from: "#scenic", | ||
}, | ||
{ | ||
protocol: [ | ||
"fuchsia.ui.composition.Allocator", | ||
"fuchsia.ui.composition.Flatland", | ||
"fuchsia.ui.composition.internal.ScreenCapture", | ||
"fuchsia.ui.composition.ScreenCapture", | ||
"fuchsia.ui.composition.Screenshot", | ||
"fuchsia.ui.display.internal.DisplayPower", | ||
"fuchsia.ui.display.singleton.Info", | ||
"fuchsia.ui.focus.FocusChainListenerRegistry", | ||
"fuchsia.ui.pointer.augment.GlobalMouse", | ||
"fuchsia.ui.pointerinjector.Registry", | ||
"fuchsia.ui.scenic.Scenic", | ||
"fuchsia.ui.views.ViewRefInstalled", | ||
], | ||
from: "#scenic", | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2022 The Fuchsia Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
// This shard includes the portion of the scenic layer that is common | ||
// across all production ui realms that include scenic, but differs from | ||
// test ui realms. | ||
// | ||
// Production ui realms should include this shard directly. | ||
// | ||
// This shard should include: | ||
// | ||
// (1) Scenic's child declaration. Note that other shards assume the name | ||
// "scenic". | ||
// (2) Capability routes to scenic that are the same for all production ui | ||
// realms in which scenic is present, but differ in test realms. | ||
// | ||
// This shard should **NOT** include: | ||
// | ||
// (1) Routes that are common to all production and test ui realms; these | ||
// routes belong in scenic_base_routes.shard.cml. | ||
// (2) Routes to scenic that differ among production ui realms. | ||
// (3) Routes **FROM** scenic to other components in the ui realm; these | ||
// routes belong in the target components' routing shards. | ||
{ | ||
include: [ "//src/ui/meta/scenic_base_routes.shard.cml" ], | ||
children: [ | ||
{ | ||
// DO NOT CHANGE THIS NAME -- OTHER SHARDS DEPEND ON IT. | ||
name: "scenic", | ||
url: "fuchsia-pkg://fuchsia.com/scenic#meta/scenic.cm", | ||
}, | ||
], | ||
offer: [ | ||
{ | ||
directory: "config-data", | ||
from: "parent", | ||
to: [ "#scenic" ], | ||
subdir: "scenic", | ||
}, | ||
{ | ||
directory: "dev-display-controller", | ||
from: "parent", | ||
to: "#scenic", | ||
}, | ||
{ | ||
storage: "tmp", | ||
from: "parent", | ||
to: "#scenic", | ||
}, | ||
|
||
// Additional services scenic uses, which are not defined in | ||
// scenic_base_routes.shard.cml. | ||
{ | ||
protocol: [ | ||
"fuchsia.media.ProfileProvider", | ||
"fuchsia.metrics.MetricEventLoggerFactory", | ||
], | ||
from: "parent", | ||
to: [ "#scenic" ], | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.