| Flutter Linux Embedder |

fl_renderer_headless.cc
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 #include "fl_renderer_headless.h"
6
7 struct _FlRendererHeadless {
8 FlRenderer parent_instance;
9 };
10
11 G_DEFINE_TYPE(FlRendererHeadless, fl_renderer_headless, fl_renderer_get_type())
12
13 // Implements FlRenderer::create_contexts.
14 static gboolean fl_renderer_headless_create_contexts(FlRenderer* renderer,
15 GtkWidget* widget,
16 GdkGLContext** visible,
17 GdkGLContext** resource,
18 GError** error) {
19 return FALSE;
20 }
21
22 // Implements FlRenderer::create_backing_store.
23 static gboolean fl_renderer_headless_create_backing_store(
24 FlRenderer* renderer,
25 const FlutterBackingStoreConfig* config,
26 FlutterBackingStore* backing_store_out) {
27 return FALSE;
28 }
29
30 // Implements FlRenderer::collect_backing_store.
31 static gboolean fl_renderer_headless_collect_backing_store(
32 FlRenderer* self,
33 const FlutterBackingStore* backing_store) {
34 return FALSE;
35 }
36
37 // Implements FlRenderer::present_layers.
38 static gboolean fl_renderer_headless_present_layers(FlRenderer* self,
39 const FlutterLayer** layers,
40 size_t layers_count) {
41 return FALSE;
42 }
43
44 static void fl_renderer_headless_class_init(FlRendererHeadlessClass* klass) {
45 FL_RENDERER_CLASS(klass)->create_contexts =
46 fl_renderer_headless_create_contexts;
47 FL_RENDERER_CLASS(klass)->create_backing_store =
48 fl_renderer_headless_create_backing_store;
49 FL_RENDERER_CLASS(klass)->collect_backing_store =
50 fl_renderer_headless_collect_backing_store;
51 FL_RENDERER_CLASS(klass)->present_layers =
52 fl_renderer_headless_present_layers;
53 }
54
55 static void fl_renderer_headless_init(FlRendererHeadless* self) {}
56
57 FlRendererHeadless* fl_renderer_headless_new() {
58 return FL_RENDERER_HEADLESS(
59 g_object_new(fl_renderer_headless_get_type(), nullptr));
60 }
fl_renderer_headless_collect_backing_store
static gboolean fl_renderer_headless_collect_backing_store(FlRenderer *self, const FlutterBackingStore *backing_store)
Definition: fl_renderer_headless.cc:31
fl_renderer_headless_create_contexts
static gboolean fl_renderer_headless_create_contexts(FlRenderer *renderer, GtkWidget *widget, GdkGLContext **visible, GdkGLContext **resource, GError **error)
Definition: fl_renderer_headless.cc:14
_FlRendererHeadless
Definition: fl_renderer_headless.cc:7
fl_renderer_headless.h
fl_renderer_headless_new
FlRendererHeadless * fl_renderer_headless_new()
Definition: fl_renderer_headless.cc:57
fl_renderer_headless_init
static void fl_renderer_headless_init(FlRendererHeadless *self)
Definition: fl_renderer_headless.cc:55
G_DEFINE_TYPE
G_DEFINE_TYPE(FlBasicMessageChannelResponseHandle, fl_basic_message_channel_response_handle, G_TYPE_OBJECT) static void fl_basic_message_channel_response_handle_dispose(GObject *object)
Definition: fl_basic_message_channel.cc:37
fl_renderer_headless_create_backing_store
static gboolean fl_renderer_headless_create_backing_store(FlRenderer *renderer, const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)
Definition: fl_renderer_headless.cc:23
fl_renderer_headless_class_init
static void fl_renderer_headless_class_init(FlRendererHeadlessClass *klass)
Definition: fl_renderer_headless.cc:44
error
const uint8_t uint32_t uint32_t GError ** error
Definition: fl_pixel_buffer_texture_test.cc:40
_FlRendererHeadless::parent_instance
FlRenderer parent_instance
Definition: fl_renderer_headless.cc:8
fl_renderer_headless_present_layers
static gboolean fl_renderer_headless_present_layers(FlRenderer *self, const FlutterLayer **layers, size_t layers_count)
Definition: fl_renderer_headless.cc:38