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

* clutter/clutter-backend.c: Add more debug messages

	* clutter/clutter-stage.h:
	* clutter/clutter-stage.c:
	(clutter_stage_is_default): Add a function to check if the
	stage is the default one.

	* clutter/glx/clutter-backend-glx.c:
	* clutter/glx/clutter-stage-glx.c:
	* clutter/x11/clutter-stage-x11.c: Keep the stage wrapper
	and implementation flags in sync, to ensure that the GL
	context is always set.
This commit is contained in:
Emmanuele Bassi
2008-04-04 17:26:26 +00:00
parent 0d622b780a
commit 7fd5d5d10d
7 changed files with 87 additions and 23 deletions

View File

@ -189,13 +189,15 @@ _clutter_backend_ensure_context (ClutterBackend *backend,
g_return_if_fail (CLUTTER_IS_BACKEND (backend));
g_return_if_fail (CLUTTER_IS_STAGE (stage));
if (stage != current_context_stage || !CLUTTER_ACTOR_IS_REALIZED (stage))
if (current_context_stage != stage || !CLUTTER_ACTOR_IS_REALIZED (stage))
{
if (!CLUTTER_ACTOR_IS_REALIZED (stage))
{
CLUTTER_NOTE (MULTISTAGE, "Stage is not realized");
CLUTTER_NOTE (MULTISTAGE, "Stage is not realized, unsetting");
stage = NULL;
}
else
CLUTTER_NOTE (MULTISTAGE, "Setting the new stage [%p]", stage);
klass = CLUTTER_BACKEND_GET_CLASS (backend);
if (G_LIKELY (klass->ensure_context))
@ -205,13 +207,14 @@ _clutter_backend_ensure_context (ClutterBackend *backend,
* sense to clean the context but then re call with the default stage
* so at least there is some kind of context in place (as to avoid
* potential issue of GL calls with no context)
*/
*/
current_context_stage = stage;
if (stage)
CLUTTER_SET_PRIVATE_FLAGS (stage, CLUTTER_ACTOR_SYNC_MATRICES);
}
else
CLUTTER_NOTE (MULTISTAGE, "Stage is the same");
}