Flutter Engine
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. More...
 
virtual fml::Milliseconds GetFrameBudget ()=0
 
virtual fml::TimePoint GetLatestFrameTargetTime () const =0
 
virtual const TaskRunnersGetTaskRunners () const =0
 Task runners used by the shell. More...
 
virtual std::shared_ptr< fml::SyncSwitchGetIsGpuDisabledSyncSwitch () const =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 GPU task runner. Any delegate must ensure that they can handle the threading implications.

Definition at line 53 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.

Referenced by flutter::Rasterizer::Draw().

◆ GetIsGpuDisabledSyncSwitch()

virtual std::shared_ptr<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.

Referenced by flutter::Rasterizer::Draw().

◆ 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.

Referenced by flutter::Rasterizer::Draw().

◆ GetTaskRunners()

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

Task runners used by the shell.

Implemented in flutter::Shell.

Referenced by flutter::Rasterizer::Draw(), and flutter::Rasterizer::Setup().

◆ 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.

Referenced by flutter::Rasterizer::Draw().


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