In force full damage mode, always present with full damage.
On Windows, if we call swap chain's Present1 with damage rect info, even the damage rect info indicates full damage, the chance of Chrome's back buffer being promoted into an overlays are much lower. If we want to consistently Chrome's BGRA back buffer to an overlay, we have to always call Present which doesn't take damage rect info, indicating full damage. I measured some common use case, and their percentage of frames being promoted to overlays are as below: - Google Meet (5 person, 2x2): 97.8% - wikipedia: 80.5% - a story sharing site: 77.2% - gmail (reading a few emails and then compose one): 61.3% - Google speadsheet: 78.2% - Google photos: 95.5% If we promote a frame to overlay, then we save an extra copy (DWM doesn't need to copy chrome's back buffer into OS's back buffer). If we fail to promote a frame to overlay and it's partial damage, now we use full damage, so at worst we do an extra copy. So as far as we promote more than 50% frames to overlays, there is performance gains. For use cases where performance is critical, like Google Meet, or when we scroll, we get almost 100% promotion, so we get maximum performance gain. Besides, always use full damage simplifies logic quite a bit. The UMA "GPU.DirectComposition.CompositionMode.MainBuffer" will show us if this is a good decision by collecting overlay promotion percentage from the wild. BUG=1117185 TEST=manual R=sunnyps@chromium.org Change-Id: I12d927f472652f17e146debc83e40d9f40a1b950 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363771 Commit-Queue: Zhenyao Mo <zmo@chromium.org> Reviewed-by:Sunny Sachanandani <sunnyps@chromium.org> Cr-Commit-Position: refs/heads/master@{#799862}
Showing
Please register or sign in to comment