mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 02:50:41 -05:00
Make it possible to include private cogl API from mutter
If we want to put a cogl winsys backend in mutter, that backend need to have access to the internal workings of cogl. https://bugzilla.gnome.org/show_bug.cgi?id=768976
This commit is contained in:
parent
95a68854ad
commit
e05f48fc53
1
cogl/.gitignore
vendored
1
cogl/.gitignore
vendored
@ -40,6 +40,7 @@ cogl-path-enum-types.c
|
|||||||
cogl-path-enum-types.h
|
cogl-path-enum-types.h
|
||||||
cogl-config.h
|
cogl-config.h
|
||||||
cogl-config.h.in
|
cogl-config.h.in
|
||||||
|
cogl-mutter-config.h
|
||||||
config.log
|
config.log
|
||||||
config.lt
|
config.lt
|
||||||
config.status
|
config.status
|
||||||
|
17
cogl/cogl-mutter-config.h.in
Normal file
17
cogl/cogl-mutter-config.h.in
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* Have GL for rendering */
|
||||||
|
#undef HAVE_COGL_GL
|
||||||
|
|
||||||
|
/* Have GLES 1.1 for rendering */
|
||||||
|
#undef HAVE_COGL_GLES
|
||||||
|
|
||||||
|
/* Have GLES 2.0 for rendering */
|
||||||
|
#undef HAVE_COGL_GLES2
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `ffs' function. */
|
||||||
|
#undef HAVE_FFS
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `memmem' function. */
|
||||||
|
#undef HAVE_MEMMEM
|
||||||
|
|
||||||
|
/* Whether _Static_assert can be used or not */
|
||||||
|
#undef HAVE_STATIC_ASSERT
|
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include "cogl-egl-defines.h"
|
#include "cogl-egl-defines.h"
|
||||||
|
|
||||||
#ifndef GL_OES_EGL_image
|
#if defined(GL_OES_EGL_image) && !defined(GLeglImageOES)
|
||||||
#define GLeglImageOES void *
|
#define GLeglImageOES void *
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
/* We forward declare the CoglFramebuffer type here to avoid some circular
|
/* We forward declare the CoglFramebuffer type here to avoid some circular
|
||||||
* dependency issues with the following headers.
|
* dependency issues with the following headers.
|
||||||
*/
|
*/
|
||||||
#ifdef __COGL_H_INSIDE__
|
#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API)
|
||||||
/* For the public C api we typedef interface types as void to avoid needing
|
/* For the public C api we typedef interface types as void to avoid needing
|
||||||
* lots of casting in code and instead we will rely on runtime type checking
|
* lots of casting in code and instead we will rely on runtime type checking
|
||||||
* for these objects. */
|
* for these objects. */
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(COGL_COMPILATION)
|
#if !defined(COGL_COMPILATION) && !defined(COGL_ENABLE_MUTTER_API)
|
||||||
#error "cogl-gl-header.h should only be included when compiling Cogl"
|
#error "cogl-gl-header.h should only be included when compiling Cogl"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ COGL_BEGIN_DECLS
|
|||||||
* meta-textures.</note>
|
* meta-textures.</note>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __COGL_H_INSIDE__
|
#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API)
|
||||||
/* For the public C api we typedef interface types as void to avoid needing
|
/* For the public C api we typedef interface types as void to avoid needing
|
||||||
* lots of casting in code and instead we will rely on runtime type checking
|
* lots of casting in code and instead we will rely on runtime type checking
|
||||||
* for these objects. */
|
* for these objects. */
|
||||||
|
@ -31,10 +31,16 @@
|
|||||||
#ifndef __COGL_MUTTER_H___
|
#ifndef __COGL_MUTTER_H___
|
||||||
#define __COGL_MUTTER_H___
|
#define __COGL_MUTTER_H___
|
||||||
|
|
||||||
#include <cogl/winsys/cogl-winsys-egl-kms-private.h>
|
#include "cogl-mutter-config.h"
|
||||||
#include <cogl/winsys/cogl-winsys-private.h>
|
#include "cogl-defines.h"
|
||||||
|
|
||||||
typedef const CoglWinsysVtable *(*CoglWinsysVtableGetter) (void);
|
#include <cogl/cogl-texture.h>
|
||||||
|
#include <cogl/cogl-meta-texture.h>
|
||||||
|
#include <cogl/cogl-error-private.h>
|
||||||
|
#include <cogl/cogl-renderer-private.h>
|
||||||
|
#include <cogl/winsys/cogl-winsys-egl-kms-private.h>
|
||||||
|
#include <cogl/winsys/cogl-winsys-egl-private.h>
|
||||||
|
#include <cogl/winsys/cogl-winsys-private.h>
|
||||||
|
|
||||||
void cogl_renderer_set_custom_winsys (CoglRenderer *renderer,
|
void cogl_renderer_set_custom_winsys (CoglRenderer *renderer,
|
||||||
CoglWinsysVtableGetter winsys_vtable_getter);
|
CoglWinsysVtableGetter winsys_vtable_getter);
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
/* We forward declare the CoglTexture type here to avoid some circular
|
/* We forward declare the CoglTexture type here to avoid some circular
|
||||||
* dependency issues with the following headers.
|
* dependency issues with the following headers.
|
||||||
*/
|
*/
|
||||||
#ifdef __COGL_H_INSIDE__
|
#if defined(__COGL_H_INSIDE__) && !defined(COGL_ENABLE_MUTTER_API)
|
||||||
/* For the public C api we typedef interface types as void to avoid needing
|
/* For the public C api we typedef interface types as void to avoid needing
|
||||||
* lots of casting in code and instead we will rely on runtime type checking
|
* lots of casting in code and instead we will rely on runtime type checking
|
||||||
* for these objects. */
|
* for these objects. */
|
||||||
|
@ -42,7 +42,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Double check that config.h has been included */
|
/* Double check that config.h has been included */
|
||||||
#if !defined (PACKAGE_NAME) && !defined (_COGL_IN_TEST_BITMASK)
|
#if (!defined (PACKAGE_NAME) && \
|
||||||
|
!defined (_COGL_IN_TEST_BITMASK) && \
|
||||||
|
!defined(COGL_ENABLE_MUTTER_API))
|
||||||
#error "cogl-config.h must be included before including cogl-util.h"
|
#error "cogl-config.h must be included before including cogl-util.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -44,10 +44,12 @@
|
|||||||
* so these macros are only kept for compatibility...
|
* so these macros are only kept for compatibility...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef COGL_ENABLE_MUTTER_API
|
||||||
#define COGL_FRAMEBUFFER(X) (X)
|
#define COGL_FRAMEBUFFER(X) (X)
|
||||||
#define COGL_BUFFER(X) (X)
|
#define COGL_BUFFER(X) (X)
|
||||||
#define COGL_TEXTURE(X) (X)
|
#define COGL_TEXTURE(X) (X)
|
||||||
#define COGL_META_TEXTURE(X) (X)
|
#define COGL_META_TEXTURE(X) (X)
|
||||||
#define COGL_PRIMITIVE_TEXTURE(X) (X)
|
#define COGL_PRIMITIVE_TEXTURE(X) (X)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __COGL_TYPE_CASTS_H__ */
|
#endif /* __COGL_TYPE_CASTS_H__ */
|
||||||
|
@ -190,6 +190,8 @@ typedef struct _CoglWinsysVtable
|
|||||||
|
|
||||||
} CoglWinsysVtable;
|
} CoglWinsysVtable;
|
||||||
|
|
||||||
|
typedef const CoglWinsysVtable *(*CoglWinsysVtableGetter) (void);
|
||||||
|
|
||||||
CoglBool
|
CoglBool
|
||||||
_cogl_winsys_has_feature (CoglWinsysFeature feature);
|
_cogl_winsys_has_feature (CoglWinsysFeature feature);
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ AC_CONFIG_SRCDIR(cogl/cogl.h)
|
|||||||
AC_CONFIG_AUX_DIR([build])
|
AC_CONFIG_AUX_DIR([build])
|
||||||
AC_CONFIG_MACRO_DIR([build/autotools])
|
AC_CONFIG_MACRO_DIR([build/autotools])
|
||||||
AC_CONFIG_HEADERS(cogl-config.h)
|
AC_CONFIG_HEADERS(cogl-config.h)
|
||||||
|
AC_CONFIG_HEADERS(cogl-mutter-config.h)
|
||||||
AC_GNU_SOURCE
|
AC_GNU_SOURCE
|
||||||
|
|
||||||
dnl ================================================================
|
dnl ================================================================
|
||||||
|
@ -24,6 +24,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(srcdir)/ui \
|
-I$(srcdir)/ui \
|
||||||
-I$(srcdir)/compositor \
|
-I$(srcdir)/compositor \
|
||||||
-I$(top_srcdir)/cogl \
|
-I$(top_srcdir)/cogl \
|
||||||
|
-I$(top_srcdir)/cogl/cogl \
|
||||||
|
-I$(top_srcdir)/cogl/cogl/winsys \
|
||||||
-I$(top_builddir)/cogl \
|
-I$(top_builddir)/cogl \
|
||||||
-I$(top_srcdir)/clutter \
|
-I$(top_srcdir)/clutter \
|
||||||
-I$(top_builddir)/clutter \
|
-I$(top_builddir)/clutter \
|
||||||
|
Loading…
Reference in New Issue
Block a user