| Flutter Linux Embedder |

Classes | Functions
fl_compositor.h File Reference
`#include <glib-object.h>`
`#include "flutter/shell/platform/embedder/embedder.h"`

Go to the source code of this file.

## Classes
struct | _FlCompositorClass

## Functions
gboolean | fl_compositor_create_backing_store (FlCompositor *compositor, const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)
gboolean | fl_compositor_collect_backing_store (FlCompositor *compositor, const FlutterBackingStore *backing_store)
gboolean | fl_compositor_present_layers (FlCompositor *compositor, FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)
void | fl_compositor_wait_for_frame (FlCompositor *compositor, int target_width, int target_height)

## Function Documentation

## ◆ fl_compositor_collect_backing_store()

gboolean fl_compositor_collect_backing_store | ( | FlCompositor * | compositor,
|  | const FlutterBackingStore * | backing_store
| ) |  |

fl_compositor_collect_backing_store: @compositor: an #FlCompositor. @backing_store: backing store to be released.

A callback invoked by the engine to release the backing store. The embedder may collect any resources associated with the backing store.

Returns TRUE if successful.

Definition at line 24 of file fl_compositor.cc.

26 {
27 g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
28 return FL_COMPOSITOR_GET_CLASS(self)->collect_backing_store(self,
29 backing_store);
30 }

Referenced by compositor_collect_backing_store_callback().

## ◆ fl_compositor_create_backing_store()

gboolean fl_compositor_create_backing_store | ( | FlCompositor * | compositor,
|  | const FlutterBackingStoreConfig * | config,
|  | FlutterBackingStore * | backing_store_out
| ) |  |

FlCompositor:

#FlCompositor is an abstract class that implements Flutter compositing. fl_compositor_create_backing_store: @compositor: an #FlCompositor. @config: backing store config. @backing_store_out: saves created backing store.

Obtain a backing store for a specific #FlutterLayer.

Returns TRUE if successful.

Definition at line 15 of file fl_compositor.cc.

18 {
19 g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
20 return FL_COMPOSITOR_GET_CLASS(self)->create_backing_store(self, config,
21 backing_store_out);
22 }

Referenced by compositor_create_backing_store_callback(), and TEST().

## ◆ fl_compositor_present_layers()

gboolean fl_compositor_present_layers | ( | FlCompositor * | compositor,
|  | FlutterViewId | view_id,
|  | const FlutterLayer ** | layers,
|  | size_t | layers_count
| ) |  |

fl_compositor_present_layers: @compositor: an #FlCompositor. @view_id: view to present. @layers: layers to be composited. @layers_count: number of layers.

Callback invoked by the engine to composite the contents of each layer onto the screen.

Returns TRUE if successful.

Definition at line 40 of file fl_compositor.cc.

43 {
44 g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
45 return FL_COMPOSITOR_GET_CLASS(self)->present_layers(self, view_id, layers,
46 layers_count);
47 }
view_id
G_BEGIN_DECLS FlutterViewId view_id
Definition: fl_view_accessible.h:49

References view_id.

Referenced by compositor_present_view_callback(), and TEST().

## ◆ fl_compositor_wait_for_frame()

void fl_compositor_wait_for_frame | ( | FlCompositor * | compositor,
|  | int | target_width,
|  | int | target_height
| ) |  |

fl_compositor_wait_for_frame: @compositor: an #FlCompositor. @target_width: width of frame being waited for @target_height: height of frame being waited for

Holds the thread until frame with requested dimensions is presented. While waiting for frame Flutter platform and raster tasks are being processed.

Definition at line 32 of file fl_compositor.cc.

34 {
35 g_return_if_fail(FL_IS_COMPOSITOR(self));
36 FL_COMPOSITOR_GET_CLASS(self)->wait_for_frame(self, target_width,
37 target_height);
38 }

Referenced by handle_geometry_changed(), and TEST().