viz: Expose primary plane mailbox for SkiaOutputSurface
As part of the UseRealBuffersForPageFlipTest experiment, OverlayProcessorOzone now uses the primary plane's buffer directly for page flip tests [1]. This buffer is obtained via OutputSurface::GetOverlayMailbox [2] which is unfortunately only implemented for GL-based OutputSurfaces. With SkiaRenderer enabled, OverlayProcessorOzone can't extract the primary plane mailbox and skips promoting overlays at all [3]. This CL implements GetOverlayMailbox for SkiaOutputSurface by threading the corresponding mailbox from the GPU main thread back to the compositor thread via the SwapBuffers callback. Note that since GetOverlayMailbox corresponds to the *last* submitted buffer, we need to skip the primary plane in the event of a reshape because the page flip test result is meaningless. [1] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display/overlay_processor_ozone.cc;l=139;drc=a44fcb321ea308b8f8d2227190a99c6cca2b79e6 [2] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display/direct_renderer.cc;l=356;drc=a44fcb321ea308b8f8d2227190a99c6cca2b79e6 [3] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display/overlay_processor_ozone.cc;l=210;drc=a44fcb321ea308b8f8d2227190a99c6cca2b79e6 Change-Id: I88d10746ede9bdc8afa565e8a42aef27d5572e53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2533416 Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by:Jonathan Backer <backer@chromium.org> Reviewed-by:
Daniele Castagna <dcastagna@chromium.org> Reviewed-by:
Kramer Ge <fangzhoug@chromium.org> Cr-Commit-Position: refs/heads/master@{#828865}
Showing
Please register or sign in to comment