[mutter/gbsneto/cleanup-x11-from-window-actor: 4/10] window-actor: Add frame_complete(), pre_paint() and post_paint()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/cleanup-x11-from-window-actor: 4/10] window-actor: Add frame_complete(), pre_paint() and post_paint()
- Date: Sat, 22 Dec 2018 15:06:20 +0000 (UTC)
commit 9d9eba5b67b07b73fe61ac00f922daa649f7ae40
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Dec 21 18:51:02 2018 -0200
window-actor: Add frame_complete(), pre_paint() and post_paint()
These are required vfuncs to be implemented by the specialized
classes. Also add stub implementations of these new functions
on the subclasses.
src/compositor/meta-window-actor-private.h | 7 +++++++
src/compositor/meta-window-actor-wayland.c | 22 ++++++++++++++++++++++
src/compositor/meta-window-actor-x11.c | 22 ++++++++++++++++++++++
src/compositor/meta-window-actor.c | 8 ++++++++
4 files changed, 59 insertions(+)
---
diff --git a/src/compositor/meta-window-actor-private.h b/src/compositor/meta-window-actor-private.h
index af371afd7..7a0a1f5f9 100644
--- a/src/compositor/meta-window-actor-private.h
+++ b/src/compositor/meta-window-actor-private.h
@@ -12,6 +12,13 @@
struct _MetaWindowActorClass
{
ClutterActorClass parent;
+
+ void (*frame_complete) (MetaWindowActor *actor,
+ ClutterFrameInfo *frame_info,
+ gint64 presentation_time);
+
+ void (*pre_paint) (MetaWindowActor *actor);
+ void (*post_paint) (MetaWindowActor *actor);
};
MetaWindowActor *meta_window_actor_new (MetaWindow *window);
diff --git a/src/compositor/meta-window-actor-wayland.c b/src/compositor/meta-window-actor-wayland.c
index 851b413a2..2ff9e82e8 100644
--- a/src/compositor/meta-window-actor-wayland.c
+++ b/src/compositor/meta-window-actor-wayland.c
@@ -30,9 +30,31 @@ struct _MetaWindowActorWayland
G_DEFINE_TYPE (MetaWindowActorWayland, meta_window_actor_wayland, META_TYPE_WINDOW_ACTOR)
+static void
+meta_window_actor_wayland_frame_complete (MetaWindowActor *actor,
+ ClutterFrameInfo *frame_info,
+ gint64 presentation_time)
+{
+}
+
+static void
+meta_window_actor_wayland_pre_paint (MetaWindowActor *actor)
+{
+}
+
+static void
+meta_window_actor_wayland_post_paint (MetaWindowActor *actor)
+{
+}
+
static void
meta_window_actor_wayland_class_init (MetaWindowActorWaylandClass *klass)
{
+ MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
+
+ window_actor_class->frame_complete = meta_window_actor_wayland_frame_complete;
+ window_actor_class->pre_paint = meta_window_actor_wayland_pre_paint;
+ window_actor_class->post_paint = meta_window_actor_wayland_post_paint;
}
static void
diff --git a/src/compositor/meta-window-actor-x11.c b/src/compositor/meta-window-actor-x11.c
index fe41e81f0..a28405248 100644
--- a/src/compositor/meta-window-actor-x11.c
+++ b/src/compositor/meta-window-actor-x11.c
@@ -30,9 +30,31 @@ struct _MetaWindowActorX11
G_DEFINE_TYPE (MetaWindowActorX11, meta_window_actor_x11, META_TYPE_WINDOW_ACTOR)
+static void
+meta_window_actor_x11_frame_complete (MetaWindowActor *actor,
+ ClutterFrameInfo *frame_info,
+ gint64 presentation_time)
+{
+}
+
+static void
+meta_window_actor_x11_pre_paint (MetaWindowActor *actor)
+{
+}
+
+static void
+meta_window_actor_x11_post_paint (MetaWindowActor *actor)
+{
+}
+
static void
meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
{
+ MetaWindowActorClass *window_actor_class = META_WINDOW_ACTOR_CLASS (klass);
+
+ window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
+ window_actor_class->pre_paint = meta_window_actor_x11_pre_paint;
+ window_actor_class->post_paint = meta_window_actor_x11_post_paint;
}
static void
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 88f8eb729..b0c01dfc9 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -2050,6 +2050,8 @@ meta_window_actor_pre_paint (MetaWindowActor *self)
meta_window_actor_handle_updates (self);
+ META_WINDOW_ACTOR_GET_CLASS (self)->pre_paint (self);
+
assign_frame_counter_to_frames (self);
}
@@ -2090,6 +2092,8 @@ meta_window_actor_post_paint (MetaWindowActor *self)
priv->repaint_scheduled = FALSE;
+ META_WINDOW_ACTOR_GET_CLASS (self)->post_paint (self);
+
if (meta_window_actor_is_destroyed (self))
return;
@@ -2192,6 +2196,10 @@ meta_window_actor_frame_complete (MetaWindowActor *self,
if (meta_window_actor_is_destroyed (self))
return;
+ META_WINDOW_ACTOR_GET_CLASS (self)->frame_complete (self,
+ frame_info,
+ presentation_time);
+
for (l = priv->frames; l;)
{
GList *l_next = l->next;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]