| Flutter Impeller |

display.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_DISPLAY_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_EGL_DISPLAY_H_
7
8 #include <memory>
9 #include <optional>
10
11 #include "flutter/fml/macros.h"
12 #include "impeller/toolkit/egl/config.h"
13 #include "impeller/toolkit/egl/egl.h"
14
15 namespace impeller {
16 namespace egl {
17
18 class Context;
19 class Surface;
20
21 class Display {
22 public:
23 Display();
24
25 virtual ~Display();
26
27 virtual bool IsValid() const;
28
29 virtual std::unique_ptr<Config> ChooseConfig(ConfigDescriptor config) const;
30
31 virtual std::unique_ptr<Context> CreateContext(const Config& config,
32 const Context* share_context);
33
34 virtual std::unique_ptr<Surface> CreateWindowSurface(
35 const Config& config,
36 EGLNativeWindowType window);
37
38 virtual std::unique_ptr<Surface>
39 CreatePixelBufferSurface(const Config& config, size_t width, size_t height);
40
41 private:
42 EGLDisplay display_ = EGL_NO_DISPLAY;
43
44 Display(const Display&) = delete;
45
46 Display& operator=(const Display&) = delete;
47 };
48
49 } // namespace egl
50 } // namespace impeller
51
52 #endif // FLUTTER_IMPELLER_TOOLKIT_EGL_DISPLAY_H_
impeller::egl::Display::CreateWindowSurface
virtual std::unique_ptr< Surface > CreateWindowSurface(const Config &config, EGLNativeWindowType window)
Definition: display.cc:172
egl.h
impeller::egl::Context
Definition: context.h:20
impeller::egl::Display::ChooseConfig
virtual std::unique_ptr< Config > ChooseConfig(ConfigDescriptor config) const
Definition: display.cc:72
impeller::egl::Display
Definition: display.h:21
impeller::egl::Display::CreateContext
virtual std::unique_ptr< Context > CreateContext(const Config &config, const Context *share_context)
Definition: display.cc:37
impeller::egl::Display::CreatePixelBufferSurface
virtual std::unique_ptr< Surface > CreatePixelBufferSurface(const Config &config, size_t width, size_t height)
Definition: display.cc:188
impeller::egl::ConfigDescriptor
Definition: config.h:46
impeller::egl::Display::IsValid
virtual bool IsValid() const
Definition: display.cc:33
impeller::egl::Config
Definition: config.h:55
impeller::egl::Display::Display
Display()
Definition: display.cc:15
impeller::egl::Display::~Display
virtual ~Display()
Definition: display.cc:25
impeller
Definition: aiks_blur_unittests.cc:20
config.h