[scenic] Remove set_root_view
Its been deprecated for a month, time to delete it.
SCN-892 #done
Change-Id: Ie23f903292e6577d223522ef38ae419978ca3e2e
diff --git a/garnet/bin/ui/BUILD.gn b/garnet/bin/ui/BUILD.gn
index c60a0f7..574e765 100644
--- a/garnet/bin/ui/BUILD.gn
+++ b/garnet/bin/ui/BUILD.gn
@@ -28,7 +28,6 @@
"scenic",
"screencap",
"set_renderer_params_HACK",
- "set_root_view",
"sketchy",
"snapshot",
"tests",
@@ -289,7 +288,6 @@
"gltf_export",
"present_view",
"screencap",
- "set_root_view",
"snapshot",
]
foreach(tool, component_shell_tools) {
diff --git a/garnet/bin/ui/set_root_view/BUILD.gn b/garnet/bin/ui/set_root_view/BUILD.gn
deleted file mode 100644
index 2a1e8e1..0000000
--- a/garnet/bin/ui/set_root_view/BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2016 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.
-
-executable("set_root_view") {
- sources = [
- "main.cc",
- ]
-
- deps = [
- "//garnet/public/lib/component/cpp",
- "//garnet/public/lib/svc/cpp",
- "//sdk/fidl/fuchsia.ui.app",
- "//sdk/fidl/fuchsia.ui.policy",
- "//sdk/fidl/fuchsia.ui.views",
- "//sdk/lib/ui/scenic/cpp",
- "//src/lib/fxl",
- "//src/lib/pkg_url",
- "//zircon/public/lib/async-loop-cpp",
- "//zircon/public/lib/trace-provider",
- ]
-}
diff --git a/garnet/bin/ui/set_root_view/README.md b/garnet/bin/ui/set_root_view/README.md
deleted file mode 100644
index d582569..0000000
--- a/garnet/bin/ui/set_root_view/README.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Scenic View Debugger
-
-This directory contains set_root_view, a utility which can debug processes that
-provide Views via the ViewProvider interface.
-
-The set_root_view tool takes the URL to a process that exposes the ViewProvider
-interface and makes its View the root (fullscreen) View.
-
-This tool is intended for testing and debugging purposes only and may cause
-problems if invoked incorrectly.
-
-## USAGE
-
-```shell
-$ set_root_view <view_provider_process>
-e.g.
-$ set_root_view spinning_square_view
-```
-
-When a view is presented, it takes over the entire display. To switch between
-presentations, type Control-Alt-'[' or Control-Alt-']'.
-
-Alternatively, kill any other view-providing processes like so:
-
-```shell
-$ killall spinning_square_view
-```
-
-## Views V2
-
-Use the
-[`present_view`](https://fuchsia.googlesource.com/fuchsia/+/master/garnet/bin/ui/present_view/README.md)
-tool to launch an application via the Views v2 interface.
diff --git a/garnet/bin/ui/set_root_view/main.cc b/garnet/bin/ui/set_root_view/main.cc
deleted file mode 100644
index 33c2e64..0000000
--- a/garnet/bin/ui/set_root_view/main.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2016 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.
-
-#include <fuchsia/ui/app/cpp/fidl.h>
-#include <fuchsia/ui/policy/cpp/fidl.h>
-#include <lib/async-loop/cpp/loop.h>
-#include <lib/component/cpp/startup_context.h>
-#include <src/lib/fxl/command_line.h>
-#include <src/lib/fxl/log_settings_command_line.h>
-#include <src/lib/fxl/logging.h>
-#include <lib/svc/cpp/services.h>
-#include <lib/ui/scenic/cpp/view_token_pair.h>
-#include <src/lib/pkg_url/fuchsia_pkg_url.h>
-#include <trace-provider/provider.h>
-
-int main(int argc, const char** argv) {
- auto command_line = fxl::CommandLineFromArgcArgv(argc, argv);
- if (!fxl::SetLogSettingsFromCommandLine(command_line))
- return 1;
-
- FXL_LOG(WARNING) << "NOTE: This tool is deprecated and WILL BE DELETED "
- << "04/20/2019. Use present_view instead.";
- FXL_LOG(WARNING) << "BE ADVISED: The set_root_view tool takes the URL to an "
- "app that provided the ViewProvider interface and makes "
- "it's view the root view.";
- FXL_LOG(WARNING)
- << "This tool is intended for testing and debugging purposes "
- "only and may cause problems if invoked incorrectly.";
- FXL_LOG(WARNING)
- << "Do not invoke set_root_view if a view tree already exists "
- "(i.e. if any process that creates a view is already "
- "running).";
- FXL_LOG(WARNING)
- << "If scenic is already running on your system you "
- "will probably want to kill it before invoking this tool.";
-
- const auto& positional_args = command_line.positional_args();
- if (positional_args.empty()) {
- FXL_LOG(ERROR)
- << "set_root_view requires the url of a view provider application "
- "to set_root_view.";
- return 1;
- }
-
- if (command_line.HasOption("input_path", nullptr)) {
- // Ease users off this flag.
- FXL_LOG(ERROR)
- << "The --input_path= flag is DEPRECATED. Flag will be removed.";
- }
-
- async::Loop loop(&kAsyncLoopConfigAttachToThread);
- auto startup_context_ = component::StartupContext::CreateFromStartupInfo();
-
- // Launch the component.
- component::Services services;
- fuchsia::sys::LaunchInfo launch_info;
- launch_info.url = positional_args[0];
- for (size_t i = 1; i < positional_args.size(); ++i)
- launch_info.arguments.push_back(positional_args[i]);
- launch_info.directory_request = services.NewRequest();
- fuchsia::sys::ComponentControllerPtr controller;
- startup_context_->launcher()->CreateComponent(std::move(launch_info),
- controller.NewRequest());
- controller.set_error_handler([&loop](zx_status_t status) {
- FXL_LOG(INFO) << "Launched component terminated.";
- loop.Quit();
- });
-
- auto [view_token, view_holder_token] = scenic::NewViewTokenPair();
-
- // Create a View from the launched component.
- auto view_provider =
- services.ConnectToService<fuchsia::ui::app::ViewProvider>();
- view_provider->CreateView(std::move(view_token.value), nullptr, nullptr);
-
- // Ask the presenter to display it.
- auto presenter =
- startup_context_
- ->ConnectToEnvironmentService<fuchsia::ui::policy::Presenter>();
- presenter->PresentView(std::move(view_holder_token), nullptr);
-
- // Done!
- loop.Run();
- return 0;
-}
diff --git a/garnet/bin/ui/set_root_view/meta/set_root_view.cmx b/garnet/bin/ui/set_root_view/meta/set_root_view.cmx
deleted file mode 100644
index ec37507..0000000
--- a/garnet/bin/ui/set_root_view/meta/set_root_view.cmx
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "program": {
- "binary": "bin/set_root_view"
- },
- "sandbox": {
- "services": [
- "fuchsia.sys.Environment",
- "fuchsia.sys.Launcher",
- "fuchsia.tracelink.Registry",
- "fuchsia.ui.policy.Presenter"
- ]
- }
-}
diff --git a/garnet/packages/tools/BUILD.gn b/garnet/packages/tools/BUILD.gn
index b321d23..89a572e 100644
--- a/garnet/packages/tools/BUILD.gn
+++ b/garnet/packages/tools/BUILD.gn
@@ -14,7 +14,6 @@
"//garnet/bin/ui:print_input",
"//garnet/bin/ui:screencap",
"//garnet/bin/ui:set_renderer_params",
- "//garnet/bin/ui:set_root_view",
"//garnet/bin/ui:snapshot",
]
}
diff --git a/garnet/public/lib/component/cpp/BUILD.gn b/garnet/public/lib/component/cpp/BUILD.gn
index 9940d87..5e3cd90 100644
--- a/garnet/public/lib/component/cpp/BUILD.gn
+++ b/garnet/public/lib/component/cpp/BUILD.gn
@@ -44,7 +44,6 @@
"//garnet/bin/media/*",
"//garnet/bin/ui/set_renderer_params_HACK:*",
"//garnet/bin/ui/present_view:*",
- "//garnet/bin/ui/set_root_view:*",
"//garnet/bin/ui/sketchy:*",
"//garnet/bin/ui/screencap:*",
"//garnet/bin/ui/benchmarks/transparency_benchmark:*",
diff --git a/garnet/tests/benchmarks/input_latency/run_yuv_to_image_pipe_benchmark.sh b/garnet/tests/benchmarks/input_latency/run_yuv_to_image_pipe_benchmark.sh
index f27c63e..00974f3 100644
--- a/garnet/tests/benchmarks/input_latency/run_yuv_to_image_pipe_benchmark.sh
+++ b/garnet/tests/benchmarks/input_latency/run_yuv_to_image_pipe_benchmark.sh
@@ -33,7 +33,6 @@
killall basemgr* || true
killall view_manager* || true
killall flutter* || true
-killall set_root_view* || true
killall present_view* || true
echo "== $BENCHMARK_LABEL: Starting app..."