Keep frame overlays topmost
This fixes a regression caused by crrev.com/710881. The reason is that before that CL, we had an extra level in GraphicsLayer tree (which was the root GraphicsLayer created by VisualViewport), and the frame overlays were added in that level after the root layer of the contents. With the CL, frame overlays and the top-level contents GraphicsLayers started to have the same parent, so the frame overlays may be behind the contents layers after later compositing updates. The problem affected "persistent" frame overlays such as the DevTools overlay which lives when DevTools is running. Now in FrameOverlay::UpdatePrePaint(), always keep the GraphicsLayer the last child of the root layer to ensure it's the topmost. This will slightly impact performance when there are multiple frame overlays which is rare. The next step will be to refactor FrameOverlay not to create GraphicsLayers, and to combine code paths for pre-CompositeAfterPaint and CompositeAfterPaint. Bug: 1057071 Change-Id: I0fed6e69d4a90b38b7a636712f4349e0985ff100 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135891Reviewed-by:Philip Rogers <pdr@chromium.org> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#756413}
Showing
Please register or sign in to comment