[mutter/wip/carlosg/backendless-clutter: 8/16] backends: Rename ClutterStage[View]Cogl API and types
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/backendless-clutter: 8/16] backends: Rename ClutterStage[View]Cogl API and types
- Date: Tue, 11 May 2021 09:21:25 +0000 (UTC)
commit ce5d1ade8744ccd4f17e21654b9898f40537d670
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 10 21:15:53 2021 +0200
backends: Rename ClutterStage[View]Cogl API and types
Rename to MetaStageImpl and MetaStageView, so they are in line with
the rest of the backend code.
src/backends/meta-renderer-view.c | 4 +-
src/backends/meta-renderer-view.h | 2 +-
src/backends/meta-stage-impl-private.h | 53 +++---
src/backends/meta-stage-impl.c | 210 ++++++++++++------------
src/backends/native/meta-onscreen-native.c | 4 +-
src/backends/native/meta-stage-native.c | 4 +-
src/backends/native/meta-stage-native.h | 2 +-
src/backends/x11/meta-seat-x11.c | 4 +-
src/backends/x11/meta-stage-x11.c | 64 ++++----
src/backends/x11/meta-stage-x11.h | 4 +-
src/backends/x11/nested/meta-stage-x11-nested.c | 2 +-
11 files changed, 175 insertions(+), 178 deletions(-)
---
diff --git a/src/backends/meta-renderer-view.c b/src/backends/meta-renderer-view.c
index 1688c5cb42..55617fc682 100644
--- a/src/backends/meta-renderer-view.c
+++ b/src/backends/meta-renderer-view.c
@@ -51,7 +51,7 @@ static GParamSpec *obj_props[PROP_LAST];
struct _MetaRendererView
{
- ClutterStageViewCogl parent;
+ MetaStageView parent;
MetaMonitorTransform transform;
@@ -59,7 +59,7 @@ struct _MetaRendererView
};
G_DEFINE_TYPE (MetaRendererView, meta_renderer_view,
- CLUTTER_TYPE_STAGE_VIEW_COGL)
+ META_TYPE_STAGE_VIEW)
MetaMonitorTransform
meta_renderer_view_get_transform (MetaRendererView *view)
diff --git a/src/backends/meta-renderer-view.h b/src/backends/meta-renderer-view.h
index 668b4e7e8d..703c3aabb2 100644
--- a/src/backends/meta-renderer-view.h
+++ b/src/backends/meta-renderer-view.h
@@ -24,7 +24,7 @@
#define META_TYPE_RENDERER_VIEW (meta_renderer_view_get_type ())
G_DECLARE_FINAL_TYPE (MetaRendererView, meta_renderer_view,
META, RENDERER_VIEW,
- ClutterStageViewCogl)
+ MetaStageView)
MetaMonitorTransform meta_renderer_view_get_transform (MetaRendererView *view);
diff --git a/src/backends/meta-stage-impl-private.h b/src/backends/meta-stage-impl-private.h
index 0a1359c9af..8600747d80 100644
--- a/src/backends/meta-stage-impl-private.h
+++ b/src/backends/meta-stage-impl-private.h
@@ -1,35 +1,35 @@
-#ifndef __CLUTTER_STAGE_COGL_H__
-#define __CLUTTER_STAGE_COGL_H__
+#ifndef __META_STAGE_IMPL_H__
+#define __META_STAGE_IMPL_H__
#include <cairo.h>
#include "clutter/clutter.h"
G_BEGIN_DECLS
-#define CLUTTER_TYPE_STAGE_COGL (_clutter_stage_cogl_get_type ())
-#define CLUTTER_STAGE_COGL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
CLUTTER_TYPE_STAGE_COGL, ClutterStageCogl))
-#define CLUTTER_IS_STAGE_COGL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
CLUTTER_TYPE_STAGE_COGL))
-#define CLUTTER_STAGE_COGL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_COGL,
ClutterStageCoglClass))
-#define CLUTTER_IS_STAGE_COGL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_COGL))
-#define CLUTTER_STAGE_COGL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_COGL,
ClutterStageCoglClass))
+#define META_TYPE_STAGE_IMPL (meta_stage_impl_get_type ())
+#define META_STAGE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_STAGE_IMPL,
MetaStageImpl))
+#define META_IS_STAGE_IMPL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_STAGE_IMPL))
+#define META_STAGE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_STAGE_IMPL,
MetaStageImplClass))
+#define META_IS_STAGE_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_STAGE_IMPL))
+#define META_STAGE_IMPL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_STAGE_IMPL,
MetaStageImplClass))
-typedef struct _ClutterStageCogl ClutterStageCogl;
-typedef struct _ClutterStageCoglClass ClutterStageCoglClass;
+typedef struct _MetaStageImpl MetaStageImpl;
+typedef struct _MetaStageImplClass MetaStageImplClass;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStageCogl, g_object_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaStageImpl, g_object_unref)
-#define CLUTTER_TYPE_STAGE_VIEW_COGL (clutter_stage_view_cogl_get_type ())
-CLUTTER_EXPORT
-G_DECLARE_DERIVABLE_TYPE (ClutterStageViewCogl, clutter_stage_view_cogl,
- CLUTTER, STAGE_VIEW_COGL,
+#define META_TYPE_STAGE_VIEW (meta_stage_view_get_type ())
+
+G_DECLARE_DERIVABLE_TYPE (MetaStageView, meta_stage_view,
+ META, STAGE_VIEW,
ClutterStageView)
-struct _ClutterStageViewCoglClass
+struct _MetaStageViewClass
{
ClutterStageViewClass parent_class;
};
-struct _ClutterStageCogl
+struct _MetaStageImpl
{
GObject parent_instance;
@@ -40,23 +40,20 @@ struct _ClutterStageCogl
ClutterBackend *backend;
};
-struct _ClutterStageCoglClass
+struct _MetaStageImplClass
{
GObjectClass parent_class;
};
-CLUTTER_EXPORT
-GType _clutter_stage_cogl_get_type (void) G_GNUC_CONST;
+GType meta_stage_impl_get_type (void) G_GNUC_CONST;
-CLUTTER_EXPORT
-void _clutter_stage_cogl_presented (ClutterStageCogl *stage_cogl,
- CoglFrameEvent frame_event,
- ClutterFrameInfo *frame_info);
+void meta_stage_impl_presented (MetaStageImpl *stage_impl,
+ CoglFrameEvent frame_event,
+ ClutterFrameInfo *frame_info);
-CLUTTER_EXPORT
-void clutter_stage_cogl_add_onscreen_frame_info (ClutterStageCogl *stage_cogl,
- ClutterStageView *view);
+void meta_stage_impl_add_onscreen_frame_info (MetaStageImpl *stage_impl,
+ ClutterStageView *view);
G_END_DECLS
-#endif /* __CLUTTER_STAGE_COGL_H__ */
+#endif /* __META_STAGE_IMPL_H__ */
diff --git a/src/backends/meta-stage-impl.c b/src/backends/meta-stage-impl.c
index 96f2790d8e..b89485f16a 100644
--- a/src/backends/meta-stage-impl.c
+++ b/src/backends/meta-stage-impl.c
@@ -38,7 +38,7 @@
#define MAX_STACK_RECTS 256
-typedef struct _ClutterStageViewCoglPrivate
+typedef struct _MetaStageViewPrivate
{
/* Damage history, in stage view render target framebuffer coordinate space.
*/
@@ -47,23 +47,23 @@ typedef struct _ClutterStageViewCoglPrivate
guint notify_presented_handle_id;
CoglFrameClosure *frame_cb_closure;
-} ClutterStageViewCoglPrivate;
+} MetaStageViewPrivate;
-G_DEFINE_TYPE_WITH_PRIVATE (ClutterStageViewCogl, clutter_stage_view_cogl,
+G_DEFINE_TYPE_WITH_PRIVATE (MetaStageView, meta_stage_view,
CLUTTER_TYPE_STAGE_VIEW)
-typedef struct _ClutterStageCoglPrivate
+typedef struct _MetaStageImplPrivate
{
int64_t global_frame_counter;
-} ClutterStageCoglPrivate;
+} MetaStageImplPrivate;
static void
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface);
-G_DEFINE_TYPE_WITH_CODE (ClutterStageCogl,
- _clutter_stage_cogl,
+G_DEFINE_TYPE_WITH_CODE (MetaStageImpl,
+ meta_stage_impl,
G_TYPE_OBJECT,
- G_ADD_PRIVATE (ClutterStageCogl)
+ G_ADD_PRIVATE (MetaStageImpl)
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
clutter_stage_window_iface_init));
@@ -76,13 +76,13 @@ enum
};
static void
-clutter_stage_cogl_unrealize (ClutterStageWindow *stage_window)
+meta_stage_impl_unrealize (ClutterStageWindow *stage_window)
{
g_debug ("Unrealizing Cogl stage [%p]", stage_window);
}
static gboolean
-clutter_stage_cogl_realize (ClutterStageWindow *stage_window)
+meta_stage_impl_realize (ClutterStageWindow *stage_window)
{
ClutterBackend *backend;
@@ -102,42 +102,42 @@ clutter_stage_cogl_realize (ClutterStageWindow *stage_window)
}
static int64_t
-clutter_stage_cogl_get_frame_counter (ClutterStageWindow *stage_window)
+meta_stage_impl_get_frame_counter (ClutterStageWindow *stage_window)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
- ClutterStageCoglPrivate *priv =
- _clutter_stage_cogl_get_instance_private (stage_cogl);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
+ MetaStageImplPrivate *priv =
+ meta_stage_impl_get_instance_private (stage_impl);
return priv->global_frame_counter;
}
static ClutterActor *
-clutter_stage_cogl_get_wrapper (ClutterStageWindow *stage_window)
+meta_stage_impl_get_wrapper (ClutterStageWindow *stage_window)
{
- return CLUTTER_ACTOR (CLUTTER_STAGE_COGL (stage_window)->wrapper);
+ return CLUTTER_ACTOR (META_STAGE_IMPL (stage_window)->wrapper);
}
static void
-clutter_stage_cogl_show (ClutterStageWindow *stage_window,
- gboolean do_raise)
+meta_stage_impl_show (ClutterStageWindow *stage_window,
+ gboolean do_raise)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
- clutter_actor_map (CLUTTER_ACTOR (stage_cogl->wrapper));
+ clutter_actor_map (CLUTTER_ACTOR (stage_impl->wrapper));
}
static void
-clutter_stage_cogl_hide (ClutterStageWindow *stage_window)
+meta_stage_impl_hide (ClutterStageWindow *stage_window)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
- clutter_actor_unmap (CLUTTER_ACTOR (stage_cogl->wrapper));
+ clutter_actor_unmap (CLUTTER_ACTOR (stage_impl->wrapper));
}
static void
-clutter_stage_cogl_resize (ClutterStageWindow *stage_window,
- gint width,
- gint height)
+meta_stage_impl_resize (ClutterStageWindow *stage_window,
+ gint width,
+ gint height)
{
}
@@ -150,8 +150,8 @@ paint_damage_region (ClutterStageWindow *stage_window,
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
static CoglPipeline *overlay_blue = NULL;
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
- ClutterActor *actor = CLUTTER_ACTOR (stage_cogl->wrapper);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
+ ClutterActor *actor = CLUTTER_ACTOR (stage_impl->wrapper);
graphene_matrix_t transform;
int n_rects, i;
@@ -221,9 +221,9 @@ static gboolean
notify_presented_idle (gpointer user_data)
{
NotifyPresentedClosure *closure = user_data;
- ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (closure->view);
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
+ MetaStageView *meta_view = META_STAGE_VIEW (closure->view);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
view_priv->notify_presented_handle_id = 0;
clutter_stage_view_notify_presented (closure->view, &closure->frame_info);
@@ -238,9 +238,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
gboolean swap_with_damage,
ClutterFrame *frame)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
- ClutterStageCoglPrivate *priv =
- _clutter_stage_cogl_get_instance_private (stage_cogl);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
+ MetaStageImplPrivate *priv =
+ meta_stage_impl_get_instance_private (stage_impl);
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
clutter_stage_view_before_swap_buffer (view, swap_region);
@@ -289,9 +289,9 @@ swap_framebuffer (ClutterStageWindow *stage_window,
}
else
{
- ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (view);
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
+ MetaStageView *meta_view = META_STAGE_VIEW (view);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
NotifyPresentedClosure *closure;
g_debug ("fake offscreen swap (framebuffer: %p)", framebuffer);
@@ -388,11 +388,11 @@ scale_offset_and_clamp_region (const cairo_region_t *region,
}
static void
-paint_stage (ClutterStageCogl *stage_cogl,
+paint_stage (MetaStageImpl *stage_impl,
ClutterStageView *view,
cairo_region_t *redraw_clip)
{
- ClutterStage *stage = stage_cogl->wrapper;
+ ClutterStage *stage = stage_impl->wrapper;
_clutter_stage_maybe_setup_viewport (stage, view);
clutter_stage_paint_view (stage, view, redraw_clip);
@@ -430,14 +430,14 @@ transform_swap_region_to_onscreen (ClutterStageView *view,
}
static void
-clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
- ClutterStageView *view,
- ClutterFrame *frame)
+meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl,
+ ClutterStageView *view,
+ ClutterFrame *frame)
{
- ClutterStageWindow *stage_window = CLUTTER_STAGE_WINDOW (stage_cogl);
- ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (view);
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
+ ClutterStageWindow *stage_window = CLUTTER_STAGE_WINDOW (stage_impl);
+ MetaStageView *meta_view = META_STAGE_VIEW (view);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
CoglFramebuffer *onscreen = clutter_stage_view_get_onscreen (view);
cairo_rectangle_int_t view_rect;
@@ -586,14 +586,14 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
cairo_region_t *debug_redraw_clip;
debug_redraw_clip = cairo_region_create_rectangle (&view_rect);
- paint_stage (stage_cogl, view, debug_redraw_clip);
+ paint_stage (stage_impl, view, debug_redraw_clip);
cairo_region_destroy (debug_redraw_clip);
}
else if (use_clipped_redraw)
{
cogl_framebuffer_push_region_clip (fb, fb_clip_region);
- paint_stage (stage_cogl, view, redraw_clip);
+ paint_stage (stage_impl, view, redraw_clip);
cogl_framebuffer_pop_clip (fb);
}
@@ -601,7 +601,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
{
g_debug ("Unclipped stage paint");
- paint_stage (stage_cogl, view, redraw_clip);
+ paint_stage (stage_impl, view, redraw_clip);
}
/* XXX: It seems there will be a race here in that the stage
@@ -620,7 +620,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
g_clear_pointer (&redraw_clip, cairo_region_destroy);
g_clear_pointer (&fb_clip_region, cairo_region_destroy);
- COGL_TRACE_BEGIN_SCOPED (ClutterStageCoglRedrawViewSwapFramebuffer,
+ COGL_TRACE_BEGIN_SCOPED (MetaStageImplRedrawViewSwapFramebuffer,
"Paint (swap framebuffer)");
if (clutter_stage_view_get_onscreen (view) !=
@@ -663,14 +663,14 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
}
static gboolean
-clutter_stage_cogl_scanout_view (ClutterStageCogl *stage_cogl,
- ClutterStageView *view,
- CoglScanout *scanout,
- ClutterFrame *frame,
- GError **error)
+meta_stage_impl_scanout_view (MetaStageImpl *stage_impl,
+ ClutterStageView *view,
+ CoglScanout *scanout,
+ ClutterFrame *frame,
+ GError **error)
{
- ClutterStageCoglPrivate *priv =
- _clutter_stage_cogl_get_instance_private (stage_cogl);
+ MetaStageImplPrivate *priv =
+ meta_stage_impl_get_instance_private (stage_impl);
CoglFramebuffer *framebuffer = clutter_stage_view_get_framebuffer (view);
CoglOnscreen *onscreen;
CoglFrameInfo *frame_info;
@@ -697,11 +697,11 @@ clutter_stage_cogl_scanout_view (ClutterStageCogl *stage_cogl,
}
static void
-clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
- ClutterStageView *view,
- ClutterFrame *frame)
+meta_stage_impl_redraw_view (ClutterStageWindow *stage_window,
+ ClutterStageView *view,
+ ClutterFrame *frame)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
g_autoptr (CoglScanout) scanout = NULL;
scanout = clutter_stage_view_take_scanout (view);
@@ -709,11 +709,11 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
{
g_autoptr (GError) error = NULL;
- if (clutter_stage_cogl_scanout_view (stage_cogl,
- view,
- scanout,
- frame,
- &error))
+ if (meta_stage_impl_scanout_view (stage_impl,
+ view,
+ scanout,
+ frame,
+ &error))
return;
if (!g_error_matches (error,
@@ -722,15 +722,15 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
g_warning ("Failed to scan out client buffer: %s", error->message);
}
- clutter_stage_cogl_redraw_view_primary (stage_cogl, view, frame);
+ meta_stage_impl_redraw_view_primary (stage_impl, view, frame);
}
void
-clutter_stage_cogl_add_onscreen_frame_info (ClutterStageCogl *stage_cogl,
- ClutterStageView *view)
+meta_stage_impl_add_onscreen_frame_info (MetaStageImpl *stage_impl,
+ ClutterStageView *view)
{
- ClutterStageCoglPrivate *priv =
- _clutter_stage_cogl_get_instance_private (stage_cogl);
+ MetaStageImplPrivate *priv =
+ meta_stage_impl_get_instance_private (stage_impl);
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
CoglFrameInfo *frame_info;
@@ -743,23 +743,23 @@ clutter_stage_cogl_add_onscreen_frame_info (ClutterStageCogl *stage_cogl,
static void
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
{
- iface->realize = clutter_stage_cogl_realize;
- iface->unrealize = clutter_stage_cogl_unrealize;
- iface->get_wrapper = clutter_stage_cogl_get_wrapper;
- iface->resize = clutter_stage_cogl_resize;
- iface->show = clutter_stage_cogl_show;
- iface->hide = clutter_stage_cogl_hide;
- iface->get_frame_counter = clutter_stage_cogl_get_frame_counter;
- iface->redraw_view = clutter_stage_cogl_redraw_view;
+ iface->realize = meta_stage_impl_realize;
+ iface->unrealize = meta_stage_impl_unrealize;
+ iface->get_wrapper = meta_stage_impl_get_wrapper;
+ iface->resize = meta_stage_impl_resize;
+ iface->show = meta_stage_impl_show;
+ iface->hide = meta_stage_impl_hide;
+ iface->get_frame_counter = meta_stage_impl_get_frame_counter;
+ iface->redraw_view = meta_stage_impl_redraw_view;
}
static void
-clutter_stage_cogl_set_property (GObject *gobject,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+meta_stage_impl_set_property (GObject *gobject,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- ClutterStageCogl *self = CLUTTER_STAGE_COGL (gobject);
+ MetaStageImpl *self = META_STAGE_IMPL (gobject);
switch (prop_id)
{
@@ -778,18 +778,18 @@ clutter_stage_cogl_set_property (GObject *gobject,
}
static void
-_clutter_stage_cogl_class_init (ClutterStageCoglClass *klass)
+meta_stage_impl_class_init (MetaStageImplClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->set_property = clutter_stage_cogl_set_property;
+ gobject_class->set_property = meta_stage_impl_set_property;
g_object_class_override_property (gobject_class, PROP_WRAPPER, "wrapper");
g_object_class_override_property (gobject_class, PROP_BACKEND, "backend");
}
static void
-_clutter_stage_cogl_init (ClutterStageCogl *stage)
+meta_stage_impl_init (MetaStageImpl *stage)
{
}
@@ -835,12 +835,12 @@ frame_cb (CoglOnscreen *onscreen,
}
static void
-clutter_stage_view_cogl_dispose (GObject *object)
+meta_stage_view_dispose (GObject *object)
{
- ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (object);
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
- ClutterStageView *view = CLUTTER_STAGE_VIEW (view_cogl);
+ MetaStageView *meta_view = META_STAGE_VIEW (object);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
+ ClutterStageView *view = CLUTTER_STAGE_VIEW (meta_view);
g_clear_handle_id (&view_priv->notify_presented_handle_id, g_source_remove);
g_clear_pointer (&view_priv->damage_history, clutter_damage_history_free);
@@ -855,16 +855,16 @@ clutter_stage_view_cogl_dispose (GObject *object)
view_priv->frame_cb_closure = NULL;
}
- G_OBJECT_CLASS (clutter_stage_view_cogl_parent_class)->dispose (object);
+ G_OBJECT_CLASS (meta_stage_view_parent_class)->dispose (object);
}
static void
-clutter_stage_view_cogl_constructed (GObject *object)
+meta_stage_view_constructed (GObject *object)
{
- ClutterStageViewCogl *view_cogl = CLUTTER_STAGE_VIEW_COGL (object);
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
- ClutterStageView *view = CLUTTER_STAGE_VIEW (view_cogl);
+ MetaStageView *meta_view = META_STAGE_VIEW (object);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
+ ClutterStageView *view = CLUTTER_STAGE_VIEW (meta_view);
CoglFramebuffer *framebuffer;
framebuffer = clutter_stage_view_get_onscreen (view);
@@ -877,23 +877,23 @@ clutter_stage_view_cogl_constructed (GObject *object)
NULL);
}
- G_OBJECT_CLASS (clutter_stage_view_cogl_parent_class)->constructed (object);
+ G_OBJECT_CLASS (meta_stage_view_parent_class)->constructed (object);
}
static void
-clutter_stage_view_cogl_init (ClutterStageViewCogl *view_cogl)
+meta_stage_view_init (MetaStageView *meta_view)
{
- ClutterStageViewCoglPrivate *view_priv =
- clutter_stage_view_cogl_get_instance_private (view_cogl);
+ MetaStageViewPrivate *view_priv =
+ meta_stage_view_get_instance_private (meta_view);
view_priv->damage_history = clutter_damage_history_new ();
}
static void
-clutter_stage_view_cogl_class_init (ClutterStageViewCoglClass *klass)
+meta_stage_view_class_init (MetaStageViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->constructed = clutter_stage_view_cogl_constructed;
- object_class->dispose = clutter_stage_view_cogl_dispose;
+ object_class->constructed = meta_stage_view_constructed;
+ object_class->dispose = meta_stage_view_dispose;
}
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index da75b03ec4..372eab8a95 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -1302,8 +1302,8 @@ add_onscreen_frame_info (MetaCrtc *crtc)
MetaRenderer *renderer = meta_backend_get_renderer (backend);
MetaRendererView *view = meta_renderer_get_view_for_crtc (renderer, crtc);
- clutter_stage_cogl_add_onscreen_frame_info (CLUTTER_STAGE_COGL (stage_window),
- CLUTTER_STAGE_VIEW (view));
+ meta_stage_impl_add_onscreen_frame_info (META_STAGE_IMPL (stage_window),
+ CLUTTER_STAGE_VIEW (view));
}
void
diff --git a/src/backends/native/meta-stage-native.c b/src/backends/native/meta-stage-native.c
index b56acd9d46..e1f9fedb2a 100644
--- a/src/backends/native/meta-stage-native.c
+++ b/src/backends/native/meta-stage-native.c
@@ -38,7 +38,7 @@ static GQuark quark_view_frame_closure = 0;
struct _MetaStageNative
{
- ClutterStageCogl parent;
+ MetaStageImpl parent;
CoglClosure *frame_closure;
@@ -52,7 +52,7 @@ static void
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MetaStageNative, meta_stage_native,
- CLUTTER_TYPE_STAGE_COGL,
+ META_TYPE_STAGE_IMPL,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
clutter_stage_window_iface_init))
diff --git a/src/backends/native/meta-stage-native.h b/src/backends/native/meta-stage-native.h
index 37fbc100b4..5f33e1f9a4 100644
--- a/src/backends/native/meta-stage-native.h
+++ b/src/backends/native/meta-stage-native.h
@@ -30,7 +30,7 @@
#define META_TYPE_STAGE_NATIVE (meta_stage_native_get_type ())
G_DECLARE_FINAL_TYPE (MetaStageNative, meta_stage_native,
- META, STAGE_NATIVE, ClutterStageCogl)
+ META, STAGE_NATIVE, MetaStageImpl)
void meta_stage_native_rebuild_views (MetaStageNative *stage_native);
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index d43834bd7b..18c560b275 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -1252,8 +1252,8 @@ translate_coords (MetaStageX11 *stage_x11,
float *x_out,
float *y_out)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
- ClutterActor *stage = CLUTTER_ACTOR (stage_cogl->wrapper);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
+ ClutterActor *stage = CLUTTER_ACTOR (stage_impl->wrapper);
float stage_width;
float stage_height;
diff --git a/src/backends/x11/meta-stage-x11.c b/src/backends/x11/meta-stage-x11.c
index 938d65cbff..4e734c430f 100644
--- a/src/backends/x11/meta-stage-x11.c
+++ b/src/backends/x11/meta-stage-x11.c
@@ -49,13 +49,13 @@ static ClutterStageWindowInterface *clutter_stage_window_parent_iface = NULL;
static void
clutter_stage_window_iface_init (ClutterStageWindowInterface *iface);
-static ClutterStageCogl *meta_x11_get_stage_window_from_window (Window win);
+static MetaStageImpl *meta_x11_get_stage_window_from_window (Window win);
static GHashTable *clutter_stages_by_xid = NULL;
G_DEFINE_TYPE_WITH_CODE (MetaStageX11,
meta_stage_x11,
- CLUTTER_TYPE_STAGE_COGL,
+ META_TYPE_STAGE_IMPL,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
clutter_stage_window_iface_init));
@@ -81,7 +81,7 @@ meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
int new_width,
int new_height)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
if (stage_x11->xwin != None)
{
@@ -91,7 +91,7 @@ meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
size_hints = XAllocSizeHints();
- clutter_stage_get_minimum_size (stage_cogl->wrapper,
+ clutter_stage_get_minimum_size (stage_impl->wrapper,
&min_width,
&min_height);
@@ -116,8 +116,8 @@ meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
static void
meta_stage_x11_set_wm_protocols (MetaStageX11 *stage_x11)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
+ ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_impl->backend);
Display *xdisplay = clutter_x11_get_default_display ();
Atom protocols[2];
int n = 0;
@@ -188,8 +188,8 @@ meta_stage_x11_resize (ClutterStageWindow *stage_window,
static inline void
set_wm_pid (MetaStageX11 *stage_x11)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
+ ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_impl->backend);
Display *xdisplay = clutter_x11_get_default_display ();
long pid;
@@ -214,8 +214,8 @@ set_wm_pid (MetaStageX11 *stage_x11)
static inline void
set_wm_title (MetaStageX11 *stage_x11)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
+ ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_impl->backend);
Display *xdisplay = clutter_x11_get_default_display ();
if (stage_x11->xwin == None)
@@ -292,14 +292,14 @@ static gboolean
meta_stage_x11_realize (ClutterStageWindow *stage_window)
{
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
- ClutterBackend *backend = CLUTTER_BACKEND (stage_cogl->backend);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_window);
+ ClutterBackend *backend = CLUTTER_BACKEND (stage_impl->backend);
MetaSeatX11 *seat_x11 = META_SEAT_X11 (clutter_backend_get_default_seat (backend));
Display *xdisplay = clutter_x11_get_default_display ();
float width, height;
GError *error = NULL;
- clutter_actor_get_size (CLUTTER_ACTOR (stage_cogl->wrapper), &width, &height);
+ clutter_actor_get_size (CLUTTER_ACTOR (stage_impl->wrapper), &width, &height);
stage_x11->onscreen = create_onscreen (backend->cogl_context, width, height);
@@ -362,7 +362,7 @@ meta_stage_x11_realize (ClutterStageWindow *stage_window)
*/
XSelectInput (xdisplay, stage_x11->xwin, META_STAGE_X11_EVENT_MASK);
- meta_seat_x11_select_stage_events (seat_x11, stage_cogl->wrapper);
+ meta_seat_x11_select_stage_events (seat_x11, stage_impl->wrapper);
meta_stage_x11_fix_window_size (stage_x11,
stage_x11->xwin_width,
@@ -423,7 +423,7 @@ meta_stage_x11_show (ClutterStageWindow *stage_window,
gboolean do_raise)
{
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
if (stage_x11->xwin != None)
{
@@ -443,7 +443,7 @@ meta_stage_x11_show (ClutterStageWindow *stage_window,
g_assert (STAGE_X11_IS_MAPPED (stage_x11));
- clutter_actor_map (CLUTTER_ACTOR (stage_cogl->wrapper));
+ clutter_actor_map (CLUTTER_ACTOR (stage_impl->wrapper));
XMapWindow (xdisplay, stage_x11->xwin);
}
@@ -453,7 +453,7 @@ static void
meta_stage_x11_hide (ClutterStageWindow *stage_window)
{
MetaStageX11 *stage_x11 = META_STAGE_X11 (stage_window);
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
if (stage_x11->xwin != None)
{
@@ -464,7 +464,7 @@ meta_stage_x11_hide (ClutterStageWindow *stage_window)
g_assert (!STAGE_X11_IS_MAPPED (stage_x11));
- clutter_actor_unmap (CLUTTER_ACTOR (stage_cogl->wrapper));
+ clutter_actor_unmap (CLUTTER_ACTOR (stage_impl->wrapper));
XWithdrawWindow (xdisplay, stage_x11->xwin, 0);
}
@@ -614,17 +614,17 @@ meta_stage_x11_translate_event (MetaStageX11 *stage_x11,
XEvent *xevent,
ClutterEvent *event)
{
- ClutterStageCogl *stage_cogl;
+ MetaStageImpl *stage_impl;
gboolean res = FALSE;
ClutterBackendX11 *backend_x11;
ClutterStage *stage;
- stage_cogl = meta_x11_get_stage_window_from_window (xevent->xany.window);
- if (stage_cogl == NULL)
+ stage_impl = meta_x11_get_stage_window_from_window (xevent->xany.window);
+ if (stage_impl == NULL)
return FALSE;
- stage = stage_cogl->wrapper;
- backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
+ stage = stage_impl->wrapper;
+ backend_x11 = CLUTTER_BACKEND_X11 (stage_impl->backend);
switch (xevent->type)
{
@@ -737,11 +737,11 @@ meta_stage_x11_translate_event (MetaStageX11 *stage_x11,
break;
case FocusIn:
- meta_stage_set_active ((MetaStage *) stage_cogl->wrapper, TRUE);
+ meta_stage_set_active ((MetaStage *) stage_impl->wrapper, TRUE);
break;
case FocusOut:
- meta_stage_set_active ((MetaStage *) stage_cogl->wrapper, FALSE);
+ meta_stage_set_active ((MetaStage *) stage_impl->wrapper, FALSE);
break;
case Expose:
@@ -813,7 +813,7 @@ meta_x11_get_stage_window (ClutterStage *stage)
return META_STAGE_X11 (impl)->xwin;
}
-static ClutterStageCogl *
+static MetaStageImpl *
meta_x11_get_stage_window_from_window (Window win)
{
if (clutter_stages_by_xid == NULL)
@@ -826,12 +826,12 @@ meta_x11_get_stage_window_from_window (Window win)
ClutterStage *
meta_x11_get_stage_from_window (Window win)
{
- ClutterStageCogl *stage_cogl;
+ MetaStageImpl *stage_impl;
- stage_cogl = meta_x11_get_stage_window_from_window (win);
+ stage_impl = meta_x11_get_stage_window_from_window (win);
- if (stage_cogl != NULL)
- return stage_cogl->wrapper;
+ if (stage_impl != NULL)
+ return stage_impl->wrapper;
return NULL;
}
@@ -840,8 +840,8 @@ void
meta_stage_x11_set_user_time (MetaStageX11 *stage_x11,
uint32_t user_time)
{
- ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_x11);
- ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_cogl->backend);
+ MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
+ ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (stage_impl->backend);
set_user_time (backend_x11, stage_x11, user_time);
}
diff --git a/src/backends/x11/meta-stage-x11.h b/src/backends/x11/meta-stage-x11.h
index bcfc536e43..21389093e1 100644
--- a/src/backends/x11/meta-stage-x11.h
+++ b/src/backends/x11/meta-stage-x11.h
@@ -50,7 +50,7 @@ typedef enum
struct _MetaStageX11
{
- ClutterStageCogl parent_instance;
+ MetaStageImpl parent_instance;
MetaBackend *backend;
@@ -72,7 +72,7 @@ struct _MetaStageX11
struct _MetaStageX11Class
{
- ClutterStageCoglClass parent_class;
+ MetaStageImplClass parent_class;
};
CLUTTER_EXPORT
diff --git a/src/backends/x11/nested/meta-stage-x11-nested.c b/src/backends/x11/nested/meta-stage-x11-nested.c
index 7a6c14a09f..b8c1c48cc2 100644
--- a/src/backends/x11/nested/meta-stage-x11-nested.c
+++ b/src/backends/x11/nested/meta-stage-x11-nested.c
@@ -55,7 +55,7 @@ G_DEFINE_TYPE_WITH_CODE (MetaStageX11Nested, meta_stage_x11_nested,
typedef struct _MetaStageX11View
{
CoglTexture *texture;
- ClutterStageViewCogl *view;
+ MetaStageView *view;
} MetaStageX11NestedView;
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]