···2525DEBUG_GET_ONCE_FLOAT_OPTION(min_app_time_ms, "U_PACING_APP_MIN_TIME_MS", 1.0f)
2626DEBUG_GET_ONCE_FLOAT_OPTION(min_margin_ms, "U_PACING_APP_MIN_MARGIN_MS", 2.0f)
2727DEBUG_GET_ONCE_BOOL_OPTION(use_min_frame_period, "U_PACING_APP_USE_MIN_FRAME_PERIOD", false)
2828+DEBUG_GET_ONCE_BOOL_OPTION(immediate_wait_frame_return, "U_PACING_APP_IMMEDIATE_WAIT_FRAME_RETURN", false)
28292930#define UPA_LOG_T(...) U_LOG_IFL_T(debug_get_log_option_log_level(), __VA_ARGS__)
3031#define UPA_LOG_D(...) U_LOG_IFL_D(debug_get_log_option_log_level(), __VA_ARGS__)
···462463 // How long we think the frame should take.
463464 int64_t frame_time_ns = total_app_time_ns(pa);
464465 // When should the client wake up.
465465- int64_t wake_up_time_ns = predict_ns - total_app_and_compositor_time_ns(pa);
466466+ int64_t wake_up_time_ns;
467467+468468+ /*
469469+ * We can either wake the app to render as fast as possible or at the
470470+ * predicted time period minus some app and compositor time.
471471+ * The former uses substantially more power but is sometimes useful in debugging
472472+ *.or as a workaround.
473473+ */
474474+ if (debug_get_bool_option_immediate_wait_frame_return()) {
475475+ wake_up_time_ns = now_ns;
476476+ } else {
477477+ wake_up_time_ns = predict_ns - total_app_and_compositor_time_ns(pa);
478478+ }
479479+466480 // When the client's GPU work should have completed.
467481 int64_t gpu_done_time_ns = predict_ns - total_compositor_time_ns(pa);
468482