Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
android_context_gl_impeller.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_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_GL_IMPELLER_H_
6#define FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_GL_IMPELLER_H_
7
12
13namespace flutter {
14
16 public:
18 std::unique_ptr<impeller::egl::Display> display,
19 bool enable_gpu_tracing,
20 std::shared_ptr<fml::BasicTaskRunner> io_task_runner);
21
23
24 // |AndroidContext|
25 bool IsValid() const override;
26
27 // |AndroidContext|
28 AndroidRenderingAPI RenderingApi() const override;
29
32 std::unique_ptr<impeller::egl::Surface> CreateOffscreenSurface();
35 std::unique_ptr<impeller::egl::Surface> CreateOnscreenSurface(
36 EGLNativeWindowType window);
37
38 private:
39 class ReactorWorker;
40
41 std::shared_ptr<ReactorWorker> reactor_worker_;
42 std::unique_ptr<impeller::egl::Display> display_;
43 std::unique_ptr<impeller::egl::Config> onscreen_config_;
44 std::unique_ptr<impeller::egl::Config> offscreen_config_;
45 std::unique_ptr<impeller::egl::Context> onscreen_context_;
46 std::unique_ptr<impeller::egl::Context> offscreen_context_;
47 bool is_valid_ = false;
48 std::shared_ptr<fml::BasicTaskRunner> io_task_runner_;
49
51};
52
53} // namespace flutter
54
55#endif // FLUTTER_SHELL_PLATFORM_ANDROID_ANDROID_CONTEXT_GL_IMPELLER_H_
std::unique_ptr< impeller::egl::Surface > CreateOnscreenSurface(EGLNativeWindowType window)
bool OnscreenContextMakeCurrent(impeller::egl::Surface *onscreen_surface)
AndroidRenderingAPI RenderingApi() const override
bool ResourceContextMakeCurrent(impeller::egl::Surface *offscreen_surface)
std::unique_ptr< impeller::egl::Surface > CreateOffscreenSurface()
Holds state that is shared across Android surfaces.
An instance of an EGL surface. There is no ability to create surfaces directly. Instead,...
Definition surface.h:18
GLFWwindow * window
Definition main.cc:60
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
EGLDisplay display_