2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/glx/clutter-backend-glx.c:
	(clutter_backend_glx_get_features): Assert if we don't have a
	GL context here or if it's not matched to a drawable. Asserting
	might seem too drastic, but if we don't have a valid GL context
	here then Clutter will segfault anyway, and I'll take an assert()
	over a hard to read, deep in GLX guts backtrace any day (and
	twice on a monday).

	* clutter/x11/clutter-backend-x11.c:
	(clutter_backend_x11_get_features): No need for a variable here.
This commit is contained in:
Emmanuele Bassi 2008-04-03 03:04:41 +00:00
parent c158a93a84
commit 6fa02d3aa0
3 changed files with 19 additions and 8 deletions

View File

@ -1,3 +1,16 @@
2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/glx/clutter-backend-glx.c:
(clutter_backend_glx_get_features): Assert if we don't have a
GL context here or if it's not matched to a drawable. Asserting
might seem too drastic, but if we don't have a valid GL context
here then Clutter will segfault anyway, and I'll take an assert()
over a hard to read, deep in GLX guts backtrace any day (and
twice on a monday).
* clutter/x11/clutter-backend-x11.c:
(clutter_backend_x11_get_features): No need for a variable here.
2008-04-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-backend.c:

View File

@ -216,7 +216,11 @@ clutter_backend_glx_get_features (ClutterBackend *backend)
const gchar *glx_extensions = NULL;
ClutterFeatureFlags flags = CLUTTER_FEATURE_STAGE_MULTIPLE;
/* FIXME: we really need to check if gl context is set */
/* this will make sure that the GL context exists and its
* bound to a drawable
*/
g_assert (backend_glx->gl_context != None);
g_assert (glXGetCurrentDrawable () != None);
CLUTTER_NOTE (BACKEND, "Checking features\n"
"GL_VENDOR: %s\n"

View File

@ -288,13 +288,7 @@ clutter_backend_x11_constructor (GType gtype,
ClutterFeatureFlags
clutter_backend_x11_get_features (ClutterBackend *backend)
{
ClutterFeatureFlags flags = 0;
/* FIXME: we really need to check if gl context is set */
flags = CLUTTER_FEATURE_STAGE_USER_RESIZE|CLUTTER_FEATURE_STAGE_CURSOR;
return flags;
return CLUTTER_FEATURE_STAGE_USER_RESIZE | CLUTTER_FEATURE_STAGE_CURSOR;
}
static void