[mutter] Get rid of ClutterStageEglNative
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Get rid of ClutterStageEglNative
- Date: Wed, 20 Jul 2016 06:27:43 +0000 (UTC)
commit 14dbdfe48307cb160f6e2293f78e6a3b006dc9a1
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri May 20 16:43:26 2016 +0800
Get rid of ClutterStageEglNative
The functionality from ClutterStageEglNative (one function returning
TRUE) was moved to MetaStageWindowNative.
https://bugzilla.gnome.org/show_bug.cgi?id=768976
clutter/clutter/Makefile.am | 4 +-
clutter/clutter/clutter-mutter.h | 2 +-
clutter/clutter/clutter-stage-window.h | 1 +
clutter/clutter/cogl/clutter-stage-cogl.h | 3 +
clutter/clutter/egl/clutter-backend-eglnative.c | 2 -
clutter/clutter/egl/clutter-stage-eglnative.c | 70 -----------------------
clutter/clutter/egl/clutter-stage-eglnative.h | 58 -------------------
src/backends/native/meta-stage-native.c | 22 ++++++-
src/backends/native/meta-stage-native.h | 2 +-
9 files changed, 27 insertions(+), 137 deletions(-)
---
diff --git a/clutter/clutter/Makefile.am b/clutter/clutter/Makefile.am
index b1cbe81..b9bf68d 100644
--- a/clutter/clutter/Makefile.am
+++ b/clutter/clutter/Makefile.am
@@ -487,8 +487,8 @@ egl_source_h = \
egl/clutter-egl.h \
$(NULL)
-egl_source_h_priv = egl/clutter-backend-eglnative.h egl/clutter-stage-eglnative.h
-egl_source_c = egl/clutter-backend-eglnative.c egl/clutter-stage-eglnative.c
+egl_source_h_priv = egl/clutter-backend-eglnative.h
+egl_source_c = egl/clutter-backend-eglnative.c
wayland_compositor_source_h = \
wayland/clutter-wayland-compositor.h \
diff --git a/clutter/clutter/clutter-mutter.h b/clutter/clutter/clutter-mutter.h
index fec6214..0436631 100644
--- a/clutter/clutter/clutter-mutter.h
+++ b/clutter/clutter/clutter-mutter.h
@@ -27,7 +27,7 @@
#include "clutter-backend.h"
#include "clutter-macros.h"
-#include "egl/clutter-stage-eglnative.h"
+#include "cogl/clutter-stage-cogl.h"
#include "x11/clutter-stage-x11.h"
CLUTTER_AVAILABLE_IN_MUTTER
diff --git a/clutter/clutter/clutter-stage-window.h b/clutter/clutter/clutter-stage-window.h
index fa89825..b12c4f3 100644
--- a/clutter/clutter/clutter-stage-window.h
+++ b/clutter/clutter/clutter-stage-window.h
@@ -90,6 +90,7 @@ struct _ClutterStageWindowIface
int (* get_scale_factor) (ClutterStageWindow *stage_window);
};
+CLUTTER_AVAILABLE_IN_MUTTER
GType _clutter_stage_window_get_type (void) G_GNUC_CONST;
ClutterActor * _clutter_stage_window_get_wrapper (ClutterStageWindow *window);
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.h b/clutter/clutter/cogl/clutter-stage-cogl.h
index 8455405..16c9de8 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.h
+++ b/clutter/clutter/cogl/clutter-stage-cogl.h
@@ -23,6 +23,8 @@ G_BEGIN_DECLS
typedef struct _ClutterStageCogl ClutterStageCogl;
typedef struct _ClutterStageCoglClass ClutterStageCoglClass;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStageCogl, g_object_unref)
+
struct _ClutterStageCogl
{
GObject parent_instance;
@@ -70,6 +72,7 @@ struct _ClutterStageCoglClass
GObjectClass parent_class;
};
+CLUTTER_AVAILABLE_IN_MUTTER
GType _clutter_stage_cogl_get_type (void) G_GNUC_CONST;
G_END_DECLS
diff --git a/clutter/clutter/egl/clutter-backend-eglnative.c b/clutter/clutter/egl/clutter-backend-eglnative.c
index cbe2067..6f64379 100644
--- a/clutter/clutter/egl/clutter-backend-eglnative.c
+++ b/clutter/clutter/egl/clutter-backend-eglnative.c
@@ -53,8 +53,6 @@
#include "clutter-egl.h"
#endif
-#include "clutter-stage-eglnative.h"
-
G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND);
static void
diff --git a/src/backends/native/meta-stage-native.c b/src/backends/native/meta-stage-native.c
index 6547bb4..e7cc91a 100644
--- a/src/backends/native/meta-stage-native.c
+++ b/src/backends/native/meta-stage-native.c
@@ -28,11 +28,21 @@
struct _MetaStageNative
{
- ClutterStageEglNative parent;
+ ClutterStageCogl parent;
};
-G_DEFINE_TYPE (MetaStageNative, meta_stage_native,
- CLUTTER_TYPE_STAGE_EGL_NATIVE)
+static void
+clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (MetaStageNative, meta_stage_native,
+ CLUTTER_TYPE_STAGE_COGL,
+ G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
+ clutter_stage_window_iface_init))
+static gboolean
+meta_stage_native_can_clip_redraws (ClutterStageWindow *stage_window)
+{
+ return TRUE;
+}
static void
meta_stage_native_init (MetaStageNative *stage_native)
@@ -43,3 +53,9 @@ static void
meta_stage_native_class_init (MetaStageNativeClass *klass)
{
}
+
+static void
+clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
+{
+ iface->can_clip_redraws = meta_stage_native_can_clip_redraws;
+}
diff --git a/src/backends/native/meta-stage-native.h b/src/backends/native/meta-stage-native.h
index 7668bbf..95b8028 100644
--- a/src/backends/native/meta-stage-native.h
+++ b/src/backends/native/meta-stage-native.h
@@ -29,6 +29,6 @@
#define META_TYPE_STAGE_NATIVE (meta_stage_native_get_type ())
G_DECLARE_FINAL_TYPE (MetaStageNative, meta_stage_native,
- META, STAGE_NATIVE, ClutterStageEglNative)
+ META, STAGE_NATIVE, ClutterStageCogl)
#endif /* META_STAGE_NATIVE_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]