Flutter Engine
flutter_runner::FlutterRunnerProductConfiguration Class Reference

#include <flutter_runner_product_configuration.h>

Public Member Functions

 FlutterRunnerProductConfiguration ()
 
 FlutterRunnerProductConfiguration (std::string path)
 
fml::TimeDelta get_vsync_offset ()
 
uint64_t get_max_frames_in_flight ()
 
bool get_intercept_all_input ()
 
bool enable_shader_warmup ()
 
bool enable_shader_warmup_dart_hooks ()
 

Detailed Description

Definition at line 12 of file flutter_runner_product_configuration.h.

Constructor & Destructor Documentation

◆ FlutterRunnerProductConfiguration() [1/2]

flutter_runner::FlutterRunnerProductConfiguration::FlutterRunnerProductConfiguration ( )
inline

Definition at line 14 of file flutter_runner_product_configuration.h.

References flutter::path.

14 {}

◆ FlutterRunnerProductConfiguration() [2/2]

flutter_runner::FlutterRunnerProductConfiguration::FlutterRunnerProductConfiguration ( std::string  path)

Definition at line 14 of file flutter_runner_product_configuration.cc.

References FML_LOG, and fml::TimeDelta::FromMicroseconds().

15  {
16  rapidjson::Document document;
17  document.Parse(json_string);
18 
19  if (!document.IsObject()) {
20  FML_LOG(ERROR) << "Failed to parse configuration; using defaults: "
21  << json_string;
22  return;
23  }
24 
25  // Parse out all values we're expecting.
26  if (document.HasMember("vsync_offset_in_us")) {
27  auto& val = document["vsync_offset_in_us"];
28  if (val.IsInt())
29  vsync_offset_ = fml::TimeDelta::FromMicroseconds(val.GetInt());
30  }
31  if (document.HasMember("max_frames_in_flight")) {
32  auto& val = document["max_frames_in_flight"];
33  if (val.IsInt())
34  max_frames_in_flight_ = val.GetInt();
35  }
36  if (document.HasMember("intercept_all_input")) {
37  auto& val = document["intercept_all_input"];
38  if (val.IsBool())
39  intercept_all_input_ = val.GetBool();
40  }
41  if (document.HasMember("enable_shader_warmup")) {
42  auto& val = document["enable_shader_warmup"];
43  if (val.IsBool())
44  enable_shader_warmup_ = val.GetBool();
45  }
46  if (document.HasMember("enable_shader_warmup_dart_hooks")) {
47  auto& val = document["enable_shader_warmup_dart_hooks"];
48  if (val.IsBool())
49  enable_shader_warmup_dart_hooks_ = val.GetBool();
50  }
51 }
#define FML_LOG(severity)
Definition: logging.h:65
static constexpr TimeDelta FromMicroseconds(int64_t micros)
Definition: time_delta.h:43

Member Function Documentation

◆ enable_shader_warmup()

bool flutter_runner::FlutterRunnerProductConfiguration::enable_shader_warmup ( )
inline

Definition at line 20 of file flutter_runner_product_configuration.h.

Referenced by flutter_runner::Engine::Engine().

20 { return enable_shader_warmup_; }

◆ enable_shader_warmup_dart_hooks()

bool flutter_runner::FlutterRunnerProductConfiguration::enable_shader_warmup_dart_hooks ( )
inline

Definition at line 21 of file flutter_runner_product_configuration.h.

References fml::TimeDelta::Zero().

Referenced by flutter_runner::Engine::Engine().

21  {
22  return enable_shader_warmup_dart_hooks_;
23  }

◆ get_intercept_all_input()

bool flutter_runner::FlutterRunnerProductConfiguration::get_intercept_all_input ( )
inline

Definition at line 19 of file flutter_runner_product_configuration.h.

Referenced by flutter_runner_test::TEST_F().

19 { return intercept_all_input_; }

◆ get_max_frames_in_flight()

uint64_t flutter_runner::FlutterRunnerProductConfiguration::get_max_frames_in_flight ( )
inline

Definition at line 18 of file flutter_runner_product_configuration.h.

Referenced by flutter_runner::Engine::Engine(), and flutter_runner_test::TEST_F().

18 { return max_frames_in_flight_; }

◆ get_vsync_offset()

fml::TimeDelta flutter_runner::FlutterRunnerProductConfiguration::get_vsync_offset ( )
inline

Definition at line 17 of file flutter_runner_product_configuration.h.

Referenced by flutter_runner::Engine::Engine(), and flutter_runner_test::TEST_F().

17 { return vsync_offset_; }

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