mirror of
https://github.com/brl/mutter.git
synced 2025-03-03 11:58:09 +00:00
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:
parent
2b7e98f4b3
commit
d28c9e5db1
@ -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));
|
||||
}
|
||||
clutter_stage_ensure_current (CLUTTER_STAGE (self));
|
||||
else
|
||||
CLUTTER_ACTOR_UNSET_FLAGS (self, CLUTTER_ACTOR_REALIZED);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user