Flutter Engine
flutter::EngineModifier Class Reference

#include <engine_modifier.h>

Public Member Functions

 EngineModifier (FlutterWindowsEngine *engine)
 
FlutterEngineProcTableembedder_api ()
 
void SetSurfaceManager (AngleSurfaceManager *surface_manager)
 
void SetStartTime (uint64_t start_time_nanos)
 Reset the start_time field that is used to align vsync events. More...
 
void SetFrameInterval (uint64_t frame_interval_nanos)
 
void ReleaseSurfaceManager ()
 

Detailed Description

Definition at line 20 of file engine_modifier.h.

Constructor & Destructor Documentation

◆ EngineModifier()

flutter::EngineModifier::EngineModifier ( FlutterWindowsEngine engine)
inlineexplicit

Definition at line 22 of file engine_modifier.h.

22 : engine_(engine) {}
FlutterEngine engine
Definition: main.cc:66

Member Function Documentation

◆ embedder_api()

FlutterEngineProcTable& flutter::EngineModifier::embedder_api ( )
inline

Definition at line 28 of file engine_modifier.h.

Referenced by flutter::testing::MockEmbedderApiForKeyboard().

28 { return engine_->embedder_api_; }

◆ ReleaseSurfaceManager()

void flutter::EngineModifier::ReleaseSurfaceManager ( )
inline

Definition at line 61 of file engine_modifier.h.

61 { engine_->surface_manager_.release(); }

◆ SetFrameInterval()

void flutter::EngineModifier::SetFrameInterval ( uint64_t  frame_interval_nanos)
inline

Override the frame interval to the provided nanosecond interval.

This will prevent the windows engine from delegating to dwm to discover the true frame interval, which can vary across machines.

Definition at line 49 of file engine_modifier.h.

49  {
50  engine_->frame_interval_override_ =
51  std::optional<std::chrono::nanoseconds>(frame_interval_nanos);
52  }

◆ SetStartTime()

void flutter::EngineModifier::SetStartTime ( uint64_t  start_time_nanos)
inline

Reset the start_time field that is used to align vsync events.

Definition at line 41 of file engine_modifier.h.

41  {
42  engine_->start_time_ = std::chrono::nanoseconds(start_time_nanos);
43  }

◆ SetSurfaceManager()

void flutter::EngineModifier::SetSurfaceManager ( AngleSurfaceManager surface_manager)
inline

Definition at line 36 of file engine_modifier.h.

36  {
37  engine_->surface_manager_.reset(surface_manager);
38  }

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