Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::Rasterizer::Delegate Class Referenceabstract

Used to forward events from the rasterizer to interested subsystems. Currently, the shell sets itself up as the rasterizer delegate to listen for frame rasterization events. It can then forward these events to the engine. More...

#include <rasterizer.h>

Inheritance diagram for flutter::Rasterizer::Delegate:
flutter::Shell

Public Member Functions

virtual void OnFrameRasterized (const FrameTiming &frame_timing)=0
 Notifies the delegate that a frame has been rendered. The rasterizer collects profiling information for each part of the frame workload. This profiling information is made available to the delegate for forwarding to subsystems interested in collecting such profiles. Currently, the shell (the delegate) forwards this to the engine where Dart code can react to this information.
 
virtual fml::Milliseconds GetFrameBudget ()=0
 
virtual fml::TimePoint GetLatestFrameTargetTime () const =0
 
virtual const TaskRunnersGetTaskRunners () const =0
 Task runners used by the shell.
 
virtual const fml::RefPtr< fml::RasterThreadMergerGetParentRasterThreadMerger () const =0
 The raster thread merger from parent shell's rasterizer.
 
virtual std::shared_ptr< const fml::SyncSwitchGetIsGpuDisabledSyncSwitch () const =0
 
virtual const SettingsGetSettings () const =0
 
virtual bool ShouldDiscardLayerTree (int64_t view_id, const flutter::LayerTree &tree)=0
 

Detailed Description

Used to forward events from the rasterizer to interested subsystems. Currently, the shell sets itself up as the rasterizer delegate to listen for frame rasterization events. It can then forward these events to the engine.

Like all rasterizer operation, the rasterizer delegate call are made on the raster task runner. Any delegate must ensure that they can handle the threading implications.

Definition at line 128 of file rasterizer.h.

Member Function Documentation

◆ GetFrameBudget()

virtual fml::Milliseconds flutter::Rasterizer::Delegate::GetFrameBudget ( )
pure virtual

Time limit for a smooth frame.

See: DisplayManager::GetMainDisplayRefreshRate.

Implemented in flutter::Shell.

◆ GetIsGpuDisabledSyncSwitch()

virtual std::shared_ptr< const fml::SyncSwitch > flutter::Rasterizer::Delegate::GetIsGpuDisabledSyncSwitch ( ) const
pure virtual

Accessor for the shell's GPU sync switch, which determines whether GPU operations are allowed on the current thread.

For example, on some platforms when the application is backgrounded it is critical that GPU operations are not processed.

Implemented in flutter::Shell.

◆ GetLatestFrameTargetTime()

virtual fml::TimePoint flutter::Rasterizer::Delegate::GetLatestFrameTargetTime ( ) const
pure virtual

Target time for the latest frame. See also Shell::OnAnimatorBeginFrame for when this time gets updated.

Implemented in flutter::Shell.

◆ GetParentRasterThreadMerger()

virtual const fml::RefPtr< fml::RasterThreadMerger > flutter::Rasterizer::Delegate::GetParentRasterThreadMerger ( ) const
pure virtual

The raster thread merger from parent shell's rasterizer.

Implemented in flutter::Shell.

◆ GetSettings()

virtual const Settings & flutter::Rasterizer::Delegate::GetSettings ( ) const
pure virtual

Implemented in flutter::Shell.

◆ GetTaskRunners()

virtual const TaskRunners & flutter::Rasterizer::Delegate::GetTaskRunners ( ) const
pure virtual

Task runners used by the shell.

Implemented in flutter::Shell.

◆ OnFrameRasterized()

virtual void flutter::Rasterizer::Delegate::OnFrameRasterized ( const FrameTiming frame_timing)
pure virtual

Notifies the delegate that a frame has been rendered. The rasterizer collects profiling information for each part of the frame workload. This profiling information is made available to the delegate for forwarding to subsystems interested in collecting such profiles. Currently, the shell (the delegate) forwards this to the engine where Dart code can react to this information.

See also
FrameTiming
Parameters
[in]frame_timingInstrumentation information for each phase of the frame workload.

Implemented in flutter::Shell.

◆ ShouldDiscardLayerTree()

virtual bool flutter::Rasterizer::Delegate::ShouldDiscardLayerTree ( int64_t  view_id,
const flutter::LayerTree tree 
)
pure virtual

Implemented in flutter::Shell.


The documentation for this class was generated from the following file: