[clutter/clutter-1.24] Don't create the Cogl GLib source multiple times
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.24] Don't create the Cogl GLib source multiple times
- Date: Thu, 30 Jun 2016 15:10:20 +0000 (UTC)
commit d77109f7fdfc56a8e13b70eebbf1c1425eec8903
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Jun 29 17:03:46 2016 -0400
Don't create the Cogl GLib source multiple times
Since the check for backend->cogl_context was accidentally moved
to clutter_backend_do_real_create_context, the Glib source that
is created at the end of clutter_backend_do_create_context() is
created and added each time create_context() is called, though
create_context() is supposed to be idempotent.
https://bugzilla.gnome.org/show_bug.cgi?id=768243
clutter/clutter-backend.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
index 91bda83..a05805a 100644
--- a/clutter/clutter-backend.c
+++ b/clutter/clutter-backend.c
@@ -253,9 +253,6 @@ clutter_backend_do_real_create_context (ClutterBackend *backend,
CoglSwapChain *swap_chain;
GError *internal_error;
- if (backend->cogl_context != NULL)
- return TRUE;
-
klass = CLUTTER_BACKEND_GET_CLASS (backend);
swap_chain = NULL;
@@ -378,6 +375,9 @@ clutter_backend_real_create_context (ClutterBackend *backend,
GError *internal_error = NULL;
int i;
+ if (backend->cogl_context != NULL)
+ return TRUE;
+
for (i = 0; i < G_N_ELEMENTS (known_drivers); i++)
{
CLUTTER_NOTE (BACKEND, "Checking for the %s driver", known_drivers[i].driver_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]