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 #pragma once
6 
7 #include <functional>
8 #include <memory>
9 
10 #include "flutter/fml/macros.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  FML_DISALLOW_COPY_AND_ASSIGN(SurfaceGLES);
40 };
41 
42 } // namespace impeller
impeller::Surface
Definition: surface.h:17
surface.h
impeller::TSize< int64_t >
impeller::RenderTarget
Definition: render_target.h:48
gles.h
impeller::SurfaceGLES::SwapCallback
std::function< bool(void)> SwapCallback
Definition: surface_gles.h:19
impeller::SurfaceGLES
Definition: surface_gles.h:17
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::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:94
impeller::SurfaceGLES::~SurfaceGLES
~SurfaceGLES() override
impeller
Definition: aiks_context.cc:10