Revert NativeWidgetMacNSWindowHost compositor warm-up optimization
Moderate
提交哈希:
8df51012b26b1998c2e7103d9cea0bba62dbffef
提交时间: 2026-05-14 15:03:22
影响等级: Moderate
生成工具: chromium-watcher
上游审核链接:
查看上游审核 🔗
📋 摘要
This commit reverts the compositor warm-up optimization introduced in ae5a92b7. The original commit preemptively called OnVisibilityChanged(true) in SetVisibilityState to initialize the compositor before the NSWindow becomes visible, avoiding UI thread hangs. Due to a regression (crbug.com/512777833), the optimization is reverted. The revert restores the manual visibility notification in NativeWidgetNSWindowBridge::ShowAsModalSheet before the modal sheet animation begins.
🎯 影响分析
This revert has moderate impact on WebView2Mac. The Edge downstream currently retains the reverted compositor warm-up logic (native_widget_mac_ns_window_host.mm lines 960-974), which will cause a merge conflict on the next upstream merge and must be removed. The new OnVisibilityChanged call in NativeWidgetNSWindowBridge::ShowAsModalSheet communicates via the host_-> Mojo interface callback, a critical Bridge-Host communication path. For WebView2Mac: (1) SetVisibilityState is the core window-show method — the compositor initialization timing change may affect first-frame rendering performance; (2) the ShowAsModalSheet change affects modal dialog display flow; (3) since this is a revert to a known-stable state the risk is manageable, but attention is needed during merge regarding Edge-specific WidgetActivationDelegate logic interacting with this code path.
受影响的类:
NativeWidgetMacNSWindowHost
NativeWidgetNSWindowBridge