From 10e2f551f5d7a3f67b1481fefd673fef5da9a11e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 12 Mar 2012 16:19:08 +0000 Subject: [PATCH] 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. --- clutter/clutter-actor.c | 14 +++++++++++--- tests/conform/test-conform-main.c | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index 2a495b0..2148eb5 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -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)) diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index 34fb7bb..04536ae 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -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); -- 2.7.4