Flutter Linux Embedder
fl_compositor_opengl.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_LINUX_FL_COMPOSITOR_OPENGL_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_OPENGL_H_
7 
8 #include <gtk/gtk.h>
9 
10 #include "flutter/shell/platform/embedder/embedder.h"
13 
14 G_BEGIN_DECLS
15 
16 G_DECLARE_FINAL_TYPE(FlCompositorOpenGL,
17  fl_compositor_opengl,
18  FL,
19  COMPOSITOR_OPENGL,
20  FlCompositor)
21 
22 /**
23  * FlCompositorOpenGL:
24  *
25  * #FlCompositorOpenGL is class that implements compositing using OpenGL.
26  */
27 
28 /**
29  * fl_compositor_opengl_new:
30  * @engine: an #FlEngine.
31  * @context: the OpenGL context that is being rendered into.
32  *
33  * Creates a new OpenGL compositor.
34  *
35  * Returns: a new #FlCompositorOpenGL.
36  */
37 FlCompositorOpenGL* fl_compositor_opengl_new(FlEngine* engine,
38  GdkGLContext* context);
39 
40 /**
41  * fl_compositor_opengl_render:
42  * @compositor: an #FlCompositorOpenGL.
43  * @width: width of the window in pixels.
44  * @height: height of the window in pixels.
45  *
46  * Performs OpenGL commands to render current Flutter view.
47  */
48 void fl_compositor_opengl_render(FlCompositorOpenGL* compositor,
49  int width,
50  int height);
51 
52 /**
53  * fl_compositor_opengl_cleanup:
54  * @compositor: an #FlCompositorOpenGL.
55  *
56  * Removes OpenGL resources used for rendering. Requires an active
57  * context.
58  */
59 void fl_compositor_opengl_cleanup(FlCompositorOpenGL* compositor);
60 
61 G_END_DECLS
62 
63 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_OPENGL_H_
FlCompositorOpenGL * fl_compositor_opengl_new(FlEngine *engine, GdkGLContext *context)
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlCompositorOpenGL, fl_compositor_opengl, FL, COMPOSITOR_OPENGL, FlCompositor) FlCompositorOpenGL *fl_compositor_opengl_new(FlEngine *engine
void fl_compositor_opengl_render(FlCompositorOpenGL *compositor, int width, int height)
G_BEGIN_DECLS GdkGLContext * context
void fl_compositor_opengl_cleanup(FlCompositorOpenGL *compositor)
const uint8_t uint32_t uint32_t * height
const uint8_t uint32_t * width