Flutter Engine
ios_render_target_gl.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_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_
7 
8 #import <OpenGLES/EAGL.h>
9 #import <OpenGLES/ES2/gl.h>
10 #import <OpenGLES/ES2/glext.h>
11 #import <QuartzCore/CAEAGLLayer.h>
12 
13 #include "flutter/fml/macros.h"
14 #include "flutter/fml/platform/darwin/scoped_nsobject.h"
15 #include "flutter/shell/common/platform_view.h"
16 #import "flutter/shell/platform/darwin/ios/ios_switchable_gl_context.h"
17 
18 namespace flutter {
19 
21  public:
24 
26 
27  bool IsValid() const;
28 
29  bool PresentRenderBuffer() const;
30 
31  intptr_t GetFramebuffer() const;
32 
34 
35  private:
38  GLuint framebuffer_ = GL_NONE;
39  GLuint colorbuffer_ = GL_NONE;
40  GLint storage_size_width_ = GL_NONE;
41  GLint storage_size_height_ = GL_NONE;
42  bool valid_ = false;
43 
44  FML_DISALLOW_COPY_AND_ASSIGN(IOSRenderTargetGL);
45 };
46 
47 } // namespace flutter
48 
49 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_RENDER_TARGET_GL_H_
IOSRenderTargetGL(fml::scoped_nsobject< CAEAGLLayer > layer, fml::scoped_nsobject< EAGLContext > context_)