diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-04 17:47:31 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-04 17:47:31 +0200 |
| commit | e0bfec6ef2507de3f13e1d4690adfe195cf1643c (patch) | |
| tree | f77f0bcfd004949e3f67fe09f7c45189f2978406 /src/events/Monitors.cpp | |
| parent | c40ef59a3570e2d80a0b15131e6964c3c5e14408 (diff) | |
added experimental:vfr
Diffstat (limited to 'src/events/Monitors.cpp')
| -rw-r--r-- | src/events/Monitors.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 11527cee..562c4533 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -173,6 +173,7 @@ void Events::listener_monitorFrame(void* owner, void* data) { static auto *const PDEBUGOVERLAY = &g_pConfigManager->getConfigValuePtr("debug:overlay")->intValue; static auto *const PDAMAGETRACKINGMODE = &g_pConfigManager->getConfigValuePtr("general:damage_tracking_internal")->intValue; static auto *const PDAMAGEBLINK = &g_pConfigManager->getConfigValuePtr("debug:damage_blink")->intValue; + static auto *const VFRENABLED = &g_pConfigManager->getConfigValuePtr("experimental:vfr")->intValue; static int damageBlinkCleanup = 0; // because double-buffered @@ -231,7 +232,10 @@ void Events::listener_monitorFrame(void* owner, void* data) { if (!hasChanged && *PDAMAGETRACKINGMODE != DAMAGE_TRACKING_NONE && PMONITOR->forceFullFrames == 0 && damageBlinkCleanup == 0) { pixman_region32_fini(&damage); wlr_output_rollback(PMONITOR->output); - wlr_output_schedule_frame(PMONITOR->output); // we update shit at the monitor's Hz so we need to schedule frames because rollback wont + + if (!*VFRENABLED) + wlr_output_schedule_frame(PMONITOR->output); + return; } @@ -319,7 +323,8 @@ void Events::listener_monitorFrame(void* owner, void* data) { wlr_output_commit(PMONITOR->output); - wlr_output_schedule_frame(PMONITOR->output); + if (!*VFRENABLED) + wlr_output_schedule_frame(PMONITOR->output); if (*PDEBUGOVERLAY == 1) { const float µs = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - startRender).count() / 1000.f; |
