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
This commit is contained in:
Jonas Ådahl 2016-05-20 16:43:26 +08:00
parent c3d2352a9e
commit 14dbdfe483
9 changed files with 27 additions and 137 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -1,70 +0,0 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2010 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
* Authors:
* Adel Gadllah
*/
#ifdef HAVE_CONFIG_H
#include "clutter-build-config.h"
#endif
#include <glib.h>
#include "clutter-stage-window.h"
#include "clutter-stage-private.h"
#include "clutter-stage-eglnative.h"
#include <cogl/cogl.h>
static ClutterStageWindowIface *clutter_stage_window_parent_iface = NULL;
static void clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
#define clutter_stage_eglnative_get_type _clutter_stage_eglnative_get_type
G_DEFINE_TYPE_WITH_CODE (ClutterStageEglNative,
clutter_stage_eglnative,
CLUTTER_TYPE_STAGE_COGL,
G_IMPLEMENT_INTERFACE (CLUTTER_TYPE_STAGE_WINDOW,
clutter_stage_window_iface_init));
static gboolean
clutter_stage_eglnative_can_clip_redraws (ClutterStageWindow *stage_window)
{
return TRUE;
}
static void
clutter_stage_eglnative_class_init (ClutterStageEglNativeClass *klass)
{
}
static void
clutter_stage_eglnative_init (ClutterStageEglNative *stage_eglnative)
{
}
static void
clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
{
clutter_stage_window_parent_iface = g_type_interface_peek_parent (iface);
iface->can_clip_redraws = clutter_stage_eglnative_can_clip_redraws;
}

View File

@ -1,58 +0,0 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2010,2011 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
* Authors:
* Adel Gadllah
*/
#ifndef __CLUTTER_STAGE_EGL_NATIVE_H__
#define __CLUTTER_STAGE_EGL_NATIVE_H__
#include <glib-object.h>
#include <clutter/clutter-stage.h>
#include "cogl/clutter-stage-cogl.h"
#define CLUTTER_TYPE_STAGE_EGL_NATIVE (_clutter_stage_eglnative_get_type ())
#define CLUTTER_STAGE_EGL_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_EGL_NATIVE, ClutterStageEglNative))
#define CLUTTER_IS_STAGE_EGL_NATIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_STAGE_EGL_NATIVE))
#define CLUTTER_STAGE_EGL_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_STAGE_EGL_NATIVE, ClutterStageEglNativeClass))
#define CLUTTER_IS_STAGE_EGL_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_STAGE_EGL_NATIVE))
#define CLUTTER_STAGE_EGL_NATIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_STAGE_EGL_NATIVE, ClutterStageEglNativeClass))
typedef struct _ClutterStageEglNative ClutterStageEglNative;
typedef struct _ClutterStageEglNativeClass ClutterStageEglNativeClass;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterStageEglNative, g_object_unref)
struct _ClutterStageEglNative
{
ClutterStageCogl parent_instance;
};
struct _ClutterStageEglNativeClass
{
ClutterStageCoglClass parent_class;
};
CLUTTER_AVAILABLE_IN_MUTTER
GType _clutter_stage_eglnative_get_type (void) G_GNUC_CONST;
#endif /* __CLUTTER_STAGE_EGL_NATIVE_H__ */

View File

@ -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;
}

View File

@ -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 */