From eed174461286ce983e06893a73592edc50a64373 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 1 Jun 2011 18:33:27 +0100 Subject: [PATCH] stage: Use the debug name for the pick buffer dump stem This avoids overwriting files in the multi-stage case. --- clutter/clutter-stage.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 872b240d0..68b7873f5 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -1363,9 +1363,16 @@ _clutter_stage_do_pick (ClutterStage *stage, if (G_UNLIKELY (clutter_pick_debug_flags & CLUTTER_DEBUG_DUMP_PICK_BUFFERS)) { - read_pixels_to_file ("pick-buffer", 0, 0, + char *file_name = + g_strconcat ("pick-buffer-", + _clutter_actor_get_debug_name (CLUTTER_ACTOR (stage)), + NULL); + + read_pixels_to_file (file_name, 0, 0, clutter_actor_get_width (CLUTTER_ACTOR (stage)), clutter_actor_get_height (CLUTTER_ACTOR (stage))); + + g_free (file_name); } /* Restore whether GL_DITHER was enabled */