mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 00:31:31 +00:00
[client] display: use trusted nominal cadence
Always track Wayland surface outputs alongside fractional scaling and use RandR modes for X11 cadence. Remove render-derived feedback so a throttled client cannot teach the producer to remain throttled. Release scheduling after nominal output timing remains unavailable.
This commit is contained in:
@@ -76,15 +76,7 @@ bool waylandGetFramePeriod(uint64_t * period)
|
||||
/* Frame demand must use the output's nominal rate. Basing demand on the
|
||||
* observed presentation interval can lock a VRR session at its current,
|
||||
* slower cadence. */
|
||||
if (waylandOutputGetFramePeriod(period))
|
||||
return true;
|
||||
|
||||
const uint64_t value = atomic_load(&wlWm.presentationPeriod);
|
||||
if (!value)
|
||||
return false;
|
||||
|
||||
*period = value;
|
||||
return true;
|
||||
return waylandOutputGetFramePeriod(period);
|
||||
}
|
||||
|
||||
static void presentationFeedbackDiscarded(void * data,
|
||||
|
||||
@@ -133,6 +133,8 @@ bool waylandWindowInit(const char * title, const char * appId, bool fullscreen,
|
||||
return false;
|
||||
}
|
||||
|
||||
wl_surface_add_listener(wlWm.surface, &wlSurfaceListener, NULL);
|
||||
|
||||
if (wlWm.fractionalScaleManager)
|
||||
{
|
||||
wlWm.fractionalScaleInterface = wp_fractional_scale_manager_v1_get_fractional_scale(
|
||||
@@ -140,8 +142,6 @@ bool waylandWindowInit(const char * title, const char * appId, bool fullscreen,
|
||||
wp_fractional_scale_v1_add_listener(wlWm.fractionalScaleInterface,
|
||||
&fractionalScaleListener, NULL);
|
||||
}
|
||||
else
|
||||
wl_surface_add_listener(wlWm.surface, &wlSurfaceListener, NULL);
|
||||
|
||||
if (wlWm.contentTypeManager)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user