| Flutter Impeller |

surface_gles.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_RENDERER_BACKEND_GLES_SURFACE_GLES_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_SURFACE_GLES_H_
7
8 #include <functional>
9 #include <memory>
10
11 #include "impeller/renderer/backend/gles/gles.h"
12 #include "impeller/renderer/context.h"
13 #include "impeller/renderer/surface.h"
14
15 namespace impeller {
16
17 class SurfaceGLES final : public Surface {
18 public:
19 using SwapCallback = std::function<bool(void)>;
20
21 static std::unique_ptr<Surface> WrapFBO(
22 const std::shared_ptr<Context>& context,
23 SwapCallback swap_callback,
24 GLuint fbo,
25 PixelFormat color_format,
26 ISize fbo_size);
27
28 // |Surface|
29 ~SurfaceGLES() override;
30
31 private:
32 SwapCallback swap_callback_;
33
34 SurfaceGLES(SwapCallback swap_callback, const RenderTarget& target_desc);
35
36 // |Surface|
37 bool Present() const override;
38
39 SurfaceGLES(const SurfaceGLES&) = delete;
40
41 SurfaceGLES& operator=(const SurfaceGLES&) = delete;
42 };
43
44 } // namespace impeller
45
46 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_SURFACE_GLES_H_
impeller::RenderTarget
Definition: render_target.h:38
impeller::SurfaceGLES
Definition: surface_gles.h:17
impeller::SurfaceGLES::WrapFBO
static std::unique_ptr< Surface > WrapFBO(const std::shared_ptr< Context > &context, SwapCallback swap_callback, GLuint fbo, PixelFormat color_format, ISize fbo_size)
Definition: surface_gles.cc:14
impeller::SurfaceGLES::~SurfaceGLES
~SurfaceGLES() override
impeller::SurfaceGLES::SwapCallback
std::function< bool(void)> SwapCallback
Definition: surface_gles.h:19
impeller::Surface
Definition: surface.h:12
impeller
Definition: allocation.cc:12
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99
gles.h
context.h
surface.h
impeller::TSize
Definition: size.h:25