Flutter Engine
 
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
11
12namespace flutter {
13
15 public:
16 AndroidContextGLImpeller(std::unique_ptr<impeller::egl::Display> display,
17 bool enable_gpu_tracing);
18
20
21 // |AndroidContext|
22 bool IsValid() const override;
23
24 // |AndroidContext|
25 AndroidRenderingAPI RenderingApi() const override;
26
29 std::unique_ptr<impeller::egl::Surface> CreateOffscreenSurface();
32 std::unique_ptr<impeller::egl::Surface> CreateOnscreenSurface(
33 EGLNativeWindowType window);
34
35 private:
36 class ReactorWorker;
37
38 std::shared_ptr<ReactorWorker> reactor_worker_;
39 std::unique_ptr<impeller::egl::Display> display_;
40 std::unique_ptr<impeller::egl::Config> onscreen_config_;
41 std::unique_ptr<impeller::egl::Config> offscreen_config_;
42 std::unique_ptr<impeller::egl::Context> onscreen_context_;
43 std::unique_ptr<impeller::egl::Context> offscreen_context_;
44 bool is_valid_ = false;
45
47};
48
49} // namespace flutter
50
51#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_