| 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"
11 #include "flutter/shell/platform/linux/fl_compositor.h"
12 #include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.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_
FL
FL
Definition: fl_binary_messenger.cc:27
fl_compositor.h
fl_compositor_opengl_new
FlCompositorOpenGL * fl_compositor_opengl_new(FlEngine *engine, GdkGLContext *context)
Definition: fl_compositor_opengl.cc:520
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlCompositorOpenGL, fl_compositor_opengl, FL, COMPOSITOR_OPENGL, FlCompositor) FlCompositorOpenGL *fl_compositor_opengl_new(FlEngine *engine
fl_compositor_opengl_render
void fl_compositor_opengl_render(FlCompositorOpenGL *compositor, int width, int height)
Definition: fl_compositor_opengl.cc:545
context
G_BEGIN_DECLS GdkGLContext * context
Definition: fl_compositor_opengl.h:38
fl_compositor_opengl_cleanup
void fl_compositor_opengl_cleanup(FlCompositorOpenGL *compositor)
Definition: fl_compositor_opengl.cc:558
fl_engine.h
height
const uint8_t uint32_t uint32_t * height
Definition: fl_pixel_buffer_texture_test.cc:39
width
const uint8_t uint32_t * width
Definition: fl_pixel_buffer_texture_test.cc:38