Skip to content

Commit

Permalink
[fuchsia] route fuchsia.sysmem2.Allocator (flutter#52187)
Browse files Browse the repository at this point in the history
Fuchsia's fake-display will be migrating to sysmem2, which requires fuchsia.sysmem2.Allocator to be routed in a few places.

fixes flutter/flutter#146858

- [y] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
- [y] I read the [Tree Hygiene] wiki page, which explains my responsibilities.
- [na] I read and followed the [Flutter Style Guide] and the [C++, Objective-C, Java style guides].
- [y] I listed at least one issue that this PR fixes in the description above.
- [fixes to existing tests] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests.
- [na] I updated/added relevant documentation (doc comments with `///`).
- [na / googler] I signed the [CLA].
- [y] All existing and new tests are passing.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
  • Loading branch information
dustingreen committed Apr 26, 2024
1 parent 11f2ec8 commit 6cc5188
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ executable("flutter-embedder-test-bin") {
deps = [
"${fuchsia_sdk}/fidl/fuchsia.inspect",
"${fuchsia_sdk}/fidl/fuchsia.logger",
"${fuchsia_sdk}/fidl/fuchsia.sysmem",
"${fuchsia_sdk}/fidl/fuchsia.sysmem2",
"${fuchsia_sdk}/fidl/fuchsia.tracing.provider",
"${fuchsia_sdk}/fidl/fuchsia.ui.app",
"${fuchsia_sdk}/fidl/fuchsia.ui.composition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include <fuchsia/inspect/cpp/fidl.h>
#include <fuchsia/logger/cpp/fidl.h>
#include <fuchsia/sysmem/cpp/fidl.h>
#include <fuchsia/sysmem2/cpp/fidl.h>
#include <fuchsia/tracing/provider/cpp/fidl.h>
#include <fuchsia/ui/app/cpp/fidl.h>
#include <fuchsia/ui/composition/cpp/fidl.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"fuchsia.inspect.InspectSink",
"fuchsia.logger.LogSink",
"fuchsia.sysmem.Allocator",
"fuchsia.sysmem2.Allocator",
"fuchsia.tracing.provider.Registry",
"fuchsia.vulkan.loader.Loader",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"fuchsia.logger.LogSink",
"fuchsia.scheduler.ProfileProvider",
"fuchsia.sysmem.Allocator",
"fuchsia.sysmem2.Allocator",
"fuchsia.tracing.provider.Registry",
"fuchsia.ui.input.ImeService",
"fuchsia.vulkan.loader.Loader",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"fuchsia.logger.LogSink",
"fuchsia.scheduler.ProfileProvider",
"fuchsia.sysmem.Allocator",
"fuchsia.sysmem2.Allocator",
"fuchsia.tracing.provider.Registry",
"fuchsia.ui.input.ImeService",
"fuchsia.vulkan.loader.Loader",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ source_set("portable_ui_test") {
":check_view",
"${fuchsia_sdk}/fidl/fuchsia.inspect",
"${fuchsia_sdk}/fidl/fuchsia.logger",
"${fuchsia_sdk}/fidl/fuchsia.sysmem",
"${fuchsia_sdk}/fidl/fuchsia.sysmem2",
"${fuchsia_sdk}/fidl/fuchsia.tracing.provider",
"${fuchsia_sdk}/fidl/fuchsia.ui.app",
"${fuchsia_sdk}/fidl/fuchsia.ui.composition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <fuchsia/inspect/cpp/fidl.h>
#include <fuchsia/logger/cpp/fidl.h>
#include <fuchsia/sysmem/cpp/fidl.h>
#include <fuchsia/sysmem2/cpp/fidl.h>
#include <fuchsia/tracing/provider/cpp/fidl.h>
#include <fuchsia/ui/app/cpp/fidl.h>
#include <lib/async/cpp/task.h>
Expand Down Expand Up @@ -80,6 +82,11 @@ void PortableUITest::SetUpRealmBase() {
.capabilities = {Protocol{fuchsia::logger::LogSink::Name_},
Protocol{fuchsia::inspect::InspectSink::Name_},
Protocol{fuchsia::sysmem::Allocator::Name_},

// Replace string with
// fuchsia::sysmem2::Allocator::Name_
// when available (fuchsia SDK >= 19).
Protocol{"fuchsia.sysmem2.Allocator"},
Protocol{fuchsia::tracing::provider::Registry::Name_},
Protocol{fuchsia::ui::input::ImeService::Name_},
Protocol{kPosixSocketProviderName},
Expand Down

0 comments on commit 6cc5188

Please sign in to comment.