Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
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
12#include "impeller/base/flags.h"
13
14namespace impeller {
15
17 bool enable_playground = false;
18 // If specified, the playgrounds will render for at least the duration
19 // specified in the timeout. If the timeout is zero, exactly one frame will be
20 // rendered in the playground.
21 std::optional<std::chrono::milliseconds> timeout;
23 //----------------------------------------------------------------------------
24 /// Seek a SwiftShader library in known locations and use it when running
25 /// Vulkan. It is a fatal error to provide this option and not have the test
26 /// find a SwiftShader implementation.
27 ///
28 bool use_swiftshader = false;
29 /// Attempt to use Angle on the system instead of the available OpenGL ES
30 /// implementation. This is on-by-default on macOS due to the broken-ness in
31 /// the deprecated OpenGL implementation. On other platforms, it this opt-in
32 /// via the flag with the system OpenGL ES implementation used by fault.
33 ///
34 bool use_angle = false;
35
36 /// Whether the Playground instance can share contexts among multiple
37 /// instantiations. This value is initialized by the Playground before
38 /// it instantiates the |PlaygroundImpl| object. Implementations are free
39 /// to share or not share contexts if this switch is true, but must create
40 /// a new context for each Impl object created if the value is false.
41 bool can_share_context = true;
42
43 bool enable_wide_gamut = false;
44
46
48
50
51 bool operator==(const PlaygroundSwitches&) const = default;
52};
53
54} // namespace impeller
55
56#endif // FLUTTER_IMPELLER_PLAYGROUND_SWITCHES_H_
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
std::optional< std::chrono::milliseconds > timeout
Definition switches.h:21
bool operator==(const PlaygroundSwitches &) const =default