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
@ -25,6 +25,7 @@ typedef enum {
|
|||||||
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
CLUTTER_DEBUG_LAYOUT = 1 << 15,
|
||||||
CLUTTER_DEBUG_NOP_PICKING = 1 << 16,
|
CLUTTER_DEBUG_NOP_PICKING = 1 << 16,
|
||||||
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 17,
|
CLUTTER_DEBUG_DUMP_PICK_BUFFERS = 1 << 17,
|
||||||
|
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 18,
|
||||||
} ClutterDebugFlag;
|
} ClutterDebugFlag;
|
||||||
|
|
||||||
#ifdef CLUTTER_ENABLE_DEBUG
|
#ifdef CLUTTER_ENABLE_DEBUG
|
||||||
|
@ -162,7 +162,8 @@ static const GDebugKey clutter_debug_keys[] = {
|
|||||||
{ "animation", CLUTTER_DEBUG_ANIMATION },
|
{ "animation", CLUTTER_DEBUG_ANIMATION },
|
||||||
{ "layout", CLUTTER_DEBUG_LAYOUT },
|
{ "layout", CLUTTER_DEBUG_LAYOUT },
|
||||||
{ "nop-picking", CLUTTER_DEBUG_NOP_PICKING },
|
{ "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 */
|
#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
|
/* GLX_INTEL_swap_event allows us to avoid blocking the CPU while
|
||||||
* we wait for glXSwapBuffers to complete, and instead we get an X
|
* we wait for glXSwapBuffers to complete, and instead we get an X
|
||||||
* event notifying us of completion... */
|
* 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_SYNC_TO_VBLANK)
|
||||||
flags |= CLUTTER_FEATURE_SWAP_EVENTS;
|
flags |= CLUTTER_FEATURE_SWAP_EVENTS;
|
||||||
#endif /* GLX_INTEL_swap_event */
|
#endif /* GLX_INTEL_swap_event */
|
||||||
|
Loading…
Reference in New Issue
Block a user