Files
yattee/Yattee/Services/Player/MPV/MPVRenderView.swift
Arkadiusz Fal c44edd23e6 Keep the display link paused while the app is in the background
A TestFlight log (iOS 27.2, build 276) showed ~36% CPU on an unnamed
thread for 85 minutes with playback paused in the background, heating
the phone. A lock during a quick inactive/active bounce rebuilt the
player container after the app had entered the background, and its
resumeRendering() un-paused the display link there; heartbeats showed
displayLink=running@60 inBackground=true for the whole period. An
earlier identical rebuild in the foreground left background CPU at 0.4%.

resumeRendering() now ignores calls in the background (unless PiP is
rendering) and a display link created there starts paused;
appDidBecomeActive resumes it.
2026-10-31 11:11:39 +01:00

65 KiB