| 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::make_current.
14 static void fl_renderer_headless_make_current(FlRenderer* renderer) {}
15
16 // Implements FlRenderer::make_resource_current.
17 static void fl_renderer_headless_make_resource_current(FlRenderer* renderer) {}
18
19 // Implements FlRenderer::clear_current.
20 static void fl_renderer_headless_clear_current(FlRenderer* renderer) {}
21
22 // Implements FlRenderer::get_refresh_rate.
23 static gdouble fl_renderer_headless_get_refresh_rate(FlRenderer* renderer) {
24 return -1.0;
25 }
26
27 static void fl_renderer_headless_class_init(FlRendererHeadlessClass* klass) {
28 FL_RENDERER_CLASS(klass)->make_current = fl_renderer_headless_make_current;
29 FL_RENDERER_CLASS(klass)->make_resource_current =
30 fl_renderer_headless_make_resource_current;
31 FL_RENDERER_CLASS(klass)->clear_current = fl_renderer_headless_clear_current;
32 FL_RENDERER_CLASS(klass)->get_refresh_rate =
33 fl_renderer_headless_get_refresh_rate;
34 }
35
36 static void fl_renderer_headless_init(FlRendererHeadless* self) {}
37
38 FlRendererHeadless* fl_renderer_headless_new() {
39 return FL_RENDERER_HEADLESS(
40 g_object_new(fl_renderer_headless_get_type(), nullptr));
41 }
_FlRendererHeadless
Definition: fl_renderer_headless.cc:7
fl_renderer_headless.h
fl_renderer_headless_clear_current
static void fl_renderer_headless_clear_current(FlRenderer *renderer)
Definition: fl_renderer_headless.cc:20
fl_renderer_headless_make_current
static void fl_renderer_headless_make_current(FlRenderer *renderer)
Definition: fl_renderer_headless.cc:14
fl_renderer_headless_make_resource_current
static void fl_renderer_headless_make_resource_current(FlRenderer *renderer)
Definition: fl_renderer_headless.cc:17
fl_renderer_headless_new
FlRendererHeadless * fl_renderer_headless_new()
Definition: fl_renderer_headless.cc:38
fl_renderer_headless_init
static void fl_renderer_headless_init(FlRendererHeadless *self)
Definition: fl_renderer_headless.cc:36
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_class_init
static void fl_renderer_headless_class_init(FlRendererHeadlessClass *klass)
Definition: fl_renderer_headless.cc:27
_FlRendererHeadless::parent_instance
FlRenderer parent_instance
Definition: fl_renderer_headless.cc:8
fl_renderer_headless_get_refresh_rate
static gdouble fl_renderer_headless_get_refresh_rate(FlRenderer *renderer)
Definition: fl_renderer_headless.cc:23