Commit e24beeb2 authored by Muyuan Li's avatar Muyuan Li Committed by Commit Bot

assistant: fix animation during start.

When taking screenshot with RecreateLayers, the
animations on layer being recreated will be
interrupted. We ignore assistant's layer here
to exclude it from screenshot and prevent the
animation from being canceled.

Bug: b/112604283
Test: Manual
Change-Id: Idca40f51954c8aa48d81a8fa54e395cb4028d512
Reviewed-on: https://chromium-review.googlesource.com/1174983
Commit-Queue: Muyuan Li <muyuanli@chromium.org>
Reviewed-by: default avatarXiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583129}
parent eaa72521
...@@ -69,6 +69,23 @@ std::unique_ptr<ui::LayerTreeOwner> CreateLayerForAssistantSnapshot( ...@@ -69,6 +69,23 @@ std::unique_ptr<ui::LayerTreeOwner> CreateLayerForAssistantSnapshot(
if (overlay_container) if (overlay_container)
excluded_layers.insert(overlay_container->layer()); excluded_layers.insert(overlay_container->layer());
aura::Window* always_on_top_container = ash::Shell::GetContainer(
root_window, kShellWindowId_AlwaysOnTopContainer);
// Ignore windows in always on top container. This will prevent assistant
// window from being snapshot.
// TODO(muyuanli): We can add Ash property to indicate specific windows to
// be excluded from snapshot (e.g. assistant window itself).
if (always_on_top_container)
excluded_layers.insert(always_on_top_container->layer());
aura::Window* app_list_container =
ash::Shell::GetContainer(root_window, kShellWindowId_AppListContainer);
// Ignore app list to prevent interfering with app list animations.
if (app_list_container)
excluded_layers.insert(app_list_container->layer());
MruWindowTracker::WindowList windows = MruWindowTracker::WindowList windows =
Shell::Get()->mru_window_tracker()->BuildMruWindowList(); Shell::Get()->mru_window_tracker()->BuildMruWindowList();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment