Remove cogl_context_set_default API

For cogl 2.0 we don't want to have a default context. In the meantime
we can simply assume that calling cogl_context_new() implicitly
sets that context as the default context before returning.

Signed-off-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg 2011-07-01 01:41:31 +01:00
parent 38b67e2884
commit 09e7174b1d
3 changed files with 0 additions and 17 deletions

View File

@ -498,16 +498,6 @@ _cogl_context_get_default (void)
return _context; return _context;
} }
void
cogl_set_default_context (CoglContext *context)
{
cogl_object_ref (context);
if (_context)
cogl_object_unref (_context);
_context = context;
}
#ifdef COGL_HAS_EGL_SUPPORT #ifdef COGL_HAS_EGL_SUPPORT
EGLDisplay EGLDisplay
cogl_context_egl_get_egl_display (CoglContext *context) cogl_context_egl_get_egl_display (CoglContext *context)

View File

@ -61,10 +61,6 @@ CoglContext *
cogl_context_new (CoglDisplay *display, cogl_context_new (CoglDisplay *display,
GError **error); GError **error);
#define cogl_set_default_context cogl_set_default_context_EXP
void
cogl_set_default_context (CoglContext *context);
#ifdef COGL_HAS_EGL_SUPPORT #ifdef COGL_HAS_EGL_SUPPORT
#define cogl_context_egl_get_egl_display cogl_context_egl_get_egl_display_EXP #define cogl_context_egl_get_egl_display cogl_context_egl_get_egl_display_EXP
EGLDisplay EGLDisplay

View File

@ -104,9 +104,6 @@ main (int argc, char **argv)
fprintf (stderr, "Failed to create context: %s\n", error->message); fprintf (stderr, "Failed to create context: %s\n", error->message);
return 1; return 1;
} }
/* Eventually we want to get rid of any "default context" but for now it's
* needed... */
cogl_set_default_context (ctx);
onscreen = cogl_onscreen_new (ctx, 640, 480); onscreen = cogl_onscreen_new (ctx, 640, 480);