Flutter Linux Embedder
fl_backing_store_provider.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_BACKING_STORE_PROVIDER_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_BACKING_STORE_PROVIDER_H_
7 
8 #include <gtk/gtk.h>
9 
10 #include <cstdint>
11 
12 G_BEGIN_DECLS
13 
14 G_DECLARE_FINAL_TYPE(FlBackingStoreProvider,
15  fl_backing_store_provider,
16  FL,
17  BACKING_STORE_PROVIDER,
18  GObject)
19 
20 /**
21  * FlBackingStoreProvider:
22  *
23  * #FlBackingStoreProvider creates framebuffers and their backing textures
24  * for embedder compositor.
25  */
26 
27 /**
28  * fl_backing_store_provider_new:
29  * @width: width of texture.
30  * @height: height of texture.
31  *
32  * Creates a new frame buffer. fl_renderer_make_current() must be called
33  * first.
34  *
35  * Returns: a new #FlBackingStoreProvider.
36  */
37 FlBackingStoreProvider* fl_backing_store_provider_new(int width, int height);
38 
39 /**
40  * fl_backing_store_provider_get_gl_framebuffer_id:
41  * @provider: an #FlBackingStoreProvider.
42  *
43  * Gets created framebuffer id.
44  *
45  * Returns: gl framebuffer id, 0 if creation failed.
46  */
48  FlBackingStoreProvider* provider);
49 
50 /**
51  * fl_backing_store_provider_get_gl_texture_id:
52  * @provider: an #FlBackingStoreProvider.
53  *
54  * Gets created texture id.
55  *
56  * Returns: gl texture id, 0 if creation failed.
57  */
59  FlBackingStoreProvider* provider);
60 
61 /**
62  * fl_backing_store_provider_get_gl_target:
63  * @provider: an #FlBackingStoreProvider.
64  *
65  * Gets target texture (example GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE).
66  *
67  * Returns: target texture.
68  */
70  FlBackingStoreProvider* provider);
71 
72 /**
73  * fl_backing_store_provider_get_gl_format:
74  * @provider: an #FlBackingStoreProvider.
75  *
76  * Gets texture format (example GL_RGBA8).
77  *
78  * Returns: texture format.
79  */
81  FlBackingStoreProvider* provider);
82 
83 /**
84  * fl_backing_store_provider_get_geometry:
85  * @provider: an #FlBackingStoreProvider.
86  *
87  * Gets geometry of framebuffer.
88  *
89  * Returns: geometry of backing store.
90  */
92  FlBackingStoreProvider* provider);
93 
94 G_END_DECLS
95 
96 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BACKING_STORE_PROVIDER_H_
fl_backing_store_provider_get_gl_framebuffer_id
uint32_t fl_backing_store_provider_get_gl_framebuffer_id(FlBackingStoreProvider *provider)
Definition: fl_backing_store_provider.cc:66
fl_backing_store_provider_get_gl_target
uint32_t fl_backing_store_provider_get_gl_target(FlBackingStoreProvider *provider)
Definition: fl_backing_store_provider.cc:76
fl_backing_store_provider_new
FlBackingStoreProvider * fl_backing_store_provider_new(int width, int height)
Definition: fl_backing_store_provider.cc:35
height
G_BEGIN_DECLS int height
Definition: fl_backing_store_provider.h:37
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlBackingStoreProvider, fl_backing_store_provider, FL, BACKING_STORE_PROVIDER, GObject) FlBackingStoreProvider *fl_backing_store_provider_new(int width
fl_backing_store_provider_get_geometry
GdkRectangle fl_backing_store_provider_get_geometry(FlBackingStoreProvider *provider)
Definition: fl_backing_store_provider.cc:105
fl_backing_store_provider_get_gl_format
uint32_t fl_backing_store_provider_get_gl_format(FlBackingStoreProvider *provider)
Definition: fl_backing_store_provider.cc:80
fl_backing_store_provider_get_gl_texture_id
uint32_t fl_backing_store_provider_get_gl_texture_id(FlBackingStoreProvider *provider)
Definition: fl_backing_store_provider.cc:71
FL
FL
Definition: fl_binary_messenger.cc:27
width
const uint8_t uint32_t * width
Definition: fl_pixel_buffer_texture_test.cc:38