| Flutter Impeller |

switches.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "impeller/playground/switches.h"
6
7 #include <cstdlib>
8
9 namespace impeller {
10
11 PlaygroundSwitches::PlaygroundSwitches() = default;
12
13 PlaygroundSwitches::PlaygroundSwitches(const fml::CommandLine& args) {
14 enable_playground = args.HasOption("enable_playground");
15 std::string timeout_str;
16 if (args.GetOptionValue("playground_timeout_ms", &timeout_str)) {
17 timeout = std::chrono::milliseconds(atoi(timeout_str.c_str()));
18 // Specifying a playground timeout implies you want to enable playgrounds.
19 enable_playground = true;
20 }
21 enable_vulkan_validation = args.HasOption("enable_vulkan_validation");
22 }
23
24 } // namespace impeller
impeller::PlaygroundSwitches::timeout
std::optional< std::chrono::milliseconds > timeout
Definition: switches.h:21
switches.h
impeller::PlaygroundSwitches::PlaygroundSwitches
PlaygroundSwitches()
impeller::PlaygroundSwitches::enable_vulkan_validation
bool enable_vulkan_validation
Definition: switches.h:22
impeller
Definition: aiks_context.cc:10
impeller::PlaygroundSwitches::enable_playground
bool enable_playground
Definition: switches.h:17