mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
kms: move Cogl*EGL typedefs to cogl-winsys-egl-private.h
So that the various internal Cogl*EGL typedefs can be available to cogl-winsys-kms.c this moves them into cogl-winsys-egl-private.h Reviewed-by: Rob Bradford <rob@linux.intel.com>
This commit is contained in:
parent
1b54c8023e
commit
607bfec48d
@ -27,6 +27,94 @@
|
|||||||
#include "cogl-defines.h"
|
#include "cogl-defines.h"
|
||||||
#include "cogl-winsys-private.h"
|
#include "cogl-winsys-private.h"
|
||||||
#include "cogl-context.h"
|
#include "cogl-context.h"
|
||||||
|
#include "cogl-winsys-kms.h"
|
||||||
|
|
||||||
|
typedef enum _CoglEGLWinsysFeature
|
||||||
|
{
|
||||||
|
COGL_EGL_WINSYS_FEATURE_SWAP_REGION =1L<<0,
|
||||||
|
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP =1L<<1,
|
||||||
|
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_WAYLAND_BUFFER =1L<<2
|
||||||
|
} CoglEGLWinsysFeature;
|
||||||
|
|
||||||
|
typedef struct _CoglRendererEGL
|
||||||
|
{
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
||||||
|
CoglXlibRenderer _parent;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CoglEGLWinsysFeature private_features;
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
|
||||||
|
struct wl_display *wayland_display;
|
||||||
|
struct wl_compositor *wayland_compositor;
|
||||||
|
struct wl_shell *wayland_shell;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EGLDisplay edpy;
|
||||||
|
|
||||||
|
EGLint egl_version_major;
|
||||||
|
EGLint egl_version_minor;
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT
|
||||||
|
gboolean gdl_initialized;
|
||||||
|
#endif
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
||||||
|
CoglRendererKMS kms_renderer;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Function pointers for GLX specific extensions */
|
||||||
|
#define COGL_WINSYS_FEATURE_BEGIN(a, b, c, d)
|
||||||
|
|
||||||
|
#define COGL_WINSYS_FEATURE_FUNCTION(ret, name, args) \
|
||||||
|
ret (APIENTRY * pf_ ## name) args;
|
||||||
|
|
||||||
|
#define COGL_WINSYS_FEATURE_END()
|
||||||
|
|
||||||
|
#include "cogl-winsys-egl-feature-functions.h"
|
||||||
|
|
||||||
|
#undef COGL_WINSYS_FEATURE_BEGIN
|
||||||
|
#undef COGL_WINSYS_FEATURE_FUNCTION
|
||||||
|
#undef COGL_WINSYS_FEATURE_END
|
||||||
|
} CoglRendererEGL;
|
||||||
|
|
||||||
|
typedef struct _CoglDisplayEGL
|
||||||
|
{
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
||||||
|
CoglXlibDisplay _parent;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EGLContext egl_context;
|
||||||
|
#if defined (COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT)
|
||||||
|
EGLSurface dummy_surface;
|
||||||
|
#elif defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
|
||||||
|
struct wl_surface *wayland_surface;
|
||||||
|
struct wl_egl_window *wayland_egl_native_window;
|
||||||
|
EGLSurface dummy_surface;
|
||||||
|
#elif defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \
|
||||||
|
defined (COGL_HAS_EGL_PLATFORM_GDL_SUPPORT) || \
|
||||||
|
defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) || \
|
||||||
|
defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT)
|
||||||
|
#ifndef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
||||||
|
EGLSurface egl_surface;
|
||||||
|
#else
|
||||||
|
CoglDisplayKMS kms_display;
|
||||||
|
#endif
|
||||||
|
int egl_surface_width;
|
||||||
|
int egl_surface_height;
|
||||||
|
gboolean have_onscreen;
|
||||||
|
#else
|
||||||
|
#error "Unknown EGL platform"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
EGLConfig egl_config;
|
||||||
|
gboolean found_egl_config;
|
||||||
|
gboolean stencil_disabled;
|
||||||
|
} CoglDisplayEGL;
|
||||||
|
|
||||||
|
typedef struct _CoglContextEGL
|
||||||
|
{
|
||||||
|
EGLSurface current_surface;
|
||||||
|
} CoglContextEGL;
|
||||||
|
|
||||||
const CoglWinsysVtable *
|
const CoglWinsysVtable *
|
||||||
_cogl_winsys_egl_get_vtable (void);
|
_cogl_winsys_egl_get_vtable (void);
|
||||||
|
@ -82,93 +82,6 @@
|
|||||||
|
|
||||||
#define MAX_EGL_CONFIG_ATTRIBS 30
|
#define MAX_EGL_CONFIG_ATTRIBS 30
|
||||||
|
|
||||||
typedef enum _CoglEGLWinsysFeature
|
|
||||||
{
|
|
||||||
COGL_EGL_WINSYS_FEATURE_SWAP_REGION =1L<<0,
|
|
||||||
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP =1L<<1,
|
|
||||||
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_WAYLAND_BUFFER =1L<<2
|
|
||||||
} CoglEGLWinsysFeature;
|
|
||||||
|
|
||||||
typedef struct _CoglRendererEGL
|
|
||||||
{
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
|
||||||
CoglXlibRenderer _parent;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
CoglEGLWinsysFeature private_features;
|
|
||||||
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
|
|
||||||
struct wl_display *wayland_display;
|
|
||||||
struct wl_compositor *wayland_compositor;
|
|
||||||
struct wl_shell *wayland_shell;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EGLDisplay edpy;
|
|
||||||
|
|
||||||
EGLint egl_version_major;
|
|
||||||
EGLint egl_version_minor;
|
|
||||||
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT
|
|
||||||
gboolean gdl_initialized;
|
|
||||||
#endif
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
|
||||||
CoglRendererKMS kms_renderer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Function pointers for GLX specific extensions */
|
|
||||||
#define COGL_WINSYS_FEATURE_BEGIN(a, b, c, d)
|
|
||||||
|
|
||||||
#define COGL_WINSYS_FEATURE_FUNCTION(ret, name, args) \
|
|
||||||
ret (APIENTRY * pf_ ## name) args;
|
|
||||||
|
|
||||||
#define COGL_WINSYS_FEATURE_END()
|
|
||||||
|
|
||||||
#include "cogl-winsys-egl-feature-functions.h"
|
|
||||||
|
|
||||||
#undef COGL_WINSYS_FEATURE_BEGIN
|
|
||||||
#undef COGL_WINSYS_FEATURE_FUNCTION
|
|
||||||
#undef COGL_WINSYS_FEATURE_END
|
|
||||||
} CoglRendererEGL;
|
|
||||||
|
|
||||||
typedef struct _CoglDisplayEGL
|
|
||||||
{
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
|
||||||
CoglXlibDisplay _parent;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EGLContext egl_context;
|
|
||||||
#if defined (COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT)
|
|
||||||
EGLSurface dummy_surface;
|
|
||||||
#elif defined (COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT)
|
|
||||||
struct wl_surface *wayland_surface;
|
|
||||||
struct wl_egl_window *wayland_egl_native_window;
|
|
||||||
EGLSurface dummy_surface;
|
|
||||||
#elif defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT) || \
|
|
||||||
defined (COGL_HAS_EGL_PLATFORM_GDL_SUPPORT) || \
|
|
||||||
defined (COGL_HAS_EGL_PLATFORM_ANDROID_SUPPORT) || \
|
|
||||||
defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT)
|
|
||||||
#ifndef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
|
||||||
EGLSurface egl_surface;
|
|
||||||
#else
|
|
||||||
CoglDisplayKMS kms_display;
|
|
||||||
#endif
|
|
||||||
int egl_surface_width;
|
|
||||||
int egl_surface_height;
|
|
||||||
gboolean have_onscreen;
|
|
||||||
#else
|
|
||||||
#error "Unknown EGL platform"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
EGLConfig egl_config;
|
|
||||||
gboolean found_egl_config;
|
|
||||||
gboolean stencil_disabled;
|
|
||||||
} CoglDisplayEGL;
|
|
||||||
|
|
||||||
typedef struct _CoglContextEGL
|
|
||||||
{
|
|
||||||
EGLSurface current_surface;
|
|
||||||
} CoglContextEGL;
|
|
||||||
|
|
||||||
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
|
||||||
typedef struct _CoglOnscreenXlib
|
typedef struct _CoglOnscreenXlib
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user