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

* clutter/eglnative/clutter-backend-egl.c:
	(clutter_backend_egl_redraw): Whitespace fixes.

	* clutter/eglnative/clutter-stage-egl.c:
	(clutter_stage_egl_hide): Indentation fixes.

	(clutter_stage_egl_realize): Use g_critical() to report failure,
	unset the flags and bail out instead of continuing the realization
	of the stage.
This commit is contained in:
Emmanuele Bassi 2008-04-28 09:33:38 +00:00
parent b1592629ca
commit b8827ea095
3 changed files with 34 additions and 12 deletions

View File

@ -1,3 +1,15 @@
2008-04-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/eglnative/clutter-backend-egl.c:
(clutter_backend_egl_redraw): Whitespace fixes.
* clutter/eglnative/clutter-stage-egl.c:
(clutter_stage_egl_hide): Indentation fixes.
(clutter_stage_egl_realize): Use g_critical() to report failure,
unset the flags and bail out instead of continuing the realization
of the stage.
2008-04-25 Neil Roberts <neil@o-hand.com> 2008-04-25 Neil Roberts <neil@o-hand.com>
Merged in the clutter-ivan branch which contained the new public Merged in the clutter-ivan branch which contained the new public

View File

@ -72,6 +72,7 @@ clutter_backend_egl_redraw (ClutterBackend *backend,
eglWaitNative (EGL_CORE_NATIVE_ENGINE); eglWaitNative (EGL_CORE_NATIVE_ENGINE);
clutter_actor_paint (CLUTTER_ACTOR (stage)); clutter_actor_paint (CLUTTER_ACTOR (stage));
eglWaitGL(); eglWaitGL();
eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface); eglSwapBuffers (backend_egl->edpy, stage_egl->egl_surface);
} }

View File

@ -44,6 +44,7 @@ clutter_stage_egl_hide (ClutterActor *actor)
CLUTTER_ACTOR_UNSET_FLAGS (stage_egl, CLUTTER_ACTOR_MAPPED); CLUTTER_ACTOR_UNSET_FLAGS (stage_egl, CLUTTER_ACTOR_MAPPED);
CLUTTER_ACTOR_UNSET_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_MAPPED); CLUTTER_ACTOR_UNSET_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_MAPPED);
CLUTTER_ACTOR_CLASS (clutter_stage_egl_parent_class)->hide (actor); CLUTTER_ACTOR_CLASS (clutter_stage_egl_parent_class)->hide (actor);
} }
@ -99,7 +100,11 @@ clutter_stage_egl_realize (ClutterActor *actor)
&config_count); &config_count);
if (status != EGL_TRUE) if (status != EGL_TRUE)
g_warning ("eglGetConfigs failed"); {
g_critical ("eglGetConfigs failed");
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
status = eglChooseConfig (backend_egl->edpy, status = eglChooseConfig (backend_egl->edpy,
cfg_attribs, cfg_attribs,
@ -108,7 +113,11 @@ clutter_stage_egl_realize (ClutterActor *actor)
&config_count); &config_count);
if (status != EGL_TRUE) if (status != EGL_TRUE)
g_warning ("eglChooseConfig failed"); {
g_critical ("eglChooseConfig failed");
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
if (stage_egl->egl_surface != EGL_NO_SURFACE) if (stage_egl->egl_surface != EGL_NO_SURFACE)
{ {
@ -128,8 +137,6 @@ clutter_stage_egl_realize (ClutterActor *actor)
NULL, NULL,
NULL); NULL);
if (stage_egl->egl_surface == EGL_NO_SURFACE) if (stage_egl->egl_surface == EGL_NO_SURFACE)
{ {
g_critical ("Unable to create an EGL surface"); g_critical ("Unable to create an EGL surface");
@ -175,16 +182,19 @@ clutter_stage_egl_realize (ClutterActor *actor)
CLUTTER_ACTOR_SET_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_REALIZED); CLUTTER_ACTOR_SET_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_REALIZED);
CLUTTER_ACTOR_SET_FLAGS (stage_egl, CLUTTER_ACTOR_REALIZED); CLUTTER_ACTOR_SET_FLAGS (stage_egl, CLUTTER_ACTOR_REALIZED);
/* eglnative can have only one stage */
/* eglnative can have only one context */
status = eglMakeCurrent (backend_egl->edpy, status = eglMakeCurrent (backend_egl->edpy,
stage_egl->egl_surface, stage_egl->egl_surface,
stage_egl->egl_surface, stage_egl->egl_surface,
backend_egl->egl_context); backend_egl->egl_context);
if (status != EGL_TRUE) if (status != EGL_TRUE)
g_warning ("eglMakeCurrent"); {
g_critical ("eglMakeCurrent failed");
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
} }
else else
{ {
@ -193,7 +203,6 @@ clutter_stage_egl_realize (ClutterActor *actor)
return; return;
} }
CLUTTER_SET_PRIVATE_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_SYNC_MATRICES); CLUTTER_SET_PRIVATE_FLAGS (stage_egl->wrapper, CLUTTER_ACTOR_SYNC_MATRICES);
} }