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 ()
 

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 12 of file flutter_runner_product_configuration.cc.

References fml::TimeDelta::FromMicroseconds().

13  {
14  rapidjson::Document document;
15  document.Parse(json_string);
16 
17  if (!document.IsObject())
18  return;
19 
20  // Parse out all values we're expecting.
21  if (document.HasMember("vsync_offset_in_us")) {
22  auto& val = document["vsync_offset_in_us"];
23  if (val.IsInt())
24  vsync_offset_ = fml::TimeDelta::FromMicroseconds(val.GetInt());
25  }
26  if (document.HasMember("max_frames_in_flight")) {
27  auto& val = document["max_frames_in_flight"];
28  if (val.IsInt())
29  max_frames_in_flight_ = val.GetInt();
30  }
31  if (document.HasMember("intercept_all_input")) {
32  auto& val = document["intercept_all_input"];
33  if (val.IsBool())
34  intercept_all_input_ = val.GetBool();
35  }
36 #if defined(LEGACY_FUCHSIA_EMBEDDER)
37  if (document.HasMember("use_legacy_renderer")) {
38  auto& val = document["use_legacy_renderer"];
39  if (val.IsBool())
40  use_legacy_renderer_ = val.GetBool();
41  }
42 #endif
43 }
static constexpr TimeDelta FromMicroseconds(int64_t micros)
Definition: time_delta.h:43

Member Function Documentation

◆ get_intercept_all_input()

bool flutter_runner::FlutterRunnerProductConfiguration::get_intercept_all_input ( )
inline

Definition at line 19 of file flutter_runner_product_configuration.h.

References fml::TimeDelta::Zero().

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: