cex100: drop GDL support

This commit is contained in:
Ray Strode 2016-01-12 11:32:15 -05:00 committed by Rui Matos
parent 8f205d76e1
commit 6d0829b0d2
7 changed files with 0 additions and 430 deletions

1
.gitignore vendored
View File

@ -24,7 +24,6 @@ tags
/clutter/clutter-version.h
/clutter/gcov-report.txt
/clutter/clutter-json.h
/clutter/cex100/clutter-cex100.h
/clutter/*.log
/clutter/*.trs
/clutter-lcov.info

View File

@ -179,9 +179,6 @@ Clutter has additional command line options for the configure script:
--enable-wayland-backend=[yes/no]
Enable the Wayland client backend. (default=no) [EXPERIMENTAL]
--enable-cex100-backend=[yes/no]
Enable the CEx100 platform backend. (default=no) [EXPERIMENTAL]
--enable-egl-backend=[yes/no]
Enable the EGL framebuffer backend. (default=no)

View File

@ -563,30 +563,6 @@ backend_source_c += evdev/clutter-xkb-utils.c
backend_source_h_priv += evdev/clutter-xkb-utils.h
endif
cex_source_h_priv = cex100/clutter-backend-cex100.h
cex_source_c = cex100/clutter-backend-cex100.c
cex_h = cex100/clutter-cex100.h
BUILT_SOURCES += $(cex_h)
EXTRA_DIST += $(srcdir)/$(cex_h).in
if SUPPORT_CEX100
backend_source_h += $(cex_h)
backend_source_c += $(cex_source_c)
backend_source_h_priv += $(cex_source_h_priv)
cluttercex100_includedir = $(clutter_includedir)/cex100
cluttercex100_include_HEADERS = $(cex_h)
clutter-cex100-$(CLUTTER_API_VERSION).pc: clutter-$(CLUTTER_API_VERSION).pc
$(QUIET_GEN)cp -f $< $(@F)
pc_files += clutter-cex100-$(CLUTTER_API_VERSION).pc
compat_libs += \
libclutter-cex100-$(CLUTTER_API_VERSION).so \
$(NULL)
endif # SUPPORT_CEX100
# EGL backend rules
egl_source_h = \
egl/clutter-egl-headers.h \

View File

@ -1,214 +0,0 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2010,2011 Intel Corporation.
* 2011 Giovanni Campagna <scampa.giovanni@gmail.com>
*
* 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:
* Matthew Allum
* Emmanuele Bassi
* Robert Bragg
* Neil Roberts
*/
#include "config.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include "clutter-backend-eglnative.h"
/* This is a Cogl based backend */
#include "cogl/clutter-stage-cogl.h"
#ifdef HAVE_EVDEV
#include "clutter-device-manager-evdev.h"
#endif
#include "clutter-debug.h"
#include "clutter-private.h"
#include "clutter-main.h"
#include "clutter-stage-private.h"
#ifdef COGL_HAS_EGL_SUPPORT
#include "clutter-egl.h"
#endif
#include "clutter-cex100.h"
static gdl_plane_id_t gdl_plane = GDL_PLANE_ID_UPP_C;
static guint gdl_n_buffers = CLUTTER_CEX100_TRIPLE_BUFFERING;
#define clutter_backend_cex100_get_type _clutter_backend_cex100_get_type
G_DEFINE_TYPE (ClutterBackendCex100, clutter_backend_cex100, CLUTTER_TYPE_BACKEND);
static void
clutter_backend_cex100_dispose (GObject *gobject)
{
ClutterBackendCex100 *backend_cex100 = CLUTTER_BACKEND_CEX100 (gobject);
if (backend_cex100->event_timer != NULL)
{
g_timer_destroy (backend_cex100->event_timer);
backend_cex100->event_timer = NULL;
}
G_OBJECT_CLASS (clutter_backend_cex100_parent_class)->dispose (gobject);
}
static CoglDisplay *
clutter_backend_cex100_get_display (ClutterBackend *backend,
CoglRenderer *renderer,
CoglSwapChain *swap_chain,
GError **error)
{
CoglOnscreenTemplate *onscreen_template = NULL;
CoglDisplay *display;
swap_chain = cogl_swap_chain_new ();
#if defined(COGL_HAS_GDL_SUPPORT)
cogl_swap_chain_set_length (swap_chain, gdl_n_buffers);
#endif
onscreen_template = cogl_onscreen_template_new (swap_chain);
/* XXX: I have some doubts that this is a good design.
* Conceptually should we be able to check an onscreen_template
* without more details about the CoglDisplay configuration?
*/
if (!cogl_renderer_check_onscreen_template (renderer,
onscreen_template,
error))
goto error;
display = cogl_display_new (renderer, onscreen_template);
#if defined(COGL_HAS_GDL_SUPPORT)
cogl_gdl_display_set_plane (cogl_display, gdl_plane);
#endif
return display;
}
static void
clutter_backend_cex100_class_init (ClutterBackendCex100Class *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
ClutterBackendClass *backend_class = CLUTTER_BACKEND_CLASS (klass);
gobject_class->dispose = clutter_backend_cex100_dispose;
backend_class->stage_window_type = CLUTTER_TYPE_STAGE_COGL;
backend_class->get_display = clutter_backend_cex100_get_display;
}
static void
clutter_backend_cex100_init (ClutterBackendCex100 *backend_cex100)
{
backend_cex100->event_timer = g_timer_new ();
}
/**
* clutter_cex100_set_plane:
* @plane: a GDL plane
*
* Intel CE3100 and CE4100 have several planes (frame buffers) and a
* hardware blender to blend the planes togeteher and produce the final
* image.
*
* clutter_cex100_set_plane() let's you configure the GDL plane where
* the stage will be drawn. By default Clutter will pick UPP_C
* (GDL_PLANE_ID_UPP_C).
*
* This function has to be called before clutter_init().
*
* Since: 1.6
*/
void
clutter_cex100_set_plane (gdl_plane_id_t plane)
{
g_return_if_fail (plane >= GDL_PLANE_ID_UPP_A && plane <= GDL_PLANE_ID_UPP_E);
gdl_plane = plane;
}
/**
* clutter_cex100_set_buffering_mode:
* @mode: a #ClutterCex100BufferingMode
*
* Configure the buffering mode of the underlying GDL plane. The GDL
* surface used by Clutter to draw can be backed up by either one or two
* back buffers thus being double or triple buffered, respectively.
*
* Clutter defaults to %CLUTTER_CEX100_TRIPLE_BUFFERING.
*
* This function has to be called before clutter_init().
*
* Since: 1.6
*/
void
clutter_cex100_set_buffering_mode (ClutterCex100BufferingMode mode)
{
g_return_if_fail (mode == CLUTTER_CEX100_DOUBLE_BUFFERING ||
mode == CLUTTER_CEX100_TRIPLE_BUFFERING);
gdl_n_buffers = mode;
}
/**
* clutter_cex100_get_egl_display:
*
* Retrieves the EGL display used by Clutter, if it supports the
* EGL windowing system and if it is running using an EGL backend.
*
* Return value: the EGL display used by Clutter, or 0
*
* Since: 1.10
*/
EGLDisplay
clutter_cex100_get_egl_display (void)
{
ClutterBackend *backend;
if (!_clutter_context_is_initialized ())
{
g_critical ("The Clutter backend has not been initialized yet");
return 0;
}
backend = clutter_get_default_backend ();
if (!CLUTTER_IS_BACKEND_CEX100 (backend))
{
g_critical ("The Clutter backend is not a CEX100 backend");
return 0;
}
#if COGL_HAS_EGL_SUPPORT
return cogl_egl_context_get_egl_display (backend->cogl_context);
#else
return 0;
#endif
}

