Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter_runner::FlutterRunnerProductConfiguration Class Reference

#include <flutter_runner_product_configuration.h>

Public Member Functions

 FlutterRunnerProductConfiguration ()
 
 FlutterRunnerProductConfiguration (std::string json_string)
 
bool get_intercept_all_input ()
 
bool software_rendering ()
 
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.

14{}

◆ FlutterRunnerProductConfiguration() [2/2]

flutter_runner::FlutterRunnerProductConfiguration::FlutterRunnerProductConfiguration ( std::string  json_string)
explicit

Definition at line 14 of file flutter_runner_product_configuration.cc.

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("intercept_all_input")) {
27 auto& val = document["intercept_all_input"];
28 if (val.IsBool()) {
29 intercept_all_input_ = val.GetBool();
30 }
31 }
32 if (document.HasMember("software_rendering")) {
33 auto& val = document["software_rendering"];
34 if (val.IsBool()) {
35 software_rendering_ = val.GetBool();
36 }
37 }
38 if (document.HasMember("enable_shader_warmup")) {
39 auto& val = document["enable_shader_warmup"];
40 if (val.IsBool()) {
41 enable_shader_warmup_ = val.GetBool();
42 }
43 }
44 if (document.HasMember("enable_shader_warmup_dart_hooks")) {
45 auto& val = document["enable_shader_warmup_dart_hooks"];
46 if (val.IsBool()) {
47 enable_shader_warmup_dart_hooks_ = val.GetBool();
48 }
49 }
50}
#define FML_LOG(severity)
Definition: logging.h:82
#define ERROR(message)
Definition: elf_loader.cc:260

Member Function Documentation

◆ enable_shader_warmup()

bool flutter_runner::FlutterRunnerProductConfiguration::enable_shader_warmup ( )
inline

Definition at line 19 of file flutter_runner_product_configuration.h.

19{ return enable_shader_warmup_; }

◆ enable_shader_warmup_dart_hooks()

bool flutter_runner::FlutterRunnerProductConfiguration::enable_shader_warmup_dart_hooks ( )
inline

Definition at line 20 of file flutter_runner_product_configuration.h.

20 {
21 return enable_shader_warmup_dart_hooks_;
22 }

◆ get_intercept_all_input()

bool flutter_runner::FlutterRunnerProductConfiguration::get_intercept_all_input ( )
inline

Definition at line 17 of file flutter_runner_product_configuration.h.

17{ return intercept_all_input_; }

◆ software_rendering()

bool flutter_runner::FlutterRunnerProductConfiguration::software_rendering ( )
inline

Definition at line 18 of file flutter_runner_product_configuration.h.

18{ return software_rendering_; }

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