clutter/frame-clock: Clamp render times to two frames, not one
Because the buffer queue may grow by an extra frame in triple buffering, we need measurements exceeding one frame to indicate when and by how much the scaling is necessary.
This commit is contained in:
parent
6cc1801e45
commit
e4df885306
1 changed files with 2 additions and 2 deletions
|
@ -390,7 +390,7 @@ clutter_frame_clock_notify_presented (ClutterFrameClock *frame_clock,
|
|||
CLAMP (frame_clock->last_dispatch_lateness_us + dispatch_to_swap_us +
|
||||
MAX (swap_to_rendering_done_us, swap_to_flip_us),
|
||||
frame_clock->shortterm_max_update_duration_us,
|
||||
frame_clock->refresh_interval_us);
|
||||
2 * frame_clock->refresh_interval_us);
|
||||
|
||||
maybe_update_longterm_max_duration_us (frame_clock, frame_info);
|
||||
|
||||
|
@ -476,7 +476,7 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock)
|
|||
frame_clock->vblank_duration_us +
|
||||
clutter_max_render_time_constant_us;
|
||||
|
||||
max_render_time_us = CLAMP (max_render_time_us, 0, refresh_interval_us);
|
||||
max_render_time_us = CLAMP (max_render_time_us, 0, 2 * refresh_interval_us);
|
||||
|
||||
return max_render_time_us;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue