clutter/frame-clock: Take deadline evasion into account
This is meant to be the amount of time before a CRTC deadline we're usually dispatching at. It's not yet set by anything however. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3184>
This commit is contained in:
parent
61ae9eedb6
commit
5da94d2c1d
@ -137,6 +137,8 @@ struct _ClutterFrameClock
|
|||||||
|
|
||||||
int64_t last_dispatch_interval_us;
|
int64_t last_dispatch_interval_us;
|
||||||
|
|
||||||
|
int64_t deadline_evasion_us;
|
||||||
|
|
||||||
char *output_name;
|
char *output_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -389,7 +391,8 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock,
|
|||||||
|
|
||||||
frame_clock->shortterm_max_update_duration_us =
|
frame_clock->shortterm_max_update_duration_us =
|
||||||
CLAMP (frame_clock->last_dispatch_lateness_us + dispatch_to_swap_us +
|
CLAMP (frame_clock->last_dispatch_lateness_us + dispatch_to_swap_us +
|
||||||
MAX (swap_to_rendering_done_us, swap_to_flip_us),
|
MAX (swap_to_rendering_done_us,
|
||||||
|
swap_to_flip_us + frame_clock->deadline_evasion_us),
|
||||||
frame_clock->shortterm_max_update_duration_us,
|
frame_clock->shortterm_max_update_duration_us,
|
||||||
frame_clock->refresh_interval_us);
|
frame_clock->refresh_interval_us);
|
||||||
|
|
||||||
@ -1253,3 +1256,10 @@ clutter_frame_clock_class_init (ClutterFrameClockClass *klass)
|
|||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clutter_frame_clock_set_deadline_evasion (ClutterFrameClock *frame_clock,
|
||||||
|
int64_t deadline_evasion_us)
|
||||||
|
{
|
||||||
|
frame_clock->deadline_evasion_us = deadline_evasion_us;
|
||||||
|
}
|
||||||
|
@ -106,3 +106,7 @@ void clutter_frame_clock_record_flip_time (ClutterFrameClock *frame_clock,
|
|||||||
int64_t flip_time_us);
|
int64_t flip_time_us);
|
||||||
|
|
||||||
GString * clutter_frame_clock_get_max_render_time_debug_info (ClutterFrameClock *frame_clock);
|
GString * clutter_frame_clock_get_max_render_time_debug_info (ClutterFrameClock *frame_clock);
|
||||||
|
|
||||||
|
CLUTTER_EXPORT
|
||||||
|
void clutter_frame_clock_set_deadline_evasion (ClutterFrameClock *frame_clock,
|
||||||
|
int64_t deadline_evasion_us);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user