fix(render): preserve 120 fps pacing headroom - #64
Merged
Conversation
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough调度器改用固定 2ms 提交前置时间,并将未来前置上限调整为初始前置时间加一帧间隔及量化余量。测试同步覆盖 120fps 突发帧事件序列和新的延迟预算边界。 Changes演示调度器阈值调整
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了啥呀
为啥要改
PR63 的半帧预算在 120 FPS 下只有约 5.21 ms。解码器只要同批吐出两帧,第二帧就会被这个小杂鱼阈值重新锚定到同一个 VSync,Surface 随后丢掉其中一帧,实际显示帧率因此跑不满。
修复后稳态 lead 是 2 ms,相比 PR63 只增加约 0.96 ms;一帧 future lead 只吸收瞬时 decoder burst,不恢复旧版固定一整帧排队。
验证
c++ -std=c++17 -Wall -Wextra -Werror nativelib/src/main/cpp/presentation_scheduler.cpp nativelib/src/test/cpp/presentation_scheduler_test.cpp -I nativelib/src/main/cpp -o /tmp/moonlight_presentation_scheduler_test && /tmp/moonlight_presentation_scheduler_testnpm run checknode hvigorw.js assembleApp --mode project -p product=default -p buildMode=debug --no-daemon(DevEco SDK 6.1 / JBR 21,BUILD SUCCESSFUL)Summary by CodeRabbit
改进
测试