[debug] Adds a "nop-picking" clutter debug option to NOP _clutter_do_pick()
I've found this is something I do quite often when debugging rendering problems since its a simple way to wipe out lots of geometry and removes a lot of unpredictable noise when logging geometry passing through the Cogl journal.
This commit is contained in:
parent
56bc54d242
commit
26d5afd203
@ -22,7 +22,8 @@ typedef enum {
|
|||||||
CLUTTER_DEBUG_SHADER = 1 << 12,
|
CLUTTER_DEBUG_SHADER = 1 << 12,
|
||||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 13,
|
CLUTTER_DEBUG_MULTISTAGE = 1 << 13,
|
||||||
CLUTTER_DEBUG_ANIMATION = 1 << 14,
|
CLUTTER_DEBUG_ANIMATION = 1 << 14,
|
||||||
CLUTTER_DEBUG_LAYOUT = 1 << 15
|
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
||||||
|
CLUTTER_DEBUG_NOP_PICKING = 1 << 16,
|
||||||
} ClutterDebugFlag;
|
} ClutterDebugFlag;
|
||||||
|
|
||||||
#ifdef CLUTTER_ENABLE_DEBUG
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
|
@ -94,7 +94,8 @@ static const GDebugKey clutter_debug_keys[] = {
|
|||||||
{ "shader", CLUTTER_DEBUG_SHADER },
|
{ "shader", CLUTTER_DEBUG_SHADER },
|
||||||
{ "multistage", CLUTTER_DEBUG_MULTISTAGE },
|
{ "multistage", CLUTTER_DEBUG_MULTISTAGE },
|
||||||
{ "animation", CLUTTER_DEBUG_ANIMATION },
|
{ "animation", CLUTTER_DEBUG_ANIMATION },
|
||||||
{ "layout", CLUTTER_DEBUG_LAYOUT }
|
{ "layout", CLUTTER_DEBUG_LAYOUT },
|
||||||
|
{ "nop-picking", CLUTTER_DEBUG_NOP_PICKING }
|
||||||
};
|
};
|
||||||
#endif /* CLUTTER_ENABLE_DEBUG */
|
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||||
|
|
||||||
@ -375,6 +376,9 @@ _clutter_do_pick (ClutterStage *stage,
|
|||||||
guint32 id;
|
guint32 id;
|
||||||
GLboolean dither_was_on;
|
GLboolean dither_was_on;
|
||||||
|
|
||||||
|
if (clutter_debug_flags & CLUTTER_DEBUG_NOP_PICKING)
|
||||||
|
return CLUTTER_ACTOR (stage);
|
||||||
|
|
||||||
context = _clutter_context_get_default ();
|
context = _clutter_context_get_default ();
|
||||||
|
|
||||||
_clutter_backend_ensure_context (context->backend, stage);
|
_clutter_backend_ensure_context (context->backend, stage);
|
||||||
|
Loading…
Reference in New Issue
Block a user