| Flutter Linux Embedder |

Functions
fl_compositor_software_test.cc File Reference
`#include "gtest/gtest.h"`
`#include "flutter/common/constants.h"`
`#include "flutter/shell/platform/linux/fl_compositor_software.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_dart_project.h"`
`#include "flutter/shell/platform/linux/testing/mock_renderable.h"`

Go to the source code of this file.

## Functions
| TEST (FlCompositorSoftwareTest, Render)

## Function Documentation

## ◆ TEST()

TEST | ( | FlCompositorSoftwareTest | ,
|  | Render |
| ) |  |

Definition at line 12 of file fl_compositor_software_test.cc.

12 {
13 g_autoptr(FlDartProject) project = fl_dart_project_new();
14
15 g_autoptr(FlCompositorSoftware) compositor = fl_compositor_software_new();
16
17 unsigned char image_data[1024 * 1024 * 4];
18 cairo_surface_t* surface = cairo_image_surface_create_for_data(
19 image_data, CAIRO_FORMAT_ARGB32, 1024, 1024, 1024 * 4);
20 cairo_t* cr = cairo_create(surface);
21 fl_compositor_present_layers(FL_COMPOSITOR(compositor), nullptr, 0);
22 fl_compositor_software_render(compositor, cr, 1);
23 cairo_surface_destroy(surface);
24 }
fl_compositor_present_layers
gboolean fl_compositor_present_layers(FlCompositor *self, const FlutterLayer **layers, size_t layers_count)
Definition: fl_compositor.cc:29
fl_compositor_software_render
gboolean fl_compositor_software_render(FlCompositorSoftware *self, cairo_t *cr, gint scale_factor)
Definition: fl_compositor_software.cc:93
fl_compositor_software_new
FlCompositorSoftware * fl_compositor_software_new()
Definition: fl_compositor_software.cc:87
fl_dart_project_new
G_MODULE_EXPORT FlDartProject * fl_dart_project_new()
Definition: fl_dart_project.cc:52

References fl_compositor_present_layers(), fl_compositor_software_new(), fl_compositor_software_render(), and fl_dart_project_new().