work towards consistent platform file/symbol naming

we've got into a bit of a mess with how we name platform specific
symbols and files, so this is a first pass at trying to tidy that up.

All platform specific symbols should be named like
cogl_<platform>_symbol_name and similarly files should be named like
cogl-<platform>-filename.c

This patch tackles the X11 specific renderer/display APIs as a start.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-06-28 14:16:24 +01:00
parent 3b64a439f0
commit 89562dda73
16 changed files with 277 additions and 241 deletions

View File

@ -309,15 +309,18 @@ cogl_sources_c = \
$(NULL)
if SUPPORT_XLIB
cogl_public_h += \
$(srcdir)/cogl-xlib-renderer.h
cogl_experimental_h += \
$(srcdir)/winsys/cogl-texture-pixmap-x11.h \
$(srcdir)/cogl-xlib.h
cogl_sources_c += \
$(srcdir)/cogl-renderer-x11-private.h \
$(srcdir)/cogl-renderer-xlib-private.h \
$(srcdir)/cogl-renderer-xlib.c \
$(srcdir)/cogl-display-xlib-private.h \
$(srcdir)/cogl-x11-renderer-private.h \
$(srcdir)/cogl-xlib-renderer-private.h \
$(srcdir)/cogl-xlib-renderer.c \
$(srcdir)/cogl-xlib-display-private.h \
$(srcdir)/cogl-xlib.c \
$(srcdir)/cogl-xlib-private.h \
$(srcdir)/winsys/cogl-texture-pixmap-x11.c \
@ -325,8 +328,8 @@ cogl_sources_c += \
endif
if SUPPORT_GLX
cogl_sources_c += \
$(srcdir)/cogl-renderer-glx-private.h \
$(srcdir)/cogl-display-glx-private.h \
$(srcdir)/cogl-glx-renderer-private.h \
$(srcdir)/cogl-glx-display-private.h \
$(srcdir)/winsys/cogl-winsys-glx-feature-functions.h \
$(srcdir)/winsys/cogl-winsys-glx.c
endif

View File

@ -26,7 +26,7 @@
#define __COGL_DISPLAY_GLX_PRIVATE_H
#include "cogl-object-private.h"
#include "cogl-display-xlib-private.h"
#include "cogl-xlib-display-private.h"
typedef struct _CoglGLXCachedConfig
{
@ -39,9 +39,9 @@ typedef struct _CoglGLXCachedConfig
#define COGL_GLX_N_CACHED_CONFIGS 3
typedef struct _CoglDisplayGLX
typedef struct _CoglGLXDisplay
{
CoglDisplayXlib _parent;
CoglXlibDisplay _parent;
CoglGLXCachedConfig glx_cached_configs[COGL_GLX_N_CACHED_CONFIGS];
@ -52,6 +52,6 @@ typedef struct _CoglDisplayGLX
/* Single context for all wins */
GLXContext glx_context;
GLXWindow dummy_glxwin;
} CoglDisplayGLX;
} CoglGLXDisplay;
#endif /* __COGL_DISPLAY_GLX_PRIVATE_H */

View File

@ -26,11 +26,11 @@
#define __COGL_RENDERER_GLX_PRIVATE_H
#include "cogl-object-private.h"
#include "cogl-renderer-xlib-private.h"
#include "cogl-xlib-renderer-private.h"
typedef struct _CoglRendererGLX
typedef struct _CoglGLXRenderer
{
CoglRendererXlib _parent;
CoglXlibRenderer _parent;
int glx_major;
int glx_minor;
@ -56,6 +56,6 @@ typedef struct _CoglRendererGLX
#undef COGL_WINSYS_FEATURE_BEGIN
#undef COGL_WINSYS_FEATURE_FUNCTION
#undef COGL_WINSYS_FEATURE_END
} CoglRendererGLX;
} CoglGLXRenderer;
#endif /* __COGL_RENDERER_GLX_PRIVATE_H */

View File

