mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
Add some debugging notes for picking
This adds a new CLUTTER_DEBUG option for picking. Currently this just reports the position for each pick and whether it is clipped or not.
This commit is contained in:
parent
12e58c7813
commit
ddd08ba723
@ -22,7 +22,8 @@ typedef enum {
|
||||
CLUTTER_DEBUG_SHADER = 1 << 12,
|
||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 13,
|
||||
CLUTTER_DEBUG_ANIMATION = 1 << 14,
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 15
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
||||
CLUTTER_DEBUG_PICK = 1 << 16
|
||||
} ClutterDebugFlag;
|
||||
|
||||
typedef enum {
|
||||
|
@ -156,6 +156,7 @@ static const GDebugKey clutter_debug_keys[] = {
|
||||
{ "texture", CLUTTER_DEBUG_TEXTURE },
|
||||
{ "event", CLUTTER_DEBUG_EVENT },
|
||||
{ "paint", CLUTTER_DEBUG_PAINT },
|
||||
{ "pick", CLUTTER_DEBUG_PICK },
|
||||
{ "gl", CLUTTER_DEBUG_GL },
|
||||
{ "alpha", CLUTTER_DEBUG_ALPHA },
|
||||
{ "behaviour", CLUTTER_DEBUG_BEHAVIOUR },
|
||||
@ -637,6 +638,9 @@ _clutter_do_pick (ClutterStage *stage,
|
||||
pixel);
|
||||
CLUTTER_TIMER_STOP (_clutter_uprof_context, pick_read);
|
||||
|
||||
CLUTTER_NOTE (PICK, "Reusing pick buffer from previous render to fetch "
|
||||
"actor at %i,%i", x, y);
|
||||
|
||||
/* FIXME: This is a lazy copy and paste of the logic at the end of this
|
||||
* function used when we actually do a pick render. It should be
|
||||
* consolidated somehow.
|
||||
@ -672,6 +676,9 @@ _clutter_do_pick (ClutterStage *stage,
|
||||
else
|
||||
is_clipped = FALSE;
|
||||
|
||||
CLUTTER_NOTE (PICK, "Performing %s pick at %i,%i",
|
||||
is_clipped ? "clippped" : "full", x, y);
|
||||
|
||||
cogl_disable_fog ();
|
||||
cogl_color_set_from_4ub (&stage_pick_id, 255, 255, 255, 255);
|
||||
CLUTTER_TIMER_START (_clutter_uprof_context, pick_clear);
|
||||
|
Loading…
Reference in New Issue
Block a user