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