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 "flutter/fml/macros.h"
15 
16 namespace impeller {
17 
18 class 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_
impeller::Surface
Definition: surface.h:18
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:100
surface.h
impeller::TSize< int64_t >
impeller::RenderTarget
Definition: render_target.h:38
gles.h
impeller::SurfaceGLES::SwapCallback
std::function< bool(void)> SwapCallback
Definition: surface_gles.h:20
impeller::SurfaceGLES
Definition: surface_gles.h:18
context.h
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
Definition: aiks_blur_unittests.cc:20