···2929 *
3030 */
31313232+DEBUG_GET_ONCE_FLOAT_OPTION(min_comp_time_ms, "U_PACING_COMP_MIN_TIME_MS", 3.0f)
3333+3234/*!
3335 * A very simple pacer that tries it best to pace a compositor. Used when the
3436 * compositor can't get any good or limited feedback from the presentation
···284286 // 20% of the frame time.
285287 ft->comp_time_ns = get_percent_of_time(estimated_frame_period_ns, 20);
286288287287- // Or at least 2ms.
288288- if (ft->comp_time_ns < U_TIME_1MS_IN_NS * 2) {
289289- ft->comp_time_ns = U_TIME_1MS_IN_NS * 2;
289289+ // Or at least a certain amount of time.
290290+ float min_comp_time_ms_f = debug_get_float_option_min_comp_time_ms();
291291+ uint64_t min_comp_time_ns = time_ms_f_to_ns(min_comp_time_ms_f);
292292+293293+ if (ft->comp_time_ns < min_comp_time_ns) {
294294+ ft->comp_time_ns = min_comp_time_ns;
290295 }
291296292297 // Make the next present time be in the future.