Use the regular layer tree for fullscreen low power detachment on Mac.
Fixes an issue where fullscreen video wasn't positioned correctly in the low power tree for some sites, and a longstanding issue where clipped videos become un-clipped in the fullscreen low power tree. Made possible by two changes: - Black and transparent backgrounds are no longer rendered as IOSurfaces for color correction. For macOS to consider a layer solid black, it needs to actually have a black background color (and no contents). Note: I think we can avoid IOSurface replacement by setting a flag or two on the CAContext. See https://crrev.com/c/742663. - Instead of constructing a new layer tree for fullscreen low power, just make the root layer black and match its size to the background to meet the "opaque black superlayer" requirement for detachment. A nicer solution could be to send the browser a color, since it already has a solid color superlayer, in which case no special handling for fullscreen layer detachment would be needed at all, it would "just work". It still needs to be determined whether that would comply with the HTML fullscreen spec. See https://crbug.com/785001. Bug: 781637 Change-Id: I94abb1ade9c58c218296a27f9a7bc3630d4a0c64 Reviewed-on: https://chromium-review.googlesource.com/775139 Commit-Queue: Sidney San Martín <sdy@chromium.org> Reviewed-by:ccameron <ccameron@chromium.org> Cr-Commit-Position: refs/heads/master@{#517879}
Showing
Please register or sign in to comment