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 an abstract class that allows Flutter to draw pixels.
26
*/
27
28
/**
29
* fl_compositor_opengl_new:
30
* @engine: an #FlEngine.
31
*
32
* Creates a new OpenGL compositor.
33
*
34
* Returns: a new #FlCompositorOpenGL.
35
*/
36
FlCompositorOpenGL*
fl_compositor_opengl_new
(FlEngine* engine);
37
38
/**
39
* fl_compositor_opengl_setup:
40
* @compositor: an #FlCompositorOpenGL.
41
*
42
* Creates OpenGL resources required before rendering. Requires an active
43
* context.
44
*/
45
void
fl_compositor_opengl_setup
(FlCompositorOpenGL* compositor);
46
47
/**
48
* fl_compositor_opengl_render:
49
* @compositor: an #FlCompositorOpenGL.
50
* @view_id: view to render.
51
* @width: width of the window in pixels.
52
* @height: height of the window in pixels.
53
* @background_color: color to use for background.
54
*
55
* Performs OpenGL commands to render current Flutter view.
56
*/
57
void
fl_compositor_opengl_render
(FlCompositorOpenGL* compositor,
58
FlutterViewId
view_id
,
59
int
width
,
60
int
height
,
61
const
GdkRGBA* background_color);
62
63
/**
64
* fl_compositor_opengl_cleanup:
65
* @compositor: an #FlCompositorOpenGL.
66
*
67
* Removes OpenGL resources used for rendering. Requires an active
68
* context.
69
*/
70
void
fl_compositor_opengl_cleanup
(FlCompositorOpenGL* compositor);
71
72
G_END_DECLS
73
74
#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)
Definition:
fl_compositor_opengl.cc:571
fl_compositor_opengl_setup
void fl_compositor_opengl_setup(FlCompositorOpenGL *compositor)
Definition:
fl_compositor_opengl.cc:582
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, FlutterViewId view_id, int width, int height, const GdkRGBA *background_color)
Definition:
fl_compositor_opengl.cc:597
fl_compositor_opengl_cleanup
void fl_compositor_opengl_cleanup(FlCompositorOpenGL *compositor)
Definition:
fl_compositor_opengl.cc:617
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
view_id
G_BEGIN_DECLS FlutterViewId view_id
Definition:
fl_view_accessible.h:49
shell
platform
linux
fl_compositor_opengl.h
Generated by
1.9.1