Flutter Engine
 
Loading...
Searching...
No Matches
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
15
16G_BEGIN_DECLS
17
18G_DECLARE_FINAL_TYPE(FlCompositorOpenGL,
19 fl_compositor_opengl,
20 FL,
21 COMPOSITOR_OPENGL,
22 FlCompositor)
23
24/**
25 * FlCompositorOpenGL:
26 *
27 * #FlCompositorOpenGL is class that implements compositing using OpenGL.
28 */
29
30/**
31 * fl_compositor_opengl_new:
32 * @task_runner: an #FlTaskRunnner.
33 * @opengl_manager: an #FlOpenGLManager
34 * @shareable: %TRUE if the can use a framebuffer that is shared between
35 * contexts.
36 *
37 * Creates a new OpenGL compositor.
38 *
39 * Returns: a new #FlCompositorOpenGL.
40 */
41FlCompositorOpenGL* fl_compositor_opengl_new(FlTaskRunner* task_runner,
42 FlOpenGLManager* opengl_manager,
43 gboolean shareable);
44
45/**
46 * fl_compositor_opengl_render:
47 * @compositor: an #FlCompositorOpenGL.
48 * @width: output width in pixels.
49 * @height: output height in pixels.
50 *
51 * Renders the current frame.
52 */
53void fl_compositor_opengl_render(FlCompositorOpenGL* compositor,
54 size_t width,
55 size_t height);
56
57G_END_DECLS
58
59#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_OPENGL_H_
FlCompositorOpenGL * fl_compositor_opengl_new(FlTaskRunner *task_runner, FlOpenGLManager *opengl_manager, gboolean shareable)
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlCompositorOpenGL, fl_compositor_opengl, FL, COMPOSITOR_OPENGL, FlCompositor) FlCompositorOpenGL *fl_compositor_opengl_new(FlTaskRunner *task_runner
void fl_compositor_opengl_render(FlCompositorOpenGL *compositor, size_t width, size_t height)
G_BEGIN_DECLS FlOpenGLManager gboolean shareable
G_BEGIN_DECLS FlOpenGLManager * opengl_manager
int32_t height
int32_t width