Flutter Linux Embedder
fl_compositor.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_compositor.h"
6 
7 G_DEFINE_QUARK(fl_compositor_error_quark, fl_compositor_error)
8 
9 G_DEFINE_TYPE(FlCompositor, fl_compositor, G_TYPE_OBJECT)
10 
11 static void fl_compositor_class_init(FlCompositorClass* klass) {}
12 
13 static void fl_compositor_init(FlCompositor* self) {}
14 
16  FlCompositor* self,
17  const FlutterBackingStoreConfig* config,
18  FlutterBackingStore* backing_store_out) {
19  g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
20  return FL_COMPOSITOR_GET_CLASS(self)->create_backing_store(self, config,
21  backing_store_out);
22 }
23 
25  FlCompositor* self,
26  const FlutterBackingStore* backing_store) {
27  g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
28  return FL_COMPOSITOR_GET_CLASS(self)->collect_backing_store(self,
29  backing_store);
30 }
31 
32 void fl_compositor_wait_for_frame(FlCompositor* self,
33  int target_width,
34  int target_height) {
35  g_return_if_fail(FL_IS_COMPOSITOR(self));
36  FL_COMPOSITOR_GET_CLASS(self)->wait_for_frame(self, target_width,
37  target_height);
38 }
39 
40 gboolean fl_compositor_present_layers(FlCompositor* self,
41  FlutterViewId view_id,
42  const FlutterLayer** layers,
43  size_t layers_count) {
44  g_return_val_if_fail(FL_IS_COMPOSITOR(self), FALSE);
45  return FL_COMPOSITOR_GET_CLASS(self)->present_layers(self, view_id, layers,
46  layers_count);
47 }
G_DEFINE_TYPE(FlBasicMessageChannelResponseHandle, fl_basic_message_channel_response_handle, G_TYPE_OBJECT) static void fl_basic_message_channel_response_handle_dispose(GObject *object)
G_DEFINE_QUARK(fl_binary_messenger_codec_error_quark, fl_binary_messenger_codec_error) G_DECLARE_FINAL_TYPE(FlBinaryMessengerImpl
gboolean fl_compositor_present_layers(FlCompositor *self, FlutterViewId view_id, const FlutterLayer **layers, size_t layers_count)
void fl_compositor_wait_for_frame(FlCompositor *self, int target_width, int target_height)
gboolean fl_compositor_collect_backing_store(FlCompositor *self, const FlutterBackingStore *backing_store)
gboolean fl_compositor_create_backing_store(FlCompositor *self, const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out)
static void fl_compositor_class_init(FlCompositorClass *klass)
static void fl_compositor_init(FlCompositor *self)
G_BEGIN_DECLS FlutterViewId view_id