| 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"`
`#include <gdk/gdkwayland.h>`

Go to the source code of this file.

## Functions
| TEST (FlCompositorSoftwareTest, Render)

## Function Documentation

## ◆ TEST()

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

Definition at line 14 of file fl_compositor_software_test.cc.

14 {
15 g_autoptr(FlDartProject) project = fl_dart_project_new();
16
17 g_autoptr(FlCompositorSoftware) compositor = fl_compositor_software_new();
18
19 unsigned char image_data[1024 * 1024 * 4];
20 cairo_surface_t* surface = cairo_image_surface_create_for_data(
21 image_data, CAIRO_FORMAT_ARGB32, 1024, 1024, 1024 * 4);
22 cairo_t* cr = cairo_create(surface);
23 fl_compositor_present_layers(FL_COMPOSITOR(compositor), nullptr, 0);
24 fl_compositor_render(FL_COMPOSITOR(compositor), cr, nullptr);
25 cairo_surface_destroy(surface);
26 }
fl_compositor_render
gboolean fl_compositor_render(FlCompositor *self, cairo_t *cr, GdkWindow *window)
Definition: fl_compositor.cc:23
fl_compositor_present_layers
gboolean fl_compositor_present_layers(FlCompositor *self, const FlutterLayer **layers, size_t layers_count)
Definition: fl_compositor.cc:15
fl_compositor_software_new
FlCompositorSoftware * fl_compositor_software_new()
Definition: fl_compositor_software.cc:125
g_autoptr
g_autoptr(GMutexLocker) locker
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_render(), fl_compositor_software_new(), fl_dart_project_new(), and g_autoptr().