@ -123,7 +123,7 @@ cogl_renderer_new (void)
#if COGL_HAS_XLIB_SUPPORT
void
cogl_renderer_xlib_set_foreign_display (CoglRenderer *renderer,
cogl_xlib_renderer_set_foreign_display (CoglRenderer *renderer,
Display *xdisplay)
{
g_return_if_fail (cogl_is_renderer (renderer));
@ -135,7 +135,7 @@ cogl_renderer_xlib_set_foreign_display (CoglRenderer *renderer,
}
Display *
cogl_renderer_xlib_get_foreign_display (CoglRenderer *renderer)
cogl_xlib_renderer_get_foreign_display (CoglRenderer *renderer)
{
g_return_val_if_fail (cogl_is_renderer (renderer), NULL);

View File

@ -33,10 +33,6 @@
#include <cogl/cogl-types.h>
#include <cogl/cogl-onscreen-template.h>
#ifdef COGL_HAS_XLIB
#include <X11/Xlib.h>
#endif
#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
#include <wayland-client.h>
#endif
@ -122,97 +118,6 @@ cogl_renderer_set_winsys_id (CoglRenderer *renderer,
CoglWinsysID
cogl_renderer_get_winsys_id (CoglRenderer *renderer);
#ifdef COGL_HAS_XLIB
#define cogl_xlib_renderer_handle_event \
cogl_xlib_renderer_handle_event_EXP
/*
* cogl_xlib_renderer_handle_event:
* @event: pointer to an XEvent structure
*
* This function processes a single event; it can be used to hook into
* external event retrieval (for example that done by Clutter or
* GDK).
*
* Return value: #CoglFilterReturn. %COGL_FILTER_REMOVE indicates that
* Cogl has internally handled the event and the caller should do no
* further processing. %COGL_FILTER_CONTINUE indicates that Cogl is
* either not interested in the event, or has used the event to update
* internal state without taking any exclusive action.
*/
CoglFilterReturn
cogl_xlib_renderer_handle_event (CoglRenderer *renderer,
XEvent *event);
/*
* CoglXlibFilterFunc:
* @event: pointer to an XEvent structure
* @data: The data that was given when the filter was added
*
* A callback function that can be registered with
* cogl_xlib_renderer_add_filter(). The function should return
* %COGL_FILTER_REMOVE if it wants to prevent further processing or
* %COGL_FILTER_CONTINUE otherwise.
*/
typedef CoglFilterReturn (* CoglXlibFilterFunc) (XEvent *event,
void *data);
#define cogl_xlib_renderer_add_filter cogl_xlib_renderer_add_filter_EXP
/*
* cogl_xlib_renderer_add_filter:
*
* Adds a callback function that will receive all native events. The
* function can stop further processing of the event by return
* %COGL_FILTER_REMOVE.
*/
void
cogl_xlib_renderer_add_filter (CoglRenderer *renderer,
CoglXlibFilterFunc func,
void *data);
#define cogl_xlib_renderer_remove_filter \
cogl_xlib_renderer_remove_filter_EXP
/*
* cogl_xlib_renderer_remove_filter:
*
* Removes a callback that was previously added with
* cogl_xlib_renderer_add_filter().
*/
void
cogl_xlib_renderer_remove_filter (CoglRenderer *renderer,
CoglXlibFilterFunc func,
void *data);
#define cogl_renderer_xlib_get_foreign_display \
cogl_renderer_xlib_get_foreign_display_EXP
/*
* cogl_renderer_xlib_get_foreign_display:
*
* Return value: the foreign Xlib display that will be used by any Xlib based
* winsys backend. The display needs to be set with
* cogl_renderer_xlib_set_foreign_display() before this function is called.
*/
Display *
cogl_renderer_xlib_get_foreign_display (CoglRenderer *renderer);
#define cogl_renderer_xlib_set_foreign_display \
cogl_renderer_xlib_set_foreign_display_EXP
/*
* cogl_renderer_xlib_set_foreign_display:
*
* Sets a foreign Xlib display that Cogl will use for and Xlib based winsys
* backend.
*/
void
cogl_renderer_xlib_set_foreign_display (CoglRenderer *renderer,
Display *display);
#define cogl_renderer_xlib_get_display cogl_renderer_xlib_get_display_EXP
Display *
cogl_renderer_xlib_get_display (CoglRenderer *renderer);
#endif /* COGL_HAS_XLIB */
#if COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
#define cogl_renderer_wayland_set_foreign_display \
cogl_renderer_wayland_set_foreign_display_EXP

View File

@ -24,9 +24,9 @@
#ifndef __COGL_RENDERER_X11_PRIVATE_H
#define __COGL_RENDERER_X11_PRIVATE_H
typedef struct _CoglRendererX11
typedef struct _CoglX11Renderer
{
int damage_base;
} CoglRendererX11;
} CoglX11Renderer;
#endif /* __COGL_RENDERER_X11_PRIVATE_H */

View File

@ -27,9 +27,9 @@
#include <X11/Xlib.h>
typedef struct _CoglDisplayXlib
typedef struct _CoglXlibDisplay
{
Window dummy_xwin;
} CoglDisplayXlib;
} CoglXlibDisplay;
#endif /* __COGL_DISPLAY_XLIB_PRIVATE_H */

View File

@ -26,52 +26,52 @@
#include "cogl-object-private.h"
#include "cogl-xlib-private.h"
#include "cogl-renderer-x11-private.h"
#include "cogl-x11-renderer-private.h"
typedef struct _CoglRendererXlib
typedef struct _CoglXlibRenderer
{
CoglRendererX11 _parent;
CoglX11Renderer _parent;
Display *xdpy;
/* Current top of the XError trap state stack. The actual memory for
these is expected to be allocated on the stack by the caller */
CoglXlibTrapState *trap_state;
} CoglRendererXlib;
} CoglXlibRenderer;
gboolean
_cogl_renderer_xlib_connect (CoglRenderer *renderer, GError **error);
_cogl_xlib_renderer_connect (CoglRenderer *renderer, GError **error);
void
_cogl_renderer_xlib_disconnect (CoglRenderer *renderer);
_cogl_xlib_renderer_disconnect (CoglRenderer *renderer);
/*
* cogl_renderer_xlib_trap_errors:
* cogl_xlib_renderer_trap_errors:
* @state: A temporary place to store data for the trap.
*
* Traps every X error until _cogl_renderer_xlib_untrap_errors()
* Traps every X error until _cogl_xlib_renderer_untrap_errors()
* called. You should allocate an uninitialised CoglXlibTrapState
* struct on the stack to pass to this function. The same pointer
* should later be passed to _cogl_renderer_xlib_untrap_errors().
* should later be passed to _cogl_xlib_renderer_untrap_errors().
*
* Calls to _cogl_renderer_xlib_trap_errors() can be nested as long as
* _cogl_renderer_xlib_untrap_errors() is called with the
* Calls to _cogl_xlib_renderer_trap_errors() can be nested as long as
* _cogl_xlib_renderer_untrap_errors() is called with the
* corresponding state pointers in reverse order.
*/
void
_cogl_renderer_xlib_trap_errors (CoglRenderer *renderer,
_cogl_xlib_renderer_trap_errors (CoglRenderer *renderer,
CoglXlibTrapState *state);
/*
* cogl_renderer_xlib_untrap_errors:
* @state: The state that was passed to _cogl_renderer_xlib_trap_errors().
* cogl_xlib_renderer_untrap_errors:
* @state: The state that was passed to _cogl_xlib_renderer_trap_errors().
*
* Removes the X error trap and returns the current status.
*
* Return value: the trapped error code, or 0 for success
*/
int
_cogl_renderer_xlib_untrap_errors (CoglRenderer *renderer,
_cogl_xlib_renderer_untrap_errors (CoglRenderer *renderer,
CoglXlibTrapState *state);
#endif /* __COGL_RENDERER_XLIB_PRIVATE_H */

View File

@ -33,8 +33,8 @@
#include "cogl-object.h"
#include "cogl-renderer-private.h"
#include "cogl-renderer-xlib-private.h"
#include "cogl-renderer-x11-private.h"
#include "cogl-xlib-renderer-private.h"
#include "cogl-x11-renderer-private.h"
#include "cogl-winsys-private.h"
#include <X11/Xlib.h>
@ -69,7 +69,7 @@ get_renderer_for_xdisplay (Display *xdpy)
for (l = _cogl_xlib_renderers; l; l = l->next)
{
CoglRenderer *renderer = l->data;
CoglRendererXlib *xlib_renderer = renderer->winsys;
CoglXlibRenderer *xlib_renderer = renderer->winsys;
if (xlib_renderer->xdpy == xdpy)
return renderer;
@ -83,7 +83,7 @@ error_handler (Display *xdpy,
XErrorEvent *error)
{
CoglRenderer *renderer;
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
renderer = get_renderer_for_xdisplay (xdpy);
@ -96,10 +96,10 @@ error_handler (Display *xdpy,
}
void
_cogl_renderer_xlib_trap_errors (CoglRenderer *renderer,
_cogl_xlib_renderer_trap_errors (CoglRenderer *renderer,
CoglXlibTrapState *state)
{
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
xlib_renderer = renderer->winsys;
@ -111,10 +111,10 @@ _cogl_renderer_xlib_trap_errors (CoglRenderer *renderer,
}
int
_cogl_renderer_xlib_untrap_errors (CoglRenderer *renderer,
_cogl_xlib_renderer_untrap_errors (CoglRenderer *renderer,
CoglXlibTrapState *state)
{
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
xlib_renderer = renderer->winsys;
g_assert (state == xlib_renderer->trap_state);
@ -129,8 +129,8 @@ _cogl_renderer_xlib_untrap_errors (CoglRenderer *renderer,
static Display *
assert_xlib_display (CoglRenderer *renderer, GError **error)
{
Display *xdpy = cogl_renderer_xlib_get_foreign_display (renderer);
CoglRendererXlib *xlib_renderer = renderer->winsys;
Display *xdpy = cogl_xlib_renderer_get_foreign_display (renderer);
CoglXlibRenderer *xlib_renderer = renderer->winsys;
/* A foreign display may have already been set... */
if (xdpy)
@ -154,10 +154,10 @@ assert_xlib_display (CoglRenderer *renderer, GError **error)
}
gboolean
_cogl_renderer_xlib_connect (CoglRenderer *renderer, GError **error)
_cogl_xlib_renderer_connect (CoglRenderer *renderer, GError **error)
{
CoglRendererXlib *xlib_renderer = renderer->winsys;
CoglRendererX11 *x11_renderer = renderer->winsys;
CoglXlibRenderer *xlib_renderer = renderer->winsys;
CoglX11Renderer *x11_renderer = renderer->winsys;
int damage_error;
if (!assert_xlib_display (renderer, error))
@ -177,9 +177,9 @@ _cogl_renderer_xlib_connect (CoglRenderer *renderer, GError **error)
}
void
_cogl_renderer_xlib_disconnect (CoglRenderer *renderer)
_cogl_xlib_renderer_disconnect (CoglRenderer *renderer)
{
CoglRendererXlib *xlib_renderer = renderer->winsys;
CoglXlibRenderer *xlib_renderer = renderer->winsys;
if (!renderer->foreign_xdpy)
XCloseDisplay (xlib_renderer->xdpy);
@ -188,9 +188,9 @@ _cogl_renderer_xlib_disconnect (CoglRenderer *renderer)
}
Display *
cogl_renderer_xlib_get_display (CoglRenderer *renderer)
cogl_xlib_renderer_get_display (CoglRenderer *renderer)
{
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
g_return_val_if_fail (cogl_is_renderer (renderer), NULL);

127
cogl/cogl-xlib-renderer.h Normal file
View File

@ -0,0 +1,127 @@
/*
* Cogl
*
* An object oriented GL/GLES Abstraction/Utility Layer
*
* Copyright (C) 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, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL_XLIB_RENDERER_H__
#define __COGL_XLIB_RENDERER_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-renderer.h>
#include <X11/Xlib.h>
G_BEGIN_DECLS
#define cogl_xlib_renderer_handle_event \
cogl_xlib_renderer_handle_event_EXP
/*
* cogl_xlib_renderer_handle_event:
* @event: pointer to an XEvent structure
*
* This function processes a single event; it can be used to hook into
* external event retrieval (for example that done by Clutter or
* GDK).
*
* Return value: #CoglFilterReturn. %COGL_FILTER_REMOVE indicates that
* Cogl has internally handled the event and the caller should do no
* further processing. %COGL_FILTER_CONTINUE indicates that Cogl is
* either not interested in the event, or has used the event to update
* internal state without taking any exclusive action.
*/
CoglFilterReturn
cogl_xlib_renderer_handle_event (CoglRenderer *renderer,
XEvent *event);
/*
* CoglXlibFilterFunc:
* @event: pointer to an XEvent structure
* @data: The data that was given when the filter was added
*
* A callback function that can be registered with
* cogl_xlib_renderer_add_filter(). The function should return
* %COGL_FILTER_REMOVE if it wants to prevent further processing or
* %COGL_FILTER_CONTINUE otherwise.
*/
typedef CoglFilterReturn (* CoglXlibFilterFunc) (XEvent *event,
void *data);
#define cogl_xlib_renderer_add_filter cogl_xlib_renderer_add_filter_EXP
/*
* cogl_xlib_renderer_add_filter:
*
* Adds a callback function that will receive all native events. The
* function can stop further processing of the event by return
* %COGL_FILTER_REMOVE.
*/
void
cogl_xlib_renderer_add_filter (CoglRenderer *renderer,
CoglXlibFilterFunc func,
void *data);
#define cogl_xlib_renderer_remove_filter \
cogl_xlib_renderer_remove_filter_EXP
/*
* cogl_xlib_renderer_remove_filter:
*
* Removes a callback that was previously added with
* cogl_xlib_renderer_add_filter().
*/
void
cogl_xlib_renderer_remove_filter (CoglRenderer *renderer,
CoglXlibFilterFunc func,
void *data);
#define cogl_xlib_renderer_get_foreign_display \
cogl_xlib_renderer_get_foreign_display_EXP
/*
* cogl_xlib_renderer_get_foreign_display:
*
* Return value: the foreign Xlib display that will be used by any Xlib based
* winsys backend. The display needs to be set with
* cogl_xlib_renderer_set_foreign_display() before this function is called.
*/
Display *
cogl_xlib_renderer_get_foreign_display (CoglRenderer *renderer);
#define cogl_xlib_renderer_set_foreign_display \
cogl_xlib_renderer_set_foreign_display_EXP
/*
* cogl_xlib_renderer_set_foreign_display:
*
* Sets a foreign Xlib display that Cogl will use for and Xlib based winsys
* backend.
*/
void
cogl_xlib_renderer_set_foreign_display (CoglRenderer *renderer,
Display *display);
#define cogl_xlib_renderer_get_display cogl_xlib_renderer_get_display_EXP
Display *
cogl_xlib_renderer_get_display (CoglRenderer *renderer);
G_END_DECLS
#endif /* __COGL_XLIB_RENDERER_H__ */

View File

@ -36,7 +36,7 @@
#include <cogl-framebuffer-private.h>
#include <cogl-display-private.h>
#include <cogl-renderer-private.h>
#include <cogl-renderer-xlib-private.h>
#include <cogl-xlib-renderer-private.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xdamage.h>
@ -45,7 +45,7 @@
/* FIXME: when we remove the last X11 based Clutter backend then we
* will get rid of these functions and instead rely on the equivalent
* _cogl_renderer_xlib API
* _cogl_xlib_renderer API
*/
/* This can't be in the Cogl context because it can be set before
@ -57,7 +57,7 @@ cogl_xlib_get_display (void)
{
_COGL_GET_CONTEXT (ctx, NULL);
return cogl_renderer_xlib_get_display (ctx->display->renderer);
return cogl_xlib_renderer_get_display (ctx->display->renderer);
}
void
@ -98,7 +98,7 @@ _cogl_xlib_query_damage_extension (void)
int
_cogl_xlib_get_damage_base (void)
{
CoglRendererX11 *x11_renderer;
CoglX11Renderer *x11_renderer;
_COGL_GET_CONTEXT (ctxt, -1);
x11_renderer = ctxt->display->renderer->winsys;

View File

@ -91,6 +91,7 @@ typedef struct _CoglFramebuffer CoglFramebuffer;
#include <cogl/cogl-framebuffer.h>
#ifdef COGL_HAS_XLIB
#include <cogl/cogl-xlib.h>
#include <cogl/cogl-xlib-renderer.h>
#endif
/* XXX: This will definitly go away once all the Clutter winsys
* code has been migrated down into Cogl! */

View File

@ -39,8 +39,8 @@
#include "cogl-renderer-private.h"
#include "cogl-onscreen-template-private.h"
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
#include "cogl-renderer-xlib-private.h"
#include "cogl-display-xlib-private.h"
#include "cogl-xlib-renderer-private.h"
#include "cogl-xlib-display-private.h"
#endif
#ifdef COGL_HAS_XLIB_SUPPORT
@ -82,7 +82,7 @@ typedef enum _CoglEGLWinsysFeature
typedef struct _CoglRendererEGL
{
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglRendererXlib _parent;
CoglXlibRenderer _parent;
#endif
CoglEGLWinsysFeature private_features;
@ -120,7 +120,7 @@ typedef struct _CoglRendererEGL
typedef struct _CoglDisplayEGL
{
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglDisplayXlib _parent;
CoglXlibDisplay _parent;
#endif
EGLContext egl_context;
@ -286,7 +286,7 @@ _cogl_winsys_renderer_disconnect (CoglRenderer *renderer)
#endif
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
_cogl_renderer_xlib_disconnect (renderer);
_cogl_xlib_renderer_disconnect (renderer);
#endif
eglTerminate (egl_renderer->edpy);
@ -368,7 +368,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
{
CoglRendererEGL *egl_renderer;
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
#endif
EGLBoolean status;
#ifdef COGL_HAS_EGL_PLATFORM_GDL_SUPPORT
@ -382,7 +382,7 @@ _cogl_winsys_renderer_connect (CoglRenderer *renderer,
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
xlib_renderer = renderer->winsys;
if (!_cogl_renderer_xlib_connect (renderer, error))
if (!_cogl_xlib_renderer_connect (renderer, error))
goto error;
egl_renderer->edpy =
@ -537,7 +537,7 @@ update_winsys_features (CoglContext *context)
static XVisualInfo *
get_visual_info (CoglDisplay *display, EGLConfig egl_config)
{
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
CoglRendererEGL *egl_renderer = display->renderer->winsys;
XVisualInfo visinfo_template;
int template_mask = 0;
@ -591,8 +591,8 @@ try_create_context (CoglDisplay *display,
{
CoglDisplayEGL *egl_display = display->winsys;
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglDisplayXlib *xlib_display = display->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglXlibDisplay *xlib_display = display->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
#endif
CoglRendererEGL *egl_renderer = display->renderer->winsys;
EGLDisplay edpy;
@ -892,8 +892,8 @@ cleanup_context (CoglDisplay *display)
CoglDisplayEGL *egl_display = display->winsys;
CoglRendererEGL *egl_renderer = display->renderer->winsys;
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglDisplayXlib *xlib_display = display->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglXlibDisplay *xlib_display = display->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
#endif
if (egl_display->egl_context != EGL_NO_CONTEXT)
@ -1137,7 +1137,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
CoglDisplayEGL *egl_display = display->winsys;
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglRendererEGL *egl_renderer = display->renderer->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen;
Window xwin;
#endif
@ -1171,10 +1171,10 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
xwin = onscreen->foreign_xid;
_cogl_renderer_xlib_trap_errors (display->renderer, &state);
_cogl_xlib_renderer_trap_errors (display->renderer, &state);
status = XGetWindowAttributes (xlib_renderer->xdpy, xwin, &attr);
xerror = _cogl_renderer_xlib_untrap_errors (display->renderer, &state);
xerror = _cogl_xlib_renderer_untrap_errors (display->renderer, &state);
if (status == 0 || xerror)
{
char message[1000];
@ -1208,7 +1208,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
width = cogl_framebuffer_get_width (framebuffer);
height = cogl_framebuffer_get_height (framebuffer);
_cogl_renderer_xlib_trap_errors (display->renderer, &state);
_cogl_xlib_renderer_trap_errors (display->renderer, &state);
xvisinfo = get_visual_info (display, egl_display->egl_config);
if (xvisinfo == NULL)
@ -1246,7 +1246,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
XFree (xvisinfo);
XSync (xlib_renderer->xdpy, False);
xerror = _cogl_renderer_xlib_untrap_errors (display->renderer, &state);
xerror = _cogl_xlib_renderer_untrap_errors (display->renderer, &state);
if (xerror)
{
char message[1000];
@ -1341,7 +1341,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglXlibTrapState old_state;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
#elif defined (COGL_HAS_EGL_PLATFORM_POWERVR_NULL_SUPPORT)
@ -1367,7 +1367,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
#endif
#ifdef COGL_HAS_EGL_PLATFORM_POWERVR_X11_SUPPORT
_cogl_renderer_xlib_trap_errors (context->display->renderer, &old_state);
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
if (!xlib_onscreen->is_foreign_xwin && xlib_onscreen->xwin != None)
{
@ -1379,7 +1379,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
XSync (xlib_renderer->xdpy, False);
if (_cogl_renderer_xlib_untrap_errors (context->display->renderer,
if (_cogl_xlib_renderer_untrap_errors (context->display->renderer,
&old_state) != Success)
g_warning ("X Error while destroying X window");
#endif
@ -1467,7 +1467,7 @@ _cogl_winsys_onscreen_set_visibility (CoglOnscreen *onscreen,
gboolean visibility)
{
CoglContext *context = COGL_FRAMEBUFFER (onscreen)->context;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
if (visibility)

View File

@ -36,10 +36,10 @@
#include "cogl-framebuffer.h"
#include "cogl-swap-chain-private.h"
#include "cogl-renderer-private.h"
#include "cogl-renderer-glx-private.h"
#include "cogl-glx-renderer-private.h"
#include "cogl-onscreen-template-private.h"
#include "cogl-display-xlib-private.h"
#include "cogl-display-glx-private.h"
#include "cogl-xlib-display-private.h"
#include "cogl-glx-display-private.h"
#include "cogl-private.h"
#include "cogl-texture-2d-private.h"
#include "cogl-texture-rectangle-private.h"
@ -112,7 +112,7 @@ typedef struct _CoglTexturePixmapGLX
static const CoglFeatureFunction \
cogl_glx_feature_ ## name ## _funcs[] = {
#define COGL_WINSYS_FEATURE_FUNCTION(ret, name, args) \
{ G_STRINGIFY (name), G_STRUCT_OFFSET (CoglRendererGLX, pf_ ## name) },
{ G_STRINGIFY (name), G_STRUCT_OFFSET (CoglGLXRenderer, pf_ ## name) },
#define COGL_WINSYS_FEATURE_END() \
{ NULL, 0 }, \
};
@ -224,7 +224,7 @@ glx_event_filter_cb (XEvent *xevent, void *data)
{
CoglContext *context = data;
#ifdef GLX_INTEL_swap_event
CoglRendererGLX *glx_renderer;
CoglGLXRenderer *glx_renderer;
#endif
if (xevent->type == ConfigureNotify)
@ -265,24 +265,24 @@ glx_event_filter_cb (XEvent *xevent, void *data)
static void
_cogl_winsys_renderer_disconnect (CoglRenderer *renderer)
{
_cogl_renderer_xlib_disconnect (renderer);
_cogl_xlib_renderer_disconnect (renderer);
g_slice_free (CoglRendererGLX, renderer->winsys);
g_slice_free (CoglGLXRenderer, renderer->winsys);
}
static gboolean
_cogl_winsys_renderer_connect (CoglRenderer *renderer,
GError **error)
{
CoglRendererGLX *glx_renderer;
CoglRendererXlib *xlib_renderer;
CoglGLXRenderer *glx_renderer;
CoglXlibRenderer *xlib_renderer;
renderer->winsys = g_slice_new0 (CoglRendererGLX);
renderer->winsys = g_slice_new0 (CoglGLXRenderer);
glx_renderer = renderer->winsys;
xlib_renderer = renderer->winsys;
if (!_cogl_renderer_xlib_connect (renderer, error))
if (!_cogl_xlib_renderer_connect (renderer, error))
goto error;
if (!glXQueryExtension (xlib_renderer->xdpy,
@ -321,9 +321,9 @@ error:
static void
update_winsys_features (CoglContext *context)
{
CoglDisplayGLX *glx_display = context->display->winsys;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglRendererGLX *glx_renderer = context->display->renderer->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
const char *glx_extensions;
int i;
@ -406,7 +406,7 @@ find_fbconfig (CoglDisplay *display,
GLXFBConfig *config_ret,
GError **error)
{
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
GLXFBConfig *configs = NULL;
int n_configs, i;
static const int attributes[] = {
@ -479,10 +479,10 @@ done:
static gboolean
create_context (CoglDisplay *display, GError **error)
{
CoglDisplayGLX *glx_display = display->winsys;
CoglDisplayXlib *xlib_display = display->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglRendererGLX *glx_renderer = display->renderer->winsys;
CoglGLXDisplay *glx_display = display->winsys;
CoglXlibDisplay *xlib_display = display->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
CoglGLXRenderer *glx_renderer = display->renderer->winsys;
gboolean support_transparent_windows;
GLXFBConfig config;
GError *fbconfig_error = NULL;
@ -552,7 +552,7 @@ create_context (CoglDisplay *display, GError **error)
return FALSE;
}
_cogl_renderer_xlib_trap_errors (display->renderer, &old_state);
_cogl_xlib_renderer_trap_errors (display->renderer, &old_state);
attrs.override_redirect = True;
attrs.colormap = XCreateColormap (xlib_renderer->xdpy,
@ -598,7 +598,7 @@ create_context (CoglDisplay *display, GError **error)
XFree (xvisinfo);
if (_cogl_renderer_xlib_untrap_errors (display->renderer, &old_state))
if (_cogl_xlib_renderer_untrap_errors (display->renderer, &old_state))
{
g_set_error (error, COGL_WINSYS_ERROR,
COGL_WINSYS_ERROR_CREATE_CONTEXT,
@ -612,9 +612,9 @@ create_context (CoglDisplay *display, GError **error)
static void
_cogl_winsys_display_destroy (CoglDisplay *display)
{
CoglDisplayGLX *glx_display = display->winsys;
CoglDisplayXlib *xlib_display = display->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglGLXDisplay *glx_display = display->winsys;
CoglXlibDisplay *xlib_display = display->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
g_return_if_fail (glx_display != NULL);
@ -637,7 +637,7 @@ _cogl_winsys_display_destroy (CoglDisplay *display)
xlib_display->dummy_xwin = None;
}
g_slice_free (CoglDisplayGLX, display->winsys);
g_slice_free (CoglGLXDisplay, display->winsys);
display->winsys = NULL;
}
@ -645,12 +645,12 @@ static gboolean
_cogl_winsys_display_setup (CoglDisplay *display,
GError **error)
{
CoglDisplayGLX *glx_display;
CoglGLXDisplay *glx_display;
int i;
g_return_val_if_fail (display->winsys == NULL, FALSE);
glx_display = g_slice_new0 (CoglDisplayGLX);
glx_display = g_slice_new0 (CoglGLXDisplay);
display->winsys = glx_display;
if (!create_context (display, error))
@ -695,9 +695,9 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
CoglDisplay *display = context->display;
CoglDisplayGLX *glx_display = display->winsys;
CoglRendererXlib *xlib_renderer = display->renderer->winsys;
CoglRendererGLX *glx_renderer = display->renderer->winsys;
CoglGLXDisplay *glx_display = display->winsys;
CoglXlibRenderer *xlib_renderer = display->renderer->winsys;
CoglGLXRenderer *glx_renderer = display->renderer->winsys;
Window xwin;
CoglOnscreenXlib *xlib_onscreen;
CoglOnscreenGLX *glx_onscreen;
@ -722,11 +722,11 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
xwin = onscreen->foreign_xid;
_cogl_renderer_xlib_trap_errors (display->renderer, &state);
_cogl_xlib_renderer_trap_errors (display->renderer, &state);
status = XGetWindowAttributes (xlib_renderer->xdpy, xwin, &attr);
XSync (xlib_renderer->xdpy, False);
xerror = _cogl_renderer_xlib_untrap_errors (display->renderer, &state);
xerror = _cogl_xlib_renderer_untrap_errors (display->renderer, &state);
if (status == 0 || xerror)
{
char message[1000];
@ -759,7 +759,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
width = cogl_framebuffer_get_width (framebuffer);
height = cogl_framebuffer_get_height (framebuffer);
_cogl_renderer_xlib_trap_errors (display->renderer, &state);
_cogl_xlib_renderer_trap_errors (display->renderer, &state);
xvisinfo = glXGetVisualFromFBConfig (xlib_renderer->xdpy,
glx_display->fbconfig);
@ -798,7 +798,7 @@ _cogl_winsys_onscreen_init (CoglOnscreen *onscreen,
XFree (xvisinfo);
XSync (xlib_renderer->xdpy, False);
xerror = _cogl_renderer_xlib_untrap_errors (display->renderer, &state);
xerror = _cogl_xlib_renderer_untrap_errors (display->renderer, &state);
if (xerror)
{
char message[1000];
@ -855,7 +855,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglXlibTrapState old_state;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
@ -864,7 +864,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
if (glx_onscreen == NULL)
return;
_cogl_renderer_xlib_trap_errors (context->display->renderer, &old_state);
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
if (glx_onscreen->glxwin != None)
{
@ -882,7 +882,7 @@ _cogl_winsys_onscreen_deinit (CoglOnscreen *onscreen)
XSync (xlib_renderer->xdpy, False);
_cogl_renderer_xlib_untrap_errors (context->display->renderer, &old_state);
_cogl_xlib_renderer_untrap_errors (context->display->renderer, &old_state);
g_slice_free (CoglOnscreenGLX, onscreen->winsys);
onscreen->winsys = NULL;
@ -893,10 +893,10 @@ _cogl_winsys_onscreen_bind (CoglOnscreen *onscreen)
{
CoglContext *context = COGL_FRAMEBUFFER (onscreen)->context;
CoglContextGLX *glx_context = context->winsys;
CoglDisplayXlib *xlib_display = context->display->winsys;
CoglDisplayGLX *glx_display = context->display->winsys;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglRendererGLX *glx_renderer = context->display->renderer->winsys;
CoglXlibDisplay *xlib_display = context->display->winsys;
CoglGLXDisplay *glx_display = context->display->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
CoglXlibTrapState old_state;
@ -911,7 +911,7 @@ _cogl_winsys_onscreen_bind (CoglOnscreen *onscreen)
if (glx_context->current_drawable == drawable)
return;
_cogl_renderer_xlib_trap_errors (context->display->renderer, &old_state);
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
glXMakeContextCurrent (xlib_renderer->xdpy,
drawable, drawable,
@ -925,7 +925,7 @@ _cogl_winsys_onscreen_bind (CoglOnscreen *onscreen)
if (glx_context->current_drawable == drawable)
return;
_cogl_renderer_xlib_trap_errors (context->display->renderer, &old_state);
_cogl_xlib_renderer_trap_errors (context->display->renderer, &old_state);
COGL_NOTE (WINSYS,
"MakeContextCurrent dpy: %p, window: 0x%x (%s), context: %p",
@ -972,7 +972,7 @@ _cogl_winsys_onscreen_bind (CoglOnscreen *onscreen)
/* FIXME: We should be reporting a GError here
*/
if (_cogl_renderer_xlib_untrap_errors (context->display->renderer,
if (_cogl_xlib_renderer_untrap_errors (context->display->renderer,
&old_state))
{
g_warning ("X Error received while making drawable 0x%08lX current",
@ -1004,7 +1004,7 @@ drm_wait_vblank (int fd, drm_wait_vblank_t *vbl)
static void
_cogl_winsys_wait_for_vblank (void)
{
CoglRendererGLX *glx_renderer;
CoglGLXRenderer *glx_renderer;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -1037,7 +1037,7 @@ static guint32
_cogl_winsys_get_vsync_counter (void)
{
guint32 video_sync_count;
CoglRendererGLX *glx_renderer;
CoglGLXRenderer *glx_renderer;
_COGL_GET_CONTEXT (ctx, 0);
@ -1055,8 +1055,8 @@ _cogl_winsys_onscreen_swap_region (CoglOnscreen *onscreen,
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglRendererGLX *glx_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
GLXDrawable drawable =
@ -1186,8 +1186,8 @@ _cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen)
{
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *context = framebuffer->context;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglRendererGLX *glx_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglGLXRenderer *glx_renderer = context->display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
CoglOnscreenGLX *glx_onscreen = onscreen->winsys;
gboolean have_counter;
@ -1326,7 +1326,7 @@ _cogl_winsys_onscreen_set_visibility (CoglOnscreen *onscreen,
gboolean visibility)
{
CoglContext *context = COGL_FRAMEBUFFER (onscreen)->context;
CoglRendererXlib *xlib_renderer = context->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = context->display->renderer->winsys;
CoglOnscreenXlib *xlib_onscreen = onscreen->winsys;
if (visibility)
@ -1339,8 +1339,8 @@ _cogl_winsys_onscreen_set_visibility (CoglOnscreen *onscreen,
static XVisualInfo *
_cogl_winsys_xlib_get_visual_info (void)
{
CoglDisplayGLX *glx_display;
CoglRendererXlib *xlib_renderer;
CoglGLXDisplay *glx_display;
CoglXlibRenderer *xlib_renderer;
_COGL_GET_CONTEXT (ctx, NULL);
@ -1361,8 +1361,8 @@ get_fbconfig_for_depth (CoglContext *context,
GLXFBConfig *fbconfig_ret,
gboolean *can_mipmap_ret)
{
CoglRendererXlib *xlib_renderer;
CoglDisplayGLX *glx_display;
CoglXlibRenderer *xlib_renderer;
CoglGLXDisplay *glx_display;
Display *dpy;
GLXFBConfig *fbconfigs;
int n_elements, i;
@ -1547,7 +1547,7 @@ try_create_glx_pixmap (CoglContext *context,
{
CoglTexturePixmapGLX *glx_tex_pixmap = tex_pixmap->winsys;
CoglRenderer *renderer;
CoglRendererXlib *xlib_renderer;
CoglXlibRenderer *xlib_renderer;
Display *dpy;
/* We have to initialize this *opaque* variable because gcc tries to
* be too smart for its own good and warns that the variable may be
@ -1604,7 +1604,7 @@ try_create_glx_pixmap (CoglContext *context,
* upset if you try to create two GLXPixmaps for the same drawable.
*/
_cogl_renderer_xlib_trap_errors (renderer, &trap_state);
_cogl_xlib_renderer_trap_errors (renderer, &trap_state);
glx_tex_pixmap->glx_pixmap = glXCreatePixmap (dpy,
fb_config,
@ -1614,13 +1614,13 @@ try_create_glx_pixmap (CoglContext *context,
XSync (dpy, False);
if (_cogl_renderer_xlib_untrap_errors (renderer, &trap_state))
if (_cogl_xlib_renderer_untrap_errors (renderer, &trap_state))
{
COGL_NOTE (TEXTURE_PIXMAP, "Failed to create pixmap for %p", tex_pixmap);
_cogl_renderer_xlib_trap_errors (renderer, &trap_state);
_cogl_xlib_renderer_trap_errors (renderer, &trap_state);
glXDestroyPixmap (dpy, glx_tex_pixmap->glx_pixmap);
XSync (dpy, False);
_cogl_renderer_xlib_untrap_errors (renderer, &trap_state);
_cogl_xlib_renderer_untrap_errors (renderer, &trap_state);
glx_tex_pixmap->glx_pixmap = None;
return FALSE;
@ -1673,8 +1673,8 @@ free_glx_pixmap (CoglContext *context,
{
CoglXlibTrapState trap_state;
CoglRenderer *renderer;
CoglRendererXlib *xlib_renderer;
CoglRendererGLX *glx_renderer;
CoglXlibRenderer *xlib_renderer;
CoglGLXRenderer *glx_renderer;
renderer = context->display->renderer;
xlib_renderer = renderer->winsys;
@ -1701,10 +1701,10 @@ free_glx_pixmap (CoglContext *context,
* for reference, see:
* http://bugzilla.clutter-project.org/show_bug.cgi?id=2324
*/
_cogl_renderer_xlib_trap_errors (renderer, &trap_state);
_cogl_xlib_renderer_trap_errors (renderer, &trap_state);
glXDestroyPixmap (xlib_renderer->xdpy, glx_tex_pixmap->glx_pixmap);
XSync (xlib_renderer->xdpy, False);
_cogl_renderer_xlib_untrap_errors (renderer, &trap_state);
_cogl_xlib_renderer_untrap_errors (renderer, &trap_state);
glx_tex_pixmap->glx_pixmap = None;
glx_tex_pixmap->pixmap_bound = FALSE;
@ -1738,7 +1738,7 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
gboolean needs_mipmap)
{
CoglTexturePixmapGLX *glx_tex_pixmap = tex_pixmap->winsys;
CoglRendererGLX *glx_renderer;
CoglGLXRenderer *glx_renderer;
/* FIXME: It should be possible to get to a CoglContext from any CoglTexture
* pointer. */
@ -1837,7 +1837,7 @@ _cogl_winsys_texture_pixmap_x11_update (CoglTexturePixmapX11 *tex_pixmap,
if (glx_tex_pixmap->bind_tex_image_queued)
{
GLuint gl_handle, gl_target;
CoglRendererXlib *xlib_renderer = ctx->display->renderer->winsys;
CoglXlibRenderer *xlib_renderer = ctx->display->renderer->winsys;
cogl_texture_get_gl_texture (glx_tex_pixmap->glx_tex,
&gl_handle, &gl_target);

View File

@ -17,8 +17,8 @@ cogl_renderer_new
cogl_renderer_connect
<SUBSECTION>
cogl_renderer_xlib_set_foreign_display
cogl_renderer_xlib_get_foreign_display
cogl_xlib_renderer_set_foreign_display
cogl_xlib_renderer_get_foreign_display
<SUBSECTION>
CoglXlibFilterFunc

View File

@ -71,7 +71,7 @@ main (int argc, char **argv)
renderer = cogl_renderer_new ();
/* FIXME: This should conceptually be part of the configuration of
* a renderer. */
cogl_renderer_xlib_set_foreign_display (renderer, xdpy);
cogl_xlib_renderer_set_foreign_display (renderer, xdpy);
if (!cogl_renderer_connect (renderer, &error))
{
fprintf (stderr, "Failed to connect to a renderer: %s\n",