stage: Use the debug name for the pick buffer dump stem

This avoids overwriting files in the multi-stage case.
This commit is contained in:
Emmanuele Bassi 2011-06-01 18:33:27 +01:00
parent b03288af51
commit eed1744612

View File

@ -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 */