Flutter Engine
The Flutter Engine
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
14
15namespace impeller {
16
17class 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_
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
std::function< bool(void)> SwapCallback
Definition: surface_gles.h:19
Dart_NativeFunction function
Definition: fuchsia.cc:51
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99