Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 "flutter/fml/macros.h"
15
16namespace impeller {
17
18class SurfaceGLES final : public Surface {
19 public:
20 using SwapCallback = std::function<bool(void)>;
21
22 static std::unique_ptr<Surface> WrapFBO(
23 const std::shared_ptr<Context>& context,
24 SwapCallback swap_callback,
25 GLuint fbo,
26 PixelFormat color_format,
27 ISize fbo_size);
28
29 // |Surface|
30 ~SurfaceGLES() override;
31
32 private:
33 SwapCallback swap_callback_;
34
35 SurfaceGLES(SwapCallback swap_callback, const RenderTarget& target_desc);
36
37 // |Surface|
38 bool Present() const override;
39
40 SurfaceGLES(const SurfaceGLES&) = delete;
41
42 SurfaceGLES& operator=(const SurfaceGLES&) = delete;
43};
44
45} // namespace impeller
46
47#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)
bool Present() const override
std::function< bool(void)> SwapCallback
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition formats.h:100