View File

@ -1,71 +0,0 @@
/* Clutter.
* An OpenGL based 'interactive canvas' library.
*
* Copyright (C) 2006, 2007 OpenedHand
* Copyright (C) 2010 Intel Corp
* 2011 Giovanni Campagna <scampa.giovanni@gmail.com>
*
* 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:
* Matthew Allum
* Robert Bragg
*/
#ifndef __CLUTTER_BACKEND_CEX100_H__
#define __CLUTTER_BACKEND_CEX100_H__
#include <glib-object.h>
#include <clutter/clutter-event.h>
#include <clutter/clutter-backend.h>
#include <clutter/clutter-device-manager.h>
#include "clutter-backend-private.h"
G_BEGIN_DECLS
#define CLUTTER_TYPE_BACKEND_CEX100 (_clutter_backend_cex100_get_type ())
#define CLUTTER_BACKEND_CEX100(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BACKEND_CEX100, ClutterBackendCex100))
#define CLUTTER_IS_BACKEND_CEX100(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BACKEND_CEX100))
#define CLUTTER_BACKEND_CEX100_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND_CEX100, ClutterBackendCex100Class))
#define CLUTTER_IS_BACKEND_CEX100_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND_CEX100))
#define CLUTTER_BACKEND_CEX100_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND_CEX100, ClutterBackendCex100Class))
typedef struct _ClutterBackendCex100 ClutterBackendCex100;
typedef struct _ClutterBackendCex100Class ClutterBackendCex100Class;
struct _ClutterBackendCex100
{
ClutterBackend parent_instance;
/* device manager (ie evdev) */
ClutterDeviceManager *device_manager;
/* event source */
GSource *event_source;
/* event timer */
GTimer *event_timer;
};
struct _ClutterBackendCex100Class
{
ClutterBackendClass parent_class;
};
GType _clutter_backend_cex100_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* __CLUTTER_BACKEND_CEX100_H__ */

