desks: Do not recreate layers for desk slide out animation
The large amounts of layers in the desks bar makes the recursive `wm::RecreateLayers` function take too much time. So we cannot afford to do it at this point. This means we need to keep `DeskBarViewBase` alive until the animation is finished. With the new raw_ptr, this causes `root` to be dangling if a display is removed while the animation is running. We pass ownership to `CleanupAnimationObserver`, which is owned by `OverviewController`, and clean up the object if the root is removed during its lifetime. Test: existing tests Test: manual Change-Id: Ia34c12591dd7f7465a0d22258bf82d009d5a22b1 Fixed: b/294448300 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4753809 Reviewed-by:Yongshun Liu <yongshun@chromium.org> Commit-Queue: Sammie Quon <sammiequon@chromium.org> Cr-Commit-Position: refs/heads/main@{#1180439}
Loading
Please register or sign in to comment