| 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
FlutterRendererType | fl_compositor_get_renderer_type (FlCompositor *compositor)
gboolean | fl_compositor_present_layers (FlCompositor *compositor, 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_get_renderer_type()

FlutterRendererType fl_compositor_get_renderer_type | ( | FlCompositor * | compositor | ) |

FlCompositor:

#FlCompositor is an abstract class that implements Flutter compositing. fl_compositor_get_renderer_type: @compositor: an #FlCompositor.

Gets the rendering method this compositor uses.

Returns: a FlutterRendererType.

Definition at line 15 of file fl_compositor.cc.

15 {
16 g_return_val_if_fail(FL_IS_COMPOSITOR(self),
17 static_cast<FlutterRendererType>(0));
18 return FL_COMPOSITOR_GET_CLASS(self)->get_renderer_type(self);
19 }

## ◆ fl_compositor_present_layers()

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

fl_compositor_present_layers: @compositor: an #FlCompositor. @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 29 of file fl_compositor.cc.

31 {
32 g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
33 return FL_COMPOSITOR_GET_CLASS(self)->present_layers(self, layers,
34 layers_count);
35 }

Referenced by fl_view_present_layers(), 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 21 of file fl_compositor.cc.

23 {
24 g_return_if_fail(FL_IS_COMPOSITOR(self));
25 FL_COMPOSITOR_GET_CLASS(self)->wait_for_frame(self, target_width,
26 target_height);
27 }

Referenced by handle_geometry_changed(), and TEST().