View File

@ -1,67 +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:
* Damien Lespiau <damien.lespiau@intel.com>
*/
/**
* SECTION:clutter-cex100
* @short_description: Intel CE3100, CE4100 Specific API
*
* The CEX100 backend for Clutter provides some Intel CE3100/CE4100
* specific API
*
* You need to include `clutter/cex100/clutter-cex100.h`
* to have access to the functions documented here.
*/
#ifndef __CLUTTER_CEX100_H__
#define __CLUTTER_CEX100_H__
#include <glib.h>
#include <@CLUTTER_CEX100_LIBGDL_PREFIX@libgdl.h>
G_BEGIN_DECLS
/**
* ClutterCex100BufferingMode:
* @CLUTTER_CEX100_DOUBLE_BUFFERING: The GDL plane will be double buffered
* @CLUTTER_CEX100_TRIPLE_BUFFERING: The GDL plane will be triple buffered
*
* Enum passed to clutter_cex100_set_buffering_mode().
*
* Since: 1.6
*/
typedef enum /*< prefix=CLUTTER_CEX100 >*/
{
CLUTTER_CEX100_DOUBLE_BUFFERING = 2,
CLUTTER_CEX100_TRIPLE_BUFFERING = 3
} ClutterCex100BufferingMode;
void clutter_cex100_set_plane (gdl_plane_id_t plane);
void clutter_cex100_set_buffering_mode (ClutterCex100BufferingMode mode);
EGLDisplay clutter_cex100_get_egl_display (void);
G_END_DECLS
#endif /* __CLUTTER_CEX100_H__ */

View File

