Robert Bragg
cc4c578887
fix cogl_context_new crash if fail to connect renderer
...
If a NULL display is passed to cogl_context_new() then it has to
implicitly create a CoglRenderer and CoglDisplay and propagate any
resulting errors back to the user. Previously the implementation relied
on passing a NULL renderer to cogl_display_new() as the means for
implicitly connecting to a renderer. The problem with this though is
that cogl_display_new() isn't designed to ever return NULL but if it
failed to connect to a renderer automatically it would do and then
cogl_context_new would pass NULL to cogl_display_setup() leading to a
crash.
This patch changes the implementation of cogl_context_new() to now
explicitly create a CoglRenderer and connect to it if a NULL display is
given. This way we can easily propagate any errors. In addition
cogl_display_new has been changed to abort if it fails to implicitly
connect to a renderer due to a NULL renderer argument.
An application needing to gracefully handle problems connecting to a
renderer at runtime should manually instantiate and connect a renderer
passing a GError argument to cogl_renderer_connect.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2012-04-11 12:26:52 +01:00
..
2012-04-05 13:51:56 +01:00
2012-04-05 13:47:36 +01:00
2010-09-12 19:25:47 +01:00
2012-04-04 17:02:23 +01:00
2012-02-20 23:12:44 +00:00
2012-03-09 16:09:13 +00:00
2012-03-09 16:09:13 +00:00
2011-09-09 15:06:31 +01:00
2012-02-20 23:12:45 +00:00
2010-11-11 13:17:26 +00:00
2011-05-06 12:12:08 +01:00
2011-09-09 15:06:31 +01:00
2012-03-06 18:45:44 +00:00
2012-04-04 17:02:23 +01:00
2012-04-05 13:47:32 +01:00
2012-03-06 18:45:44 +00:00
2011-05-16 14:31:31 +01:00
2012-02-09 14:28:02 +00:00
2012-03-05 18:47:52 +00:00
2012-03-05 18:47:45 +00:00
2012-03-16 17:26:30 +00:00
2012-02-20 23:12:44 +00:00
2012-03-14 12:19:56 +00:00
2012-03-05 17:44:12 +00:00
2012-03-20 13:53:50 +00:00
2012-04-04 14:24:01 +01:00
2012-04-04 14:24:01 +01:00
2012-03-14 12:19:56 +00:00
2011-11-16 16:32:11 +00:00
2011-12-07 12:08:15 +00:00
2012-03-06 18:45:44 +00:00
2010-06-15 15:26:27 +01:00
2012-02-21 12:38:24 +00:00
2011-02-15 12:10:54 +00:00
2011-11-16 16:32:11 +00:00
2011-11-16 16:32:11 +00:00
2012-02-20 23:12:45 +00:00
2012-03-14 13:48:11 +00:00
2012-03-14 13:48:11 +00:00
2012-03-06 18:45:44 +00:00
2012-03-05 18:47:45 +00:00
2011-12-06 18:51:57 +00:00
2012-03-06 18:45:44 +00:00
2011-03-10 13:05:43 +00:00
2011-11-01 15:55:53 +00:00
2012-02-20 23:12:45 +00:00
2011-11-01 15:55:53 +00:00
2010-12-07 16:00:32 +00:00
2012-03-06 18:45:44 +00:00
2010-06-15 15:26:27 +01:00
2011-08-12 15:28:42 +01:00
2012-03-06 18:45:44 +00:00
2012-04-05 13:52:43 +01:00
2012-04-11 12:26:52 +01:00
2012-03-14 12:19:48 +00:00
2011-10-14 13:56:51 +01:00
2012-03-06 18:45:44 +00:00
2011-11-25 13:14:10 +00:00
2011-06-01 20:44:42 +01:00
2012-02-13 12:22:17 +00:00
2012-02-13 12:22:17 +00:00
2010-03-01 12:56:10 +00:00
2011-05-16 18:45:51 +01:00
2012-04-03 16:36:54 +01:00
2011-11-01 12:03:01 +00:00
2011-07-29 11:50:15 +01:00
2012-04-11 12:26:52 +01:00
2012-03-06 18:45:44 +00:00
2012-03-23 13:51:08 +00:00
2012-02-20 23:12:45 +00:00
2009-10-16 18:58:50 +01:00
2012-02-20 23:12:45 +00:00
2011-05-16 14:12:49 +01:00
2012-02-20 23:12:45 +00:00
2011-07-27 16:10:02 +01:00
2012-01-05 20:13:41 +00:00
2010-06-01 12:08:18 +01:00
2011-11-22 16:07:21 +00:00
2012-04-05 13:52:43 +01:00
2012-04-05 13:52:43 +01:00
2012-03-20 14:26:44 +00:00
2012-01-05 13:40:59 +00:00
2012-01-05 13:40:59 +00:00
2012-02-08 18:58:06 +00:00
2011-12-12 16:13:57 +00:00
2012-04-05 13:52:43 +01:00
2012-04-05 13:52:43 +01:00
2010-12-07 12:16:50 +00:00
2010-06-04 14:44:15 +01:00
2011-05-16 14:31:31 +01:00
2012-03-06 18:45:44 +00:00
2012-03-05 18:47:52 +00:00
2011-05-16 14:31:31 +01:00
2012-02-09 14:28:02 +00:00
2012-03-06 18:45:44 +00:00
2012-04-05 13:47:36 +01:00
2012-03-16 17:26:30 +00:00
2012-03-20 12:33:40 +00:00
2012-02-08 17:00:25 +00:00
2012-02-21 12:38:24 +00:00
2012-02-20 23:12:45 +00:00
2011-07-04 15:31:50 +01:00
2012-03-13 13:40:45 +00:00
2012-03-06 18:45:44 +00:00
2012-02-20 23:12:45 +00:00
2012-02-14 20:42:10 +00:00
2012-03-06 18:45:44 +00:00
2012-02-14 20:42:10 +00:00
2011-09-21 17:03:10 +01:00
2011-11-01 12:03:02 +00:00
2012-03-06 18:45:44 +00:00
2012-02-20 23:16:37 +00:00
2011-06-14 12:14:02 +01:00
2012-02-21 12:38:10 +00:00
2012-02-15 14:57:59 +00:00
2011-11-01 12:03:02 +00:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2011-05-16 13:28:17 +01:00
2012-03-06 18:45:44 +00:00
2011-11-01 12:02:59 +00:00
2012-03-15 18:57:52 +00:00
2012-03-06 18:45:44 +00:00
2011-12-06 19:02:05 +00:00
2011-07-13 12:30:07 +01:00
2012-03-06 18:45:44 +00:00
2011-07-13 12:30:07 +01:00
2012-03-06 18:45:44 +00:00
2010-12-13 17:22:57 +00:00
2012-02-20 23:12:45 +00:00
2010-12-13 17:22:57 +00:00
2012-03-06 18:45:44 +00:00
2012-04-05 13:47:36 +01:00
2012-04-05 13:47:36 +01:00
2012-04-05 13:47:36 +01:00
2012-02-20 23:16:37 +00:00
2012-04-05 13:47:36 +01:00
2012-02-20 23:12:45 +00:00
2012-04-05 13:47:36 +01:00
2012-02-20 23:16:37 +00:00
2011-12-06 19:02:06 +00:00
2011-12-06 19:02:06 +00:00
2011-12-06 18:51:57 +00:00
2012-03-06 18:45:44 +00:00
2011-12-06 19:02:06 +00:00
2011-12-06 19:02:06 +00:00
2011-12-06 19:02:06 +00:00
2012-03-06 18:45:44 +00:00
2012-02-20 23:12:45 +00:00
2010-12-13 17:22:57 +00:00
2012-03-07 15:13:29 +00:00
2010-12-13 17:28:28 +00:00
2012-03-07 15:13:29 +00:00
2012-04-05 13:47:36 +01:00
2012-02-21 12:38:24 +00:00
2012-03-05 18:47:52 +00:00
2012-03-05 18:47:45 +00:00
2012-03-05 18:47:52 +00:00
2011-03-07 13:26:19 +00:00
2012-03-06 18:45:44 +00:00
2012-01-05 13:40:10 +00:00
2012-01-24 14:04:26 +00:00
2011-11-01 12:02:59 +00:00
2012-04-04 17:02:23 +01:00
2012-04-04 17:02:23 +01:00
2012-02-09 14:28:02 +00:00
2012-02-20 23:12:44 +00:00
2012-03-20 12:41:58 +00:00
2012-03-20 12:33:40 +00:00
2010-03-25 09:33:26 +00:00
2012-03-23 13:51:08 +00:00
2012-01-16 23:27:36 +00:00
2010-09-14 12:43:17 +01:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2011-05-16 14:11:47 +01:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2011-07-01 17:52:55 +01:00
2011-11-01 12:03:02 +00:00
2010-08-12 11:54:42 +01:00
2012-02-24 14:42:31 +00:00
2012-03-06 18:45:44 +00:00
2012-02-24 14:42:31 +00:00
2012-04-05 15:35:01 +01:00
2012-04-05 13:47:36 +01:00
2012-02-20 23:12:45 +00:00
2012-03-06 18:45:44 +00:00
2012-03-16 16:41:57 +00:00
2011-12-07 14:52:48 +00:00
2011-12-06 19:02:06 +00:00
2011-12-06 19:02:06 +00:00
2012-02-13 17:29:28 +00:00
2012-02-20 23:12:45 +00:00
2011-11-01 12:03:02 +00:00
2012-01-27 17:18:32 +00:00
2012-04-04 17:02:23 +01:00
2012-01-05 20:57:52 +00:00
2011-05-05 14:46:02 +01:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2012-04-05 13:47:32 +01:00
2012-01-27 17:18:32 +00:00
2012-04-05 13:47:36 +01:00
2012-03-06 18:45:44 +00:00
2012-04-05 13:51:56 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:51:56 +01:00
2012-04-05 13:51:56 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:51:56 +01:00
2012-04-05 13:47:32 +01:00
2012-04-05 13:51:56 +01:00
2012-03-20 13:17:07 +00:00
2012-02-20 23:12:45 +00:00
2012-02-20 23:12:45 +00:00
2012-04-05 13:52:43 +01:00
2012-02-20 23:12:45 +00:00
2012-01-16 18:27:19 +00:00
2012-03-06 18:45:44 +00:00
2012-03-06 18:45:44 +00:00
2011-02-09 19:12:12 +00:00
2012-03-20 14:26:44 +00:00
2012-03-05 20:23:54 +00:00
2012-03-20 14:26:44 +00:00
2011-06-30 14:33:13 +01:00
2011-06-30 14:34:46 +01:00
2011-06-30 14:34:33 +01:00
2012-02-20 23:12:45 +00:00
2012-01-05 13:40:24 +00:00
2012-01-05 13:40:24 +00:00
2012-02-20 23:12:45 +00:00
2011-12-12 16:13:57 +00:00
2012-02-20 23:12:45 +00:00
2012-03-14 12:19:56 +00:00
2012-04-04 17:02:23 +01:00
2011-12-15 20:31:30 +08:00
2012-03-21 22:15:34 +08:00
2012-04-05 13:52:43 +01:00
2011-08-12 15:28:42 +01:00