mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
debug: Adds CLUTTER_DEBUG=disable-swap-events option
This allows us to forcibly disable the use of the GLX_INTEL_swap_events extension for testing or debugging purposes.
This commit is contained in:
parent
5d702853b8
commit
4a9f08639f
@ -7,24 +7,25 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
CLUTTER_DEBUG_MISC = 1 << 0,
|
||||
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
||||
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
||||
CLUTTER_DEBUG_EVENT = 1 << 3,
|
||||
CLUTTER_DEBUG_PAINT = 1 << 4,
|
||||
CLUTTER_DEBUG_GL = 1 << 5,
|
||||
CLUTTER_DEBUG_ALPHA = 1 << 6,
|
||||
CLUTTER_DEBUG_BEHAVIOUR = 1 << 7,
|
||||
CLUTTER_DEBUG_PANGO = 1 << 8,
|
||||
CLUTTER_DEBUG_BACKEND = 1 << 9,
|
||||
CLUTTER_DEBUG_SCHEDULER = 1 << 10,
|
||||
CLUTTER_DEBUG_SCRIPT = 1 << 11,
|
||||
CLUTTER_DEBUG_SHADER = 1 << 12,
|
||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 13,
|
||||
CLUTTER_DEBUG_ANIMATION = 1 << 14,
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
||||
CLUTTER_DEBUG_NOP_PICKING = 1 << 16,
|
||||
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 17,
|
||||
CLUTTER_DEBUG_MISC = 1 << 0,
|
||||
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
||||
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
||||
CLUTTER_DEBUG_EVENT = 1 << 3,
|
||||
CLUTTER_DEBUG_PAINT = 1 << 4,
|
||||
CLUTTER_DEBUG_GL = 1 << 5,
|
||||
CLUTTER_DEBUG_ALPHA = 1 << 6,
|
||||
CLUTTER_DEBUG_BEHAVIOUR = 1 << 7,
|
||||
CLUTTER_DEBUG_PANGO = 1 << 8,
|
||||
CLUTTER_DEBUG_BACKEND = 1 << 9,
|
||||
CLUTTER_DEBUG_SCHEDULER = 1 << 10,
|
||||
CLUTTER_DEBUG_SCRIPT = 1 << 11,
|
||||
CLUTTER_DEBUG_SHADER = 1 << 12,
|
||||
CLUTTER_DEBUG_MULTISTAGE = 1 << 13,
|
||||
CLUTTER_DEBUG_ANIMATION = 1 << 14,
|
||||
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
||||
CLUTTER_DEBUG_NOP_PICKING = 1 << 16,
|
||||
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 17,
|
||||
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 18,
|
||||
} ClutterDebugFlag;
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
|
@ -162,7 +162,8 @@ static const GDebugKey clutter_debug_keys[] = {
|
||||
{ "animation", CLUTTER_DEBUG_ANIMATION },
|
||||
{ "layout", CLUTTER_DEBUG_LAYOUT },
|
||||
{ "nop-picking", CLUTTER_DEBUG_NOP_PICKING },
|
||||
{ "dump-pick-buffers", CLUTTER_DEBUG_DUMP_PICK_BUFFERS }
|
||||
{ "dump-pick-buffers", CLUTTER_DEBUG_DUMP_PICK_BUFFERS },
|
||||
{ "disable-swap-events", CLUTTER_DEBUG_DISABLE_SWAP_EVENTS }
|
||||
};
|
||||
#endif /* CLUTTER_ENABLE_DEBUG */
|
||||
|
||||
|
@ -331,7 +331,8 @@ clutter_backend_glx_get_features (ClutterBackend *backend)
|
||||
/* GLX_INTEL_swap_event allows us to avoid blocking the CPU while
|
||||
* we wait for glXSwapBuffers to complete, and instead we get an X
|
||||
* event notifying us of completion... */
|
||||
if (cogl_check_extension ("GLX_INTEL_swap_event", glx_extensions) &&
|
||||
if (!(clutter_debug_flags & CLUTTER_DEBUG_DISABLE_SWAP_EVENTS) &&
|
||||
cogl_check_extension ("GLX_INTEL_swap_event", glx_extensions) &&
|
||||
flags & CLUTTER_FEATURE_SYNC_TO_VBLANK)
|
||||
flags |= CLUTTER_FEATURE_SWAP_EVENTS;
|
||||
#endif /* GLX_INTEL_swap_event */
|
||||
|
Loading…
Reference in New Issue
Block a user