While the engine operates entirely on the UI task runner, it needs the capabilities of the other components to fulfill the requirements of the root isolate. The shell is the only class that implements this interface as no other component has access to all components in a thread safe manner. The engine delegates these tasks to the shell via this interface.
More...
|
virtual void | OnEngineUpdateSemantics (SemanticsNodeUpdates updates, CustomAccessibilityActionUpdates actions)=0 |
| When the accessibility tree has been updated by the Flutter application, this new information needs to be conveyed to the underlying platform. The engine delegates this task to the shell via this call. The engine cannot access the underlying platform directly because of threading considerations. Most platform specific APIs to convey accessibility information are only safe to access on the platform task runner while the engine is running on the UI task runner. More...
|
|
virtual void | OnEngineHandlePlatformMessage (std::unique_ptr< PlatformMessage > message)=0 |
| When the Flutter application has a message to send to the underlying platform, the message needs to be forwarded to the platform on the appropriate thread (via the platform task runner). The engine delegates this task to the shell via this method. More...
|
|
virtual void | OnPreEngineRestart ()=0 |
| Notifies the delegate that the root isolate of the application is about to be discarded and a new isolate with the same runtime started in its place. This should only happen in the Flutter "debug" runtime mode in the cold-restart scenario. The embedder may need to reset native resource in response to the restart. More...
|
|
virtual void | OnRootIsolateCreated ()=0 |
| Notifies the shell that the root isolate is created. Currently, this information is to add to the service protocol list of available root isolates running in the VM and their names so that the appropriate isolate can be selected in the tools for debugging and instrumentation. More...
|
|
virtual void | UpdateIsolateDescription (const std::string isolate_name, int64_t isolate_port)=0 |
| Notifies the shell of the name of the root isolate and its port when that isolate is launched, restarted (in the cold-restart scenario) or the application itself updates the name of the root isolate (via PlatformDispatcher.setIsolateDebugName in platform_dispatcher.dart ). The name of the isolate is meaningless to the engine but is used in instrumentation and tooling. Currently, this information is to update the service protocol list of available root isolates running in the VM and their names so that the appropriate isolate can be selected in the tools for debugging and instrumentation. More...
|
|
virtual void | SetNeedsReportTimings (bool needs_reporting)=0 |
| Notifies the shell that the application has an opinion about whether its frame timings need to be reported backed to it. Due to the asynchronous nature of rendering in Flutter, it is not possible for the application to determine the total time it took to render a specific frame. While the layer-tree is constructed on the UI thread, it needs to be rendering on the raster thread. Dart code cannot execute on this thread. So any instrumentation about the frame times gathered on this thread needs to be aggregated and sent back to the UI thread for processing in Dart. More...
|
|
virtual std::unique_ptr< std::vector< std::string > > | ComputePlatformResolvedLocale (const std::vector< std::string > &supported_locale_data)=0 |
| Directly invokes platform-specific APIs to compute the locale the platform would have natively resolved to. More...
|
|
virtual void | RequestDartDeferredLibrary (intptr_t loading_unit_id)=0 |
| Invoked when the Dart VM requests that a deferred library be loaded. Notifies the engine that the deferred library identified by the specified loading unit id should be downloaded and loaded into the Dart VM via LoadDartDeferredLibrary More...
|
|
virtual fml::TimePoint | GetCurrentTimePoint ()=0 |
| Returns the current fml::TimePoint. This method is primarily provided to allow tests to control Any methods that rely on advancing the clock. More...
|
|
virtual const std::shared_ptr< PlatformMessageHandler > & | GetPlatformMessageHandler () const =0 |
| Returns the delegate object that handles PlatformMessage's from Flutter to the host platform (and its responses). More...
|
|
virtual void | OnEngineChannelUpdate (std::string name, bool listening)=0 |
| Invoked when a listener is registered on a platform channel. More...
|
|
virtual double | GetScaledFontSize (double unscaled_font_size, int configuration_id) const =0 |
| Synchronously invokes platform-specific APIs to apply the system text scaling on the given unscaled font size. More...
|
|
While the engine operates entirely on the UI task runner, it needs the capabilities of the other components to fulfill the requirements of the root isolate. The shell is the only class that implements this interface as no other component has access to all components in a thread safe manner. The engine delegates these tasks to the shell via this interface.
Definition at line 140 of file engine.h.
virtual void flutter::Engine::Delegate::SetNeedsReportTimings |
( |
bool |
needs_reporting | ) |
|
|
pure virtual |
Notifies the shell that the application has an opinion about whether its frame timings need to be reported backed to it. Due to the asynchronous nature of rendering in Flutter, it is not possible for the application to determine the total time it took to render a specific frame. While the layer-tree is constructed on the UI thread, it needs to be rendering on the raster thread. Dart code cannot execute on this thread. So any instrumentation about the frame times gathered on this thread needs to be aggregated and sent back to the UI thread for processing in Dart.
When the application indicates that frame times need to be reported, it collects this information till a specified number of data points are gathered. Then this information is sent back to Dart code via Engine::ReportTimings
.
This option is engine counterpart of the Window._setNeedsReportTimings
in window.dart
.
- Parameters
-
[in] | needs_reporting | If reporting information should be collected and send back to Dart. |