| 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 #include "flutter/fml/build_config.h"
10
11 namespace impeller {
12
13 PlaygroundSwitches::PlaygroundSwitches() = default;
14
15 PlaygroundSwitches::PlaygroundSwitches(const fml::CommandLine& args) {
16 enable_playground = args.HasOption("enable_playground");
17 std::string timeout_str;
18 if (args.GetOptionValue("playground_timeout_ms", &timeout_str)) {
19 timeout = std::chrono::milliseconds(atoi(timeout_str.c_str()));
20 // Specifying a playground timeout implies you want to enable playgrounds.
21 enable_playground = true;
22 }
23 enable_vulkan_validation = args.HasOption("enable_vulkan_validation");
24 use_swiftshader = args.HasOption("use_swiftshader");
25 use_angle = args.HasOption("use_angle");
26 #if FML_OS_MACOSX
27 // OpenGL on macOS is busted and deprecated. Use Angle there by default.
28 use_angle = true;
29 #endif // FML_OS_MACOSX
30 }
31
32 } // namespace impeller
impeller::PlaygroundSwitches::use_swiftshader
bool use_swiftshader
Definition: switches.h:27
impeller::PlaygroundSwitches::timeout
std::optional< std::chrono::milliseconds > timeout
Definition: switches.h:20
switches.h
impeller::PlaygroundSwitches::use_angle
bool use_angle
Definition: switches.h:33
impeller::PlaygroundSwitches::PlaygroundSwitches
PlaygroundSwitches()
impeller::PlaygroundSwitches::enable_vulkan_validation
bool enable_vulkan_validation
Definition: switches.h:21
impeller
Definition: aiks_blend_unittests.cc:18
impeller::PlaygroundSwitches::enable_playground
bool enable_playground
Definition: switches.h:16