本文要说明什么
debug.sf.follower_display_backpressure 如何在 Scheduler::onFrameSignal 里让某一帧跳过从屏(follower)的整帧工作。CompositionEngine::postComposition 仍可能在合成末尾兑现 LayerFE 的 release-fence 承诺,常见结果是 Fence::NO_FENCE。立场与范围
VSync 90 Hz、从屏物理刷新 45 Hz、从屏上应用仍按 90 Hz 节奏绘制(相当于在 45 Hz 屏上跑 90 FPS 产线)时出现撕裂。代码与链接
platform/frameworks/native 分支 android16-qpr2-release。cs.android.com)上 android-latest-release 的链接;具体行段只在 URL 的 ;l=… 里,便于在网页里对照,正文不重复行号。调度侧:从屏被跳过(代码摘录见 §2 — Scheduler.cpp,onFrameSignal)
beginFrame,随后 onFrameSignal 遍历各 follower。follower_display_backpressure 后,每个从屏会查 countPresentFencesPendingAt(尚未完成的 present 相关 fence 数量)。countPresentFencesPendingAt 为 0,不会因此跳过,从屏照常 beginFrame。continue(本帧不调用 targeter.beginFrame)。expectedVsyncTime(即从屏下一帧会比主屏下一帧更“早到”)——此时不 continue,仍会 beginFrame。除此之外,只要还有待处理 fence,就会跳过。targets,也就不会按正常路径参与 compositor.commit。释放链路与症状(与 §4 — CompositionEngine.cpp,postComposition 中的兜底逻辑对应)