clutter/frame-clock: Make SYNC_DELAY_FALLBACK a fraction
This won't change anything for 60Hz displays but higher refresh rate users will benefit. Using Nvidia EGLStreams on a 240Hz monitor for example (refresh interval ~4.1ms), the maximum render time allowed before dropping to 120Hz is now 3.6ms whereas it was previously 2.1ms. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2158>
This commit is contained in:
parent
f48b3b489b
commit
b77cb09bac
1 changed files with 2 additions and 5 deletions
|
@ -45,10 +45,7 @@ typedef struct _EstimateQueue
|
|||
int next_index;
|
||||
} EstimateQueue;
|
||||
|
||||
/* When heuristic render time is off,
|
||||
* wait 2ms after vblank before starting to draw next frame.
|
||||
*/
|
||||
#define SYNC_DELAY_FALLBACK_US ms2us (2)
|
||||
#define SYNC_DELAY_FALLBACK_FRACTION 0.875
|
||||
|
||||
typedef struct _ClutterFrameListener
|
||||
{
|
||||
|
@ -319,7 +316,7 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock)
|
|||
if (!frame_clock->got_measurements_last_frame ||
|
||||
G_UNLIKELY (clutter_paint_debug_flags &
|
||||
CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME))
|
||||
return refresh_interval_us - SYNC_DELAY_FALLBACK_US;
|
||||
return refresh_interval_us * SYNC_DELAY_FALLBACK_FRACTION;
|
||||
|
||||
for (i = 0; i < ESTIMATE_QUEUE_LENGTH; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue