迁移 Pre-frame Render Session Inspection
RenderSessionInspectionPolicy 新增 TrackSessionBeforeFirstFrame。对使用 Kotlin when 穷举该枚举
的调用方,这是源码不兼容的 Alpha 变更;使用更新后的 UI Foundation 产物重新编译前,必须添加新
分支。没有安装自定义 RenderSessionInspectionTooling 的普通应用无需修改。
只有显式工具请求选中一个候选 Logical Session 后才能使用新 Policy。Session 会在首帧前立即调用
register,并传入空 sourceCandidates 列表。在该 Registration 中同步启动 Timing Capture,会把
采集附着到正在进入的帧,不会请求嵌套结构 Render。即使首帧回滚,Registration 仍负责 Dispose。
原有分支继续承担原有职责:
Ignore不安装检查状态;TrackSession在第一个成功 Native Frame 后注册,但不采集 Source;TrackSessionAndCaptureSources在第一个成功 Native Frame 后携带有界 Source Candidate 注册。
不得把 Pre-frame Policy 用作通用 Eager-registration 模式。Adapter 仍受平台 Render Thread 约束,
必须在不保留应用 Key 的情况下完成 Armed 决策,并且不能给非激活路径增加周期 Observer、Traversal、
Timing 或 Report 工作。可编译 renderSessionInspectionToolingSample 同时展示一次性 LazyItem Arm
和普通 Policy。