summaryrefslogtreecommitdiff
path: root/src/backends
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-07-07 09:26:06 +0200
committerRobert Mader <robert.mader@collabora.com>2023-03-02 01:39:16 +0100
commit7b634df37980b6b2dd624b51932663ba363776e0 (patch)
treeb75a5b26ed822bbaa8b1540bef35b706acbc70d5 /src/backends
parent678dc3243f5ae97455a94bea432eb6abbf50cc39 (diff)
downloadmutter-7b634df37980b6b2dd624b51932663ba363776e0.tar.gz
renderer-view/native: Allocate backend specific ClutterFrame
This will carry an on-demand created MetaKmsUpdate. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2855>
Diffstat (limited to 'src/backends')
-rw-r--r--src/backends/native/meta-frame-native.c35
-rw-r--r--src/backends/native/meta-frame-native.h27
-rw-r--r--src/backends/native/meta-renderer-view-native.c11
3 files changed, 73 insertions, 0 deletions
diff --git a/src/backends/native/meta-frame-native.c b/src/backends/native/meta-frame-native.c
new file mode 100644
index 000000000..4c2549a8d
--- /dev/null
+++ b/src/backends/native/meta-frame-native.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2022 Red Hat
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#include "config.h"
+
+#include "backends/native/meta-frame-native.h"
+
+#include "clutter/clutter-mutter.h"
+
+struct _MetaFrameNative
+{
+ ClutterFrame base;
+};
+
+MetaFrameNative *
+meta_frame_native_new (void)
+{
+ return clutter_frame_new (MetaFrameNative);
+}
diff --git a/src/backends/native/meta-frame-native.h b/src/backends/native/meta-frame-native.h
new file mode 100644
index 000000000..f52921ce6
--- /dev/null
+++ b/src/backends/native/meta-frame-native.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2022 Red Hat
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef META_FRAME_NATIVE_H
+#define META_FRAME_NATIVE_H
+
+typedef struct _MetaFrameNative MetaFrameNative;
+
+MetaFrameNative * meta_frame_native_new (void);
+
+#endif /* META_FRAME_NATIVE_H */
diff --git a/src/backends/native/meta-renderer-view-native.c b/src/backends/native/meta-renderer-view-native.c
index e64a1476a..52872ff3c 100644
--- a/src/backends/native/meta-renderer-view-native.c
+++ b/src/backends/native/meta-renderer-view-native.c
@@ -24,6 +24,8 @@
#include "backends/native/meta-renderer-view-native.h"
+#include "backends/native/meta-frame-native.h"
+
struct _MetaRendererViewNative
{
MetaRendererView parent;
@@ -32,9 +34,18 @@ struct _MetaRendererViewNative
G_DEFINE_TYPE (MetaRendererViewNative, meta_renderer_view_native,
META_TYPE_RENDERER_VIEW)
+static ClutterFrame *
+meta_renderer_view_native_new_frame (ClutterStageView *stage_view)
+{
+ return (ClutterFrame *) meta_frame_native_new ();
+}
+
static void
meta_renderer_view_native_class_init (MetaRendererViewNativeClass *klass)
{
+ ClutterStageViewClass *stage_view_class = CLUTTER_STAGE_VIEW_CLASS (klass);
+
+ stage_view_class->new_frame = meta_renderer_view_native_new_frame;
}
static void