| Flutter Impeller |

switches.h
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 #ifndef FLUTTER_IMPELLER_PLAYGROUND_SWITCHES_H_
6 #define FLUTTER_IMPELLER_PLAYGROUND_SWITCHES_H_
7
8 #include <chrono>
9 #include <optional>
10
11 #include "flutter/fml/command_line.h"
12
13 namespace impeller {
14
15 struct PlaygroundSwitches {
16 bool enable_playground = false;
17 // If specified, the playgrounds will render for at least the duration
18 // specified in the timeout. If the timeout is zero, exactly one frame will be
19 // rendered in the playground.
20 std::optional<std::chrono::milliseconds> timeout;
21 bool enable_vulkan_validation = false;
22 //----------------------------------------------------------------------------
23 /// Seek a SwiftShader library in known locations and use it when running
24 /// Vulkan. It is a fatal error to provide this option and not have the test
25 /// find a SwiftShader implementation.
26 ///
27 bool use_swiftshader = false;
28 /// Attempt to use Angle on the system instead of the available OpenGL ES
29 /// implementation. This is on-by-default on macOS due to the broken-ness in
30 /// the deprecated OpenGL implementation. On other platforms, it this opt-in
31 /// via the flag with the system OpenGL ES implementation used by fault.
32 ///
33 bool use_angle = false;
34
35 bool enable_wide_gamut = false;
36
37 PlaygroundSwitches();
38
39 explicit PlaygroundSwitches(const fml::CommandLine& args);
40 };
41
42 } // namespace impeller
43
44 #endif // FLUTTER_IMPELLER_PLAYGROUND_SWITCHES_H_
impeller::PlaygroundSwitches::enable_wide_gamut
bool enable_wide_gamut
Definition: switches.h:35
impeller::PlaygroundSwitches::use_swiftshader
bool use_swiftshader
Definition: switches.h:27
impeller::PlaygroundSwitches::timeout
std::optional< std::chrono::milliseconds > timeout
Definition: switches.h:20
impeller::PlaygroundSwitches::use_angle
bool use_angle
Definition: switches.h:33
impeller::PlaygroundSwitches
Definition: switches.h:15
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