Remove unnecessary setting of CLUTTER_ACTOR_REALIZED flag

An implementaton of realize() never needs to set the
CLUTTER_ACTOR_REALIZED flag, though it can unset the flag if
things fail unexpectedly. (Previously, stage backend implementations
had to do this since clutter_actor_realize() wasn't used; this
is no longer the case.)

http://bugzilla.openedhand.com/show_bug.cgi?id=1634

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Owen W. Taylor 2009-06-06 09:55:00 -04:00 committed by Emmanuele Bassi
parent 2b7e98f4b3
commit d28c9e5db1
9 changed files with 7 additions and 27 deletions

View File

@ -292,10 +292,7 @@ clutter_stage_realize (ClutterActor *self)
* realization sequence was successful
*/
if (CLUTTER_ACTOR_IS_REALIZED (priv->impl))
{
CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
clutter_stage_ensure_current (CLUTTER_STAGE (self));
}
else
CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
}

View File

@ -188,8 +188,7 @@ clutter_stage_egl_realize (ClutterActor *actor)
CLUTTER_NOTE (GL, "Created EGL Context");
}
CLUTTER_NOTE (BACKEND, "Marking stage as realized and setting context");
CLUTTER_ACTOR_SET_FLAGS (stage_egl, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Setting context");
/* eglnative can have only one stage */
status = eglMakeCurrent (backend_egl->edpy,

View File

@ -251,8 +251,6 @@ clutter_stage_egl_realize (ClutterActor *actor)
CLUTTER_NOTE (GL, "Created EGL Context");
}
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
}
else
{

View File

@ -165,8 +165,7 @@ clutter_stage_egl_realize (ClutterActor *actor)
}
/* this will make sure to set the current context */
CLUTTER_NOTE (BACKEND, "Marking stage as realized and setting context");
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Setting context");
/* this should be done in ClutterBackend::ensure_context */
status = eglMakeCurrent (backend_egl->edpy,

View File

@ -212,8 +212,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
goto fail;
}
CLUTTER_NOTE (BACKEND, "Marking stage as realized");
CLUTTER_ACTOR_SET_FLAGS (stage_x11, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Successfully realized stage");
}
else
{
@ -261,8 +260,7 @@ clutter_stage_glx_realize (ClutterActor *actor)
goto fail;
}
CLUTTER_NOTE (BACKEND, "Marking stage as realized");
CLUTTER_ACTOR_SET_FLAGS (stage_x11, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Successfully realized stage");
}
/* we need to chain up to the X11 stage implementation in order to

View File

@ -295,11 +295,7 @@ clutter_stage_osx_realize (ClutterActor *actor)
CLUTTER_OSX_POOL_RELEASE();
/* FIXME: ClutterStage:realize is using the class pointer directly rather
* than clutter_actor_realize which would set the REALIZED flag for us.
*/
CLUTTER_NOTE (BACKEND, "Marking stage as realized");
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Stage successfully realized");
}
static void
@ -321,8 +317,6 @@ clutter_stage_osx_unrealize (ClutterActor *actor)
self->window = NULL;
CLUTTER_OSX_POOL_RELEASE();
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
}
static void

View File

@ -89,8 +89,6 @@ clutter_stage_sdl_realize (ClutterActor *actor)
CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
return;
}
else
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
}
else
{

View File

@ -558,8 +558,7 @@ clutter_stage_win32_realize (ClutterActor *actor)
}
}
CLUTTER_NOTE (BACKEND, "Marking stage as realized");
CLUTTER_ACTOR_SET_FLAGS (stage_win32, CLUTTER_ACTOR_REALIZED);
CLUTTER_NOTE (BACKEND, "Successfully realized stage");
return;

View File

@ -531,8 +531,6 @@ clutter_x11_texture_pixmap_realize (ClutterActor *actor)
CLUTTER_ACTOR_CLASS (clutter_x11_texture_pixmap_parent_class)->
realize (actor);
CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_REALIZED);
clutter_x11_texture_pixmap_update_area_real (texture,
0, 0,
priv->pixmap_width,