Flutter Engine
The Flutter Engine
config.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_TOOLKIT_EGL_CONFIG_H_
6#define FLUTTER_IMPELLER_TOOLKIT_EGL_CONFIG_H_
7
9
10namespace impeller {
11namespace egl {
12
13enum class API {
14 kOpenGL,
17};
18
19enum class Samples {
20 kOne = 1,
21 kTwo = 2,
22 kFour = 4,
23};
24
25enum class ColorFormat {
27 kRGB565,
28};
29
30enum class StencilBits {
31 kZero = 0,
32 kEight = 8,
33};
34
35enum class DepthBits {
36 kZero = 0,
37 kEight = 8,
38};
39
40enum class SurfaceType {
41 kWindow,
43};
44
52};
53
54class Display;
55
56//------------------------------------------------------------------------------
57/// @brief An EGL config. These are returned by the display to indicate
58/// support for a specific config descriptor.
59///
60/// There is no ability to construct these manually except for
61/// testing.
62///
63class Config {
64 public:
66
67 bool IsValid() const;
68
69 const ConfigDescriptor& GetDescriptor() const;
70
71 const EGLConfig& GetHandle() const;
72
73 // Do not use. Only for testing.
74 Config(ConfigDescriptor descriptor, EGLConfig config);
75
76 private:
77 const ConfigDescriptor desc_;
78 EGLConfig config_ = nullptr;
79
80 Config(const Config&) = delete;
81
82 Config& operator=(const Config&) = delete;
83};
84
85} // namespace egl
86} // namespace impeller
87
88#endif // FLUTTER_IMPELLER_TOOLKIT_EGL_CONFIG_H_
An EGL config. These are returned by the display to indicate support for a specific config descriptor...
Definition: config.h:63
const ConfigDescriptor & GetDescriptor() const
Definition: config.cc:17
bool IsValid() const
Definition: config.cc:25
Config(ConfigDescriptor descriptor, EGLConfig config)
Definition: config.cc:12
const EGLConfig & GetHandle() const
Definition: config.cc:21
A connection to an EGL display. Only one connection per application instance is sufficient.
Definition: display.h:28
@ kOpenGL
Definition: embedder.h:80