| Flutter Linux Embedder |

Functions
fl_compositor_software.h File Reference
`#include <cairo/cairo.h>`
`#include "flutter/shell/platform/embedder/embedder.h"`
`#include "flutter/shell/platform/linux/fl_compositor.h"`
`#include "flutter/shell/platform/linux/fl_renderable.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlCompositorSoftware, fl_compositor_software, FL, COMPOSITOR_SOFTWARE, FlCompositor) FlCompositorSoftware *fl_compositor_software_new()
gboolean | fl_compositor_software_render (FlCompositorSoftware *compositor, cairo_t *cr, gint scale_factor)

## Function Documentation

## ◆ fl_compositor_software_render()

gboolean fl_compositor_software_render | ( | FlCompositorSoftware * | compositor,
|  | cairo_t * | cr,
|  | gint | scale_factor
| ) |  |

fl_compositor_software_render: @compositor: an #FlCompositorSoftware. @cr: the cairo context to draw to. @scale_factor: pixel scale factor.

Render the current frame.

Returns: TRUE if rendered.

Definition at line 93 of file fl_compositor_software.cc.

95 {
96 g_autoptr(GMutexLocker) locker = g_mutex_locker_new(&self->frame_mutex);
97
98 if (self->surface == nullptr) {
99 return FALSE;
100 }
101
102 cairo_surface_set_device_scale(self->surface, scale_factor, scale_factor);
103 cairo_set_source_surface(cr, self->surface, 0.0, 0.0);
104 cairo_paint(cr);
105
106 return TRUE;
107 }
TRUE
return TRUE
Definition: fl_pixel_buffer_texture_test.cc:53

References TRUE.

Referenced by software_draw_cb(), and TEST().

## ◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlCompositorSoftware | ,
|  | fl_compositor_software | ,
|  | FL | ,
|  | COMPOSITOR_SOFTWARE | ,
|  | FlCompositor |
| ) |  |

FlCompositorSoftware:

#FlCompositorSoftware is a class that implements compositing using software rendering. fl_compositor_software_new:

Creates a new software rendering compositor.

Returns: a new #FlCompositorSoftware.