mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
egl: Fix compilation for EGL native
Some minor fixes here and there: missing include, wrongly placed #endif, unused variable warning fixes, missing #ifdef. Make ClutterStageEGL a subclass of either ClutterStageX11 or GObject depending if you compile with X11 support (EGLX) or not (native).
This commit is contained in:
parent
12a5bf2e06
commit
af983faccd
@ -38,6 +38,7 @@
|
|||||||
#include "cogl-internal.h"
|
#include "cogl-internal.h"
|
||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
#include "cogl-handle.h"
|
#include "cogl-handle.h"
|
||||||
|
#include "cogl-shader-private.h"
|
||||||
|
|
||||||
#ifndef HAVE_COGL_GLES
|
#ifndef HAVE_COGL_GLES
|
||||||
#include "cogl-program.h"
|
#include "cogl-program.h"
|
||||||
|
@ -765,7 +765,6 @@ static void
|
|||||||
_clutter_backend_egl_init (ClutterBackendEGL *backend_egl)
|
_clutter_backend_egl_init (ClutterBackendEGL *backend_egl)
|
||||||
{
|
{
|
||||||
#ifndef COGL_HAS_XLIB_SUPPORT
|
#ifndef COGL_HAS_XLIB_SUPPORT
|
||||||
ClutterBackend *backend = CLUTTER_BACKEND (backend_egl);
|
|
||||||
|
|
||||||
#ifdef HAVE_TSLIB
|
#ifdef HAVE_TSLIB
|
||||||
backend_egl->event_timer = g_timer_new ();
|
backend_egl->event_timer = g_timer_new ();
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
#ifndef __CLUTTER_STAGE_EGL_H__
|
#ifndef __CLUTTER_STAGE_EGL_H__
|
||||||
#define __CLUTTER_STAGE_EGL_H__
|
#define __CLUTTER_STAGE_EGL_H__
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <clutter/clutter-stage.h>
|
#include <clutter/clutter-stage.h>
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_X11_SUPPORT
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include "../x11/clutter-stage-x11.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "clutter-egl-headers.h"
|
#include "clutter-egl-headers.h"
|
||||||
#include "clutter-backend-egl.h"
|
#include "clutter-backend-egl.h"
|
||||||
|
|
||||||
#include "../x11/clutter-stage-x11.h"
|
|
||||||
|
|
||||||
#define CLUTTER_TYPE_STAGE_EGL (_clutter_stage_egl_get_type ())
|
#define CLUTTER_TYPE_STAGE_EGL (_clutter_stage_egl_get_type ())
|
||||||
#define CLUTTER_STAGE_EGL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_EGL, ClutterStageEGL))
|
#define CLUTTER_STAGE_EGL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_STAGE_EGL, ClutterStageEGL))
|
||||||
@ -25,14 +31,16 @@ typedef struct _ClutterStageEGLClass ClutterStageEGLClass;
|
|||||||
|
|
||||||
struct _ClutterStageEGL
|
struct _ClutterStageEGL
|
||||||
{
|
{
|
||||||
ClutterStageX11 parent_instance;
|
|
||||||
|
|
||||||
#ifdef COGL_HAS_X11_SUPPORT
|
#ifdef COGL_HAS_X11_SUPPORT
|
||||||
|
|
||||||
|
ClutterStageX11 parent_instance;
|
||||||
|
|
||||||
EGLSurface egl_surface;
|
EGLSurface egl_surface;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
GObject parent_instance;
|
||||||
|
|
||||||
/* the stage wrapper */
|
/* the stage wrapper */
|
||||||
ClutterStage *wrapper;
|
ClutterStage *wrapper;
|
||||||
|
|
||||||
@ -44,7 +52,11 @@ struct _ClutterStageEGL
|
|||||||
|
|
||||||
struct _ClutterStageEGLClass
|
struct _ClutterStageEGLClass
|
||||||
{
|
{
|
||||||
|
#ifdef COGL_HAS_X11_SUPPORT
|
||||||
ClutterStageX11Class parent_class;
|
ClutterStageX11Class parent_class;
|
||||||
|
#else
|
||||||
|
GObjectClass parent_class;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
GType _clutter_stage_egl_get_type (void) G_GNUC_CONST;
|
GType _clutter_stage_egl_get_type (void) G_GNUC_CONST;
|
||||||
|
Loading…
Reference in New Issue
Block a user