Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
embedder_surface_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_EMBEDDER_EMBEDDER_SURFACE_GL_IMPELLER_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_GL_IMPELLER_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/gpu/gpu_surface_gl_impeller.h"
10#include "flutter/shell/platform/embedder/embedder_external_view_embedder.h"
11#include "flutter/shell/platform/embedder/embedder_surface.h"
12#include "flutter/shell/platform/embedder/embedder_surface_gl.h"
13
14namespace impeller {
15class ContextGLES;
16} // namespace impeller
17
18namespace flutter {
19
20class ReactorWorker;
21
24 public:
26 EmbedderSurfaceGL::GLDispatchTable gl_dispatch_table,
27 bool fbo_reset_after_present,
28 std::shared_ptr<EmbedderExternalViewEmbedder> external_view_embedder);
29
31
32 private:
33 bool valid_ = false;
34 EmbedderSurfaceGL::GLDispatchTable gl_dispatch_table_;
35 bool fbo_reset_after_present_;
36 std::shared_ptr<impeller::ContextGLES> impeller_context_;
37 std::shared_ptr<EmbedderExternalViewEmbedder> external_view_embedder_;
38 std::shared_ptr<ReactorWorker> worker_;
39
40 // |EmbedderSurface|
41 bool IsValid() const override;
42
43 // |EmbedderSurface|
44 std::unique_ptr<Surface> CreateGPUSurface() override;
45
46 // |EmbedderSurface|
47 std::shared_ptr<impeller::Context> CreateImpellerContext() const override;
48
49 // |GPUSurfaceGLDelegate|
50 std::unique_ptr<GLContextResult> GLContextMakeCurrent() override;
51
52 // |GPUSurfaceGLDelegate|
53 bool GLContextClearCurrent() override;
54
55 // |GPUSurfaceGLDelegate|
56 bool GLContextPresent(const GLPresentInfo& present_info) override;
57
58 // |GPUSurfaceGLDelegate|
59 GLFBOInfo GLContextFBO(GLFrameInfo frame_info) const override;
60
61 // |GPUSurfaceGLDelegate|
62 bool GLContextFBOResetAfterPresent() const override;
63
64 // |GPUSurfaceGLDelegate|
66
67 // |GPUSurfaceGLDelegate|
68 GLProcResolver GetGLProcResolver() const override;
69
70 // |GPUSurfaceGLDelegate|
72
73 // |EmbedderSurface|
75
77};
78
79} // namespace flutter
80
81#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_EMBEDDER_SURFACE_GL_IMPELLER_H_
std::shared_ptr< impeller::Context > CreateImpellerContext() const override
SurfaceFrame::FramebufferInfo GLContextFramebufferInfo() const override
std::unique_ptr< GLContextResult > GLContextMakeCurrent() override
bool GLContextPresent(const GLPresentInfo &present_info) override
std::unique_ptr< Surface > CreateGPUSurface() override
GLProcResolver GetGLProcResolver() const override
GLFBOInfo GLContextFBO(GLFrameInfo frame_info) const override
sk_sp< GrDirectContext > CreateResourceContext() const override
std::function< void *(const char *)> GLProcResolver
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27