mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter: Add an lg command to set max render time constant
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
This commit is contained in:
parent
565e34b4d2
commit
f55c9af618
@ -41,6 +41,7 @@ G_BEGIN_DECLS
|
||||
extern guint clutter_debug_flags;
|
||||
extern guint clutter_pick_debug_flags;
|
||||
extern guint clutter_paint_debug_flags;
|
||||
extern int clutter_max_render_time_constant_us;
|
||||
|
||||
void _clutter_debug_messagev (const char *format,
|
||||
va_list var_args) G_GNUC_PRINTF (1, 0);
|
||||
|
@ -50,11 +50,6 @@ typedef struct _EstimateQueue
|
||||
*/
|
||||
#define SYNC_DELAY_FALLBACK_US ms2us (2)
|
||||
|
||||
/* A constant added to heuristic max render time to account for variations
|
||||
* in the estimates.
|
||||
*/
|
||||
#define MAX_RENDER_TIME_CONSTANT_US ms2us (2)
|
||||
|
||||
typedef struct _ClutterFrameListener
|
||||
{
|
||||
const ClutterFrameListenerIface *iface;
|
||||
@ -340,7 +335,7 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock)
|
||||
max_dispatch_to_swap_us +
|
||||
MAX (max_swap_to_rendering_done_us, max_swap_to_flip_us) +
|
||||
frame_clock->vblank_duration_us +
|
||||
MAX_RENDER_TIME_CONSTANT_US;
|
||||
clutter_max_render_time_constant_us;
|
||||
|
||||
max_render_time_us = CLAMP (max_render_time_us, 0, refresh_interval_us);
|
||||
|
||||
|
@ -95,6 +95,11 @@ guint clutter_debug_flags = 0;
|
||||
guint clutter_paint_debug_flags = 0;
|
||||
guint clutter_pick_debug_flags = 0;
|
||||
|
||||
/* A constant added to heuristic max render time to account for variations
|
||||
* in the estimates.
|
||||
*/
|
||||
int clutter_max_render_time_constant_us = 2000;
|
||||
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
static const GDebugKey clutter_debug_keys[] = {
|
||||
{ "misc", CLUTTER_DEBUG_MISC },
|
||||
@ -2275,6 +2280,12 @@ clutter_remove_debug_flags (ClutterDebugFlag debug_flags,
|
||||
clutter_pick_debug_flags &= ~pick_flags;
|
||||
}
|
||||
|
||||
void
|
||||
clutter_debug_set_max_render_time_constant (int max_render_time_constant_us)
|
||||
{
|
||||
clutter_max_render_time_constant_us = max_render_time_constant_us;
|
||||
}
|
||||
|
||||
void
|
||||
_clutter_set_sync_to_vblank (gboolean sync_to_vblank)
|
||||
{
|
||||
|
@ -198,6 +198,9 @@ void clutter_remove_debug_flags (ClutterDebugFla
|
||||
ClutterDrawDebugFlag draw_flags,
|
||||
ClutterPickDebugFlag pick_flags);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
void clutter_debug_set_max_render_time_constant (int max_render_time_constant_us);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _CLUTTER_MAIN_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user