| Flutter Linux Embedder |

fl_framebuffer.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_FRAMEBUFFER_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_FRAMEBUFFER_H_
7
8 #include <epoxy/gl.h>
9 #include <glib-object.h>
10
11 G_BEGIN_DECLS
12
13 G_DECLARE_FINAL_TYPE(FlFramebuffer, fl_framebuffer, FL, FRAMEBUFFER, GObject)
14
15 /**
16 * FlFramebuffer:
17 *
18 * #FlFramebuffer creates framebuffers and their backing textures
19 * for use by the Flutter compositor.
20 */
21
22 /**
23 * fl_framebuffer_new:
24 * @format: format, e.g. GL_RGB, GL_BGR
25 * @width: width of texture.
26 * @height: height of texture.
27 *
28 * Creates a new frame buffer. Requires a valid OpenGL context to create.
29 *
30 * Returns: a new #FlFramebuffer.
31 */
32 FlFramebuffer* fl_framebuffer_new(GLint format, size_t width, size_t height);
33
34 /**
35 * fl_framebuffer_get_id:
36 * @framebuffer: an #FlFramebuffer.
37 *
38 * Gets the ID for this framebuffer.
39 *
40 * Returns: OpenGL framebuffer id or 0 if creation failed.
41 */
42 GLuint fl_framebuffer_get_id(FlFramebuffer* framebuffer);
43
44 /**
45 * fl_framebuffer_get_texture_id:
46 * @framebuffer: an #FlFramebuffer.
47 *
48 * Gets the ID of the texture associated with this framebuffer.
49 *
50 * Returns: OpenGL texture id or 0 if creation failed.
51 */
52 GLuint fl_framebuffer_get_texture_id(FlFramebuffer* framebuffer);
53
54 /**
55 * fl_framebuffer_get_target:
56 * @framebuffer: an #FlFramebuffer.
57 *
58 * Gets target texture (example GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE).
59 *
60 * Returns: target texture.
61 */
62 GLenum fl_framebuffer_get_target(FlFramebuffer* framebuffer);
63
64 /**
65 * fl_framebuffer_get_width:
66 * @framebuffer: an #FlFramebuffer.
67 *
68 * Gets the width of the framebuffer in pixels.
69 *
70 * Returns: width in pixels.
71 */
72 size_t fl_framebuffer_get_width(FlFramebuffer* framebuffer);
73
74 /**
75 * fl_framebuffer_get_height:
76 * @framebuffer: an #FlFramebuffer.
77 *
78 * Gets the height of the framebuffer in pixels.
79 *
80 * Returns: height in pixels.
81 */
82 size_t fl_framebuffer_get_height(FlFramebuffer* framebuffer);
83
84 G_END_DECLS
85
86 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_FRAMEBUFFER_H_
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlAccessibleTextField, fl_accessible_text_field, FL, ACCESSIBLE_TEXT_FIELD, FlAccessibleNode)
FL
FL
Definition: fl_binary_messenger.cc:27
fl_framebuffer_get_height
size_t fl_framebuffer_get_height(FlFramebuffer *framebuffer)
Definition: fl_framebuffer.cc:98
fl_framebuffer_get_width
size_t fl_framebuffer_get_width(FlFramebuffer *framebuffer)
Definition: fl_framebuffer.cc:94
fl_framebuffer_get_texture_id
GLuint fl_framebuffer_get_texture_id(FlFramebuffer *framebuffer)
Definition: fl_framebuffer.cc:86
fl_framebuffer_new
G_BEGIN_DECLS FlFramebuffer * fl_framebuffer_new(GLint format, size_t width, size_t height)
Definition: fl_framebuffer.cc:42
fl_framebuffer_get_target
GLenum fl_framebuffer_get_target(FlFramebuffer *framebuffer)
Definition: fl_framebuffer.cc:90
fl_framebuffer_get_id
GLuint fl_framebuffer_get_id(FlFramebuffer *framebuffer)
Definition: fl_framebuffer.cc:82
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
format
uint32_t uint32_t * format
Definition: fl_texture_registrar_test.cc:42