Flutter Engine
 
Loading...
Searching...
No Matches
fl_compositor.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_H_
6#define FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_H_
7
8#include <cairo.h>
9#include <gdk/gdk.h>
10
12
13G_BEGIN_DECLS
14
15G_DECLARE_DERIVABLE_TYPE(FlCompositor, fl_compositor, FL, COMPOSITOR, GObject)
16
18 GObjectClass parent_class;
19
20 gboolean (*present_layers)(FlCompositor* compositor,
21 const FlutterLayer** layers,
22 size_t layers_count);
23
24 gboolean (*render)(FlCompositor* compositor, cairo_t* cr, GdkWindow* window);
25};
26
27/**
28 * FlCompositor:
29 *
30 * #FlCompositor is an abstract class that implements Flutter compositing.
31 */
32
33/**
34 * fl_compositor_present_layers:
35 * @compositor: an #FlCompositor.
36 * @layers: layers to be composited.
37 * @layers_count: number of layers.
38 *
39 * Composite layers. Called from the Flutter rendering thread.
40 *
41 * Returns %TRUE if successful.
42 */
43gboolean fl_compositor_present_layers(FlCompositor* compositor,
44 const FlutterLayer** layers,
45 size_t layers_count);
46
47/**
48 * fl_compositor_render:
49 * @compositor: an #FlCompositor.
50 * @cr: a Cairo rendering context.
51 * @window: window being rendered into.
52 *
53 * Renders the current frame. Called from the GTK thread.
54 *
55 * Returns %TRUE if successful.
56 */
57gboolean fl_compositor_render(FlCompositor* compositor,
58 cairo_t* cr,
59 GdkWindow* window);
60
61G_END_DECLS
62
63#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_H_
GLFWwindow * window
Definition main.cc:60
G_BEGIN_DECLS G_DECLARE_DERIVABLE_TYPE(FlAccessibleNode, fl_accessible_node, FL, ACCESSIBLE_NODE, AtkObject)
gboolean fl_compositor_render(FlCompositor *compositor, cairo_t *cr, GdkWindow *window)
gboolean fl_compositor_present_layers(FlCompositor *compositor, const FlutterLayer **layers, size_t layers_count)
const FlutterLayer size_t layers_count
const FlutterLayer ** layers
GObjectClass parent_class