Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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"
14
15namespace impeller {
16namespace egl {
17
18class Context;
19class Surface;
20
21class 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_
virtual std::unique_ptr< Surface > CreatePixelBufferSurface(const Config &config, size_t width, size_t height)
Definition display.cc:188
virtual std::unique_ptr< Context > CreateContext(const Config &config, const Context *share_context)
Definition display.cc:37
virtual bool IsValid() const
Definition display.cc:33
virtual std::unique_ptr< Config > ChooseConfig(ConfigDescriptor config) const
Definition display.cc:72
virtual std::unique_ptr< Surface > CreateWindowSurface(const Config &config, EGLNativeWindowType window)
Definition display.cc:172
GLFWwindow * window
Definition main.cc:45
int32_t height
int32_t width