actor: Unconditionally emit ::paint

It's a bit late in the game for changing the emission of the paint
signal with actors that use paint nodes - mostly because we have both
implicit paint nodes (background color, content) and explicit paint
nodes (the paint_node virtual).

When we branch for 1.12 we can revert this change.
This commit is contained in:
Emmanuele Bassi 2012-03-12 16:19:08 +00:00
parent d1fd53b29d
commit 10e2f551f5
2 changed files with 12 additions and 4 deletions

View File

@ -3257,7 +3257,10 @@ clutter_actor_paint_node (ClutterActor *actor,
_clutter_paint_node_paint (root);
#if 0
/* XXX: Uncomment this when we disable emitting the paint signal */
CLUTTER_ACTOR_GET_CLASS (actor)->paint (actor);
#endif
return TRUE;
}
@ -3538,15 +3541,20 @@ clutter_actor_continue_paint (ClutterActor *self)
if (_clutter_context_get_pick_mode () == CLUTTER_PICK_NONE)
{
ClutterPaintNode *dummy;
gboolean emit_paint;
gboolean emit_paint = TRUE;
/* XXX - this will go away in 2.0, when we can get rid of this
* stuff and switch to a pure retained render tree of PaintNodes
* for the entire frame, starting from the Stage.
* for the entire frame, starting from the Stage; the paint()
* virtual function can then be called directly.
*/
dummy = _clutter_dummy_node_new ();
clutter_paint_node_set_name (dummy, "Root");
emit_paint = !clutter_actor_paint_node (self, dummy);
/* XXX - for 1.12, we use the return value of paint_node() to
* set the emit_paint variable.
*/
clutter_actor_paint_node (self, dummy);
clutter_paint_node_unref (dummy);
if (emit_paint || CLUTTER_ACTOR_IS_TOPLEVEL (self))

View File

@ -144,7 +144,7 @@ main (int argc, char **argv)
TEST_CONFORM_SIMPLE ("/actor", actor_preferred_size);
TEST_CONFORM_SIMPLE ("/actor", actor_basic_layout);
TEST_CONFORM_SIMPLE ("/actor", actor_margin_layout);
TEST_CONFORM_TODO ("/actor", actor_offscreen_redirect);
TEST_CONFORM_SIMPLE ("/actor", actor_offscreen_redirect);
TEST_CONFORM_SIMPLE ("/actor", actor_shader_effect);
TEST_CONFORM_SIMPLE ("/actor/iter", actor_iter_traverse_children);