Adaptive‑Sync and ProMotion Variable Refresh Rate Techniques on macOS, iPad Pro, and iPhone 13 Pro
Apple’s WWDC21‑introduced Adaptive‑Sync on macOS and ProMotion on iPad Pro and iPhone 13 Pro enable variable‑refresh‑rate displays, and developers can use Metal and CADisplayLink APIs to dynamically pace frames, query hardware limits, and adjust rates based on GPU load for smoother motion.
WWDC21 introduced Adaptive‑Sync in macOS Monterey, bringing variable‑refresh‑rate (VRR) support to the Mac ecosystem. This article explains the technology, compares it with traditional fixed‑rate displays, and provides best‑practice guidance for delivering smooth rendering on macOS, iPad Pro, and iPhone 13 Pro.
Adaptive‑Sync Overview
Adaptive‑Sync is a VESA‑defined, DisplayPort‑based VRR standard that eliminates tearing and stutter by allowing the display to adjust its refresh interval dynamically. It is the open‑source counterpart of AMD Free‑Sync and NVIDIA G‑Sync, and Apple has integrated it into macOS to support full‑screen apps and games.
Fixed vs. Variable Refresh Rates
In a fixed‑rate display (e.g., 60 Hz), each frame is shown for a constant 16 ms. If a frame takes longer to render, the previous frame is repeated, causing noticeable stutter. Variable refresh rates replace the fixed interval with a flexible window (e.g., 8–25 ms for a 40–120 Hz range), allowing frames to be presented as soon as they are ready, reducing perceived latency.
Advantages of Adaptive‑Sync
Variable timing enables smoother motion, especially when complex scenes cause occasional frame‑time spikes. Instead of forcing a lower fixed refresh rate, the system can keep higher rates for easy frames and gracefully drop to lower rates only when necessary.
Enabling Adaptive‑Sync
To use Adaptive‑Sync you need:
Hardware support (M1 Macs or recent Intel Macs).
An Adaptive‑Sync‑capable monitor connected via DisplayPort .
Full‑screen execution of the app.
Support can be queried via the new properties on NSScreen , which return minimum and maximum frame intervals. If the two values are equal, the display does not support VRR.
Controlling Frame Pacing with Metal
Metal provides APIs such as MetalDrawable , presentAfterMinimumDuration , presentAtTime , and presentNow to schedule frame presentation precisely. By adjusting these calls you can align rendering with the variable refresh window.
Dynamic Frame‑Rate Based on GPU Load
A practical approach is to compute a rolling average of frame‑render times and use it to estimate the next frame’s duration. The estimated time is then fed to the Adaptive‑Sync‑aware presentation call, allowing the app to adapt in real time without hard‑coding a fixed rate.
ProMotion on iPad Pro and iPhone 13 Pro
ProMotion offers a 10–120 Hz (iPhone) or 24–120 Hz (iPad) range. Unlike Adaptive‑Sync, ProMotion only supports a discrete set of rates (120 Hz, 60 Hz, 40 Hz, 30 Hz, 24 Hz, 10 Hz). Power‑saving modes and thermal throttling can limit the maximum rate to 60 Hz.
CADisplayLink Best Practices
1. Retrieve the hardware’s maximum rate via UIScreen (always reports 120 Hz on ProMotion devices).
2. Use CADisplayLink.preferredFramesPerSecond to request a target rate; the system will select the nearest supported value.
3. Prefer targetTimestamp over timestamp for scheduling work, as it reflects the actual vsync timing more accurately.
4. Dynamically compute an appropriate frame rate based on current GPU load and the difference between targetTimestamp and timestamp . When callbacks are delayed or skipped, adjust rendering accordingly to avoid visible stutter.
Conclusion
The article combines macOS Adaptive‑Sync techniques with iPad Pro/iPhone 13 Pro ProMotion practices, highlighting API usage, dynamic pacing, and GPU‑load‑aware adjustments. By following these guidelines developers can deliver smoother visual experiences across Apple’s variable‑refresh‑rate devices.
Youzan Coder
Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.