@ -236,10 +236,6 @@ AC_ARG_ENABLE([egl-backend],
[AS_HELP_STRING([--enable-egl-backend=@<:@yes/no@:>@], [Enable the EGL framebuffer backend (default=no)])],
[enable_egl=$enableval],
[enable_egl=check])
AC_ARG_ENABLE([cex100-backend],
[AS_HELP_STRING([--enable-cex100-backend=@<:@yes/no@:>@], [Enable the CEx100 backend (default=no)])],
[enable_cex100=$enableval],
[enable_cex100=no])
dnl Additional input backends
AC_ARG_ENABLE([tslib-input],
@ -378,39 +374,6 @@ AS_IF([test "x$enable_wayland_compositor" = "xyes"],
AM_CONDITIONAL(SUPPORT_WAYLAND_COMPOSITOR, [test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"])
AS_IF([test "x$enable_cex100" = "xyes"],
[
CLUTTER_BACKENDS="$CLUTTER_BACKENDS cex100"
experimental_backend="yes"
SUPPORT_CEX100=1
SUPPORT_COGL=1
have_gdl=no
AC_CHECK_HEADERS([libgdl.h], [have_gdl=yes])
AS_IF([test "x$have_gdl" = "xno"],
[
AC_CHECK_HEADERS([CE4100/libgdl.h],
[
FLAVOUR_CFLAGS="-I/usr/include/CE4100"
have_gdl=yes
CLUTTER_CEX100_LIBGDL_PREFIX=CE4100/
])
])
AS_IF([test "x$have_gdl" = "xno"],
[AC_MSG_ERROR([libgdl.h not found but the CEx100 backend has been explicitly enabled])])
AC_SUBST(CLUTTER_CEX100_LIBGDL_PREFIX)
FLAVOUR_LIBS="$FLAVOUR_LIBS -lgdl"
AC_DEFINE([CLUTTER_EGL_BACKEND_CEX100], [1], [Use CEX100 EGL backend])
AC_DEFINE([CLUTTER_EGL_BACKEND_GENERIC], [1], [Use Generic EGL backend])
])
AS_IF([test "x$enable_egl" = "xyes"],
[
CLUTTER_BACKENDS="$CLUTTER_BACKENDS egl"
@ -470,13 +433,11 @@ AM_CONDITIONAL(SUPPORT_X11, [test "x$SUPPORT_X11" = "x1"])
AM_CONDITIONAL(SUPPORT_GDK, [test "x$SUPPORT_GDK" = "x1"])
AM_CONDITIONAL(SUPPORT_EGL, [test "x$SUPPORT_EGL" = "x1"])
AM_CONDITIONAL(SUPPORT_OSX, [test "x$SUPPORT_OSX" = "x1"])
AM_CONDITIONAL(SUPPORT_CEX100, [test "x$SUPPORT_CEX100" = "x1"])
AM_CONDITIONAL(SUPPORT_WAYLAND, [test "x$SUPPORT_WAYLAND" = "x1"])
AM_CONDITIONAL(USE_COGL, [test "x$SUPPORT_COGL" = "x1"])
AM_CONDITIONAL(USE_TSLIB, [test "x$have_tslib" = "xyes"])
AM_CONDITIONAL(USE_EVDEV, [test "x$have_evdev" = "xyes"])
AM_CONDITIONAL(USE_GLD, [test "x$have_gdl" = "xyes"])
AM_CONDITIONAL(NEED_XKB_UTILS, [test "x$have_evdev" = "xyes" -o "x$SUPPORT_WAYLAND" = "x1"])
@ -527,9 +488,6 @@ AS_IF([test "x$SUPPORT_OSX" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_OSX \"osx\"
#define CLUTTER_INPUT_OSX \"osx\""])
AS_IF([test "x$SUPPORT_CEX100" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_WINDOWING_CEX100 \"cex100\""])
AS_IF([test "x$SUPPORT_EVDEV" = "x1"],
[CLUTTER_CONFIG_DEFINES="$CLUTTER_CONFIG_DEFINES
#define CLUTTER_INPUT_EVDEV \"evdev\""])
@ -1101,8 +1059,6 @@ AC_CONFIG_FILES([
clutter/cally/cally-$CLUTTER_API_VERSION.pc:clutter/cally/cally.pc.in
clutter/cex100/clutter-cex100.h
tests/Makefile
tests/accessibility/Makefile
tests/conform/Makefile
@ -1189,12 +1145,6 @@ echo " - X11 backend options:"
echo " Enabled extensions: ${X11_EXTS}"
fi
if test "x$SUPPORT_CEX100" = "x1"; then
echo ""
echo " - CEx100 backend options (WARNING: Experimental):"
echo " libGDL include prefix: ${CLUTTER_CEX100_LIBGDL_PREFIX}"
fi
if test "x$SUPPORT_WAYLAND_COMPOSITOR" = "x1"; then
echo ""
echo " - Wayland compositor support enabled (WARNING: Experimental)"