39class Engine final :
public fuchsia::memorypressure::Watcher {
47 const std::string& name_prefix,
48 const std::shared_ptr<sys::ServiceDirectory>& runner_services =
nullptr);
51 std::string thread_label,
52 std::shared_ptr<sys::ServiceDirectory> svc,
53 std::shared_ptr<sys::ServiceDirectory> runner_services,
55 fuchsia::ui::views::ViewCreationToken view_creation_token,
56 std::pair<fuchsia::ui::views::ViewRefControl,
57 fuchsia::ui::views::ViewRef> view_ref_pair,
59 fidl::InterfaceRequest<fuchsia::io::Directory> directory_request,
61 const std::vector<std::string>& dart_entrypoint_args);
69#if !defined(DART_PRODUCT)
75 std::pair<fuchsia::ui::views::ViewRefControl, fuchsia::ui::views::ViewRef>
77 std::shared_ptr<sys::ServiceDirectory> svc,
78 std::shared_ptr<sys::ServiceDirectory> runner_services,
81 fidl::InterfaceRequest<fuchsia::io::Directory> directory_request,
83 const std::vector<std::string>& dart_entrypoint_args);
85 static void WarmupSkps(
88 std::shared_ptr<SurfaceProducer> surface_producer,
90 std::shared_ptr<flutter::AssetManager> asset_manager,
91 std::optional<
const std::vector<std::string>> skp_names,
92 std::optional<std::function<
void(uint32_t)>> completion_callback,
93 bool synchronous =
false);
95 void OnMainIsolateStart();
97 void OnMainIsolateShutdown();
101 void DebugWireframeSettingsChanged(
bool enabled);
102 void CreateView(int64_t view_id,
107 void UpdateView(int64_t view_id,
111 void DestroyView(int64_t view_id,
ViewIdCallback on_view_unbound);
115 fuchsia::memorypressure::Watcher::OnLevelChangedCallback
118 std::shared_ptr<flutter::ExternalViewEmbedder> GetExternalViewEmbedder();
120 std::unique_ptr<flutter::Surface> CreateSurface();
124 const std::string thread_label_;
127 fuchsia::ui::views::ViewCreationToken view_creation_token_;
128 std::shared_ptr<FlatlandConnection>
129 flatland_connection_;
130 std::shared_ptr<SurfaceProducer> surface_producer_;
131 std::shared_ptr<ExternalViewEmbedder> view_embedder_;
133 std::unique_ptr<IsolateConfigurator> isolate_configurator_;
134 std::unique_ptr<flutter::Shell> shell_;
135 std::unique_ptr<AccessibilityBridge> accessibility_bridge_;
137 fuchsia::intl::PropertyProviderPtr intl_property_provider_;
139 fuchsia::memorypressure::ProviderPtr memory_pressure_provider_;
140 fidl::Binding<fuchsia::memorypressure::Watcher>
141 memory_pressure_watcher_binding_;
144 fuchsia::memorypressure::Level latest_memory_pressure_level_;
146 bool intercept_all_input_ =
false;