[clutter] win32/backend: Use the default context creation
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] win32/backend: Use the default context creation
- Date: Thu, 10 Nov 2011 15:05:21 +0000 (UTC)
commit b97324ee9f8684a0388cacc2e00ea1a2da16e5cc
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Nov 4 15:57:01 2011 +0000
win32/backend: Use the default context creation
The win32 backend doesn't do anything special on context creation, so we
can just use the default implementation provided by ClutterBackend.
clutter/win32/clutter-backend-win32.c | 59 ---------------------------------
1 files changed, 0 insertions(+), 59 deletions(-)
---
diff --git a/clutter/win32/clutter-backend-win32.c b/clutter/win32/clutter-backend-win32.c
index 0444773..f403a47 100644
--- a/clutter/win32/clutter-backend-win32.c
+++ b/clutter/win32/clutter-backend-win32.c
@@ -213,64 +213,6 @@ clutter_backend_win32_get_features (ClutterBackend *backend)
return flags;
}
-static gboolean
-clutter_backend_win32_create_context (ClutterBackend *backend,
- GError **error)
-{
- CoglSwapChain *swap_chain;
- CoglOnscreenTemplate *onscreen_template;
-
- if (backend->cogl_context)
- return TRUE;
-
- backend->cogl_renderer = cogl_renderer_new ();
- if (!cogl_renderer_connect (backend->cogl_renderer, error))
- goto error;
-
- swap_chain = cogl_swap_chain_new ();
-
- onscreen_template = cogl_onscreen_template_new (swap_chain);
- cogl_object_unref (swap_chain);
-
- if (!cogl_renderer_check_onscreen_template (backend->cogl_renderer,
- onscreen_template,
- error))
- goto error;
-
- backend->cogl_display = cogl_display_new (backend->cogl_renderer,
- onscreen_template);
- cogl_object_unref (backend->cogl_renderer);
- cogl_object_unref (onscreen_template);
-
- if (!cogl_display_setup (backend->cogl_display, error))
- goto error;
-
- backend->cogl_context = cogl_context_new (backend->cogl_display, error);
- if (!backend->cogl_context)
- goto error;
-
- return TRUE;
-
-error:
- if (backend->cogl_display)
- {
- cogl_object_unref (backend->cogl_display);
- backend->cogl_display = NULL;
- }
-
- if (onscreen_template)
- cogl_object_unref (onscreen_template);
- if (swap_chain)
- cogl_object_unref (swap_chain);
-
- if (backend->cogl_renderer)
- {
- cogl_object_unref (backend->cogl_renderer);
- backend->cogl_renderer = NULL;
- }
- return FALSE;
-}
-
static ClutterStageWindow *
clutter_backend_win32_create_stage (ClutterBackend *backend,
ClutterStage *wrapper,
@@ -344,7 +286,6 @@ clutter_backend_win32_class_init (ClutterBackendWin32Class *klass)
backend_class->create_stage = clutter_backend_win32_create_stage;
backend_class->add_options = clutter_backend_win32_add_options;
backend_class->get_features = clutter_backend_win32_get_features;
- backend_class->create_context = clutter_backend_win32_create_context;
backend_class->get_device_manager = clutter_backend_win32_get_device_manager;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]