Flutter Engine
 
Loading...
Searching...
No Matches
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 kTwentyFour = 24,
39};
40
41enum class SurfaceType {
42 kWindow,
44};
45
54
55class Display;
56
57//------------------------------------------------------------------------------
58/// @brief An EGL config. These are returned by the display to indicate
59/// support for a specific config descriptor.
60///
61/// There is no ability to construct these manually except for
62/// testing.
63///
64class Config {
65 public:
67
68 bool IsValid() const;
69
70 const ConfigDescriptor& GetDescriptor() const;
71
72 const EGLConfig& GetHandle() const;
73
74 // Do not use. Only for testing.
75 Config(ConfigDescriptor descriptor, EGLConfig config);
76
77 private:
78 const ConfigDescriptor desc_;
79 EGLConfig config_ = nullptr;
80
81 Config(const Config&) = delete;
82
83 Config& operator=(const Config&) = delete;
84};
85
86} // namespace egl
87} // namespace impeller
88
89#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:64
bool IsValid() const
Definition config.cc:25
const EGLConfig & GetHandle() const
Definition config.cc:21
const ConfigDescriptor & GetDescriptor() const
Definition config.cc:17
A connection to an EGL display. Only one connection per application instance is sufficient.
Definition display.h:28