Flutter Linux Embedder
fl_compositor_software.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_SOFTWARE_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_SOFTWARE_H_
7 
8 #include <cairo/cairo.h>
9 #include <glib-object.h>
10 
11 #include "flutter/shell/platform/embedder/embedder.h"
12 
13 G_BEGIN_DECLS
14 
15 G_DECLARE_FINAL_TYPE(FlCompositorSoftware,
16  fl_compositor_software,
17  FL,
18  COMPOSITOR_SOFTWARE,
19  GObject)
20 
21 /**
22  * FlCompositorSoftware:
23  *
24  * #FlCompositorSoftware is a class that implements compositing using software
25  * rendering.
26  *
27  * Layers are composited into a caller-provided Cairo context. The caller is
28  * responsible for managing the surface being drawn into.
29  */
30 
31 /**
32  * fl_compositor_software_new:
33  *
34  * Creates a new software rendering compositor.
35  *
36  * Returns: a new #FlCompositorSoftware.
37  */
38 FlCompositorSoftware* fl_compositor_software_new();
39 
40 /**
41  * fl_compositor_software_composite_layers:
42  * @compositor: an #FlCompositorSoftware.
43  * @cr: a Cairo rendering context to draw the layers into.
44  * @layers: layers to be composited. Each layer must be a backing store layer
45  * (%kFlutterLayerContentTypeBackingStore) backed by a software backing store
46  * (%kFlutterBackingStoreTypeSoftware).
47  * @layers_count: number of layers.
48  *
49  * Combines and draws the provided layers into @cr. The caller is responsible
50  * for managing the surface that @cr writes into.
51  *
52  * Returns %TRUE if successful.
53  */
55  FlCompositorSoftware* compositor,
56  cairo_t* cr,
57  const FlutterLayer** layers,
58  size_t layers_count);
59 
60 G_END_DECLS
61 
62 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_COMPOSITOR_SOFTWARE_H_
FlCompositorSoftware * fl_compositor_software_new()
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlCompositorSoftware, fl_compositor_software, FL, COMPOSITOR_SOFTWARE, GObject) FlCompositorSoftware *fl_compositor_software_new()
gboolean fl_compositor_software_composite_layers(FlCompositorSoftware *compositor, cairo_t *cr, const FlutterLayer **layers, size_t layers_count)
const FlutterLayer size_t layers_count
const FlutterLayer ** layers