Commit 1ea862a3 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Adds trace event for launcher state transition animation.

Bug: 961467
Test: manually seeing chrome://tracing
Change-Id: I0303adeea2ba52f656811ab891ed6f0a7bcfbe65
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604050Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658391}
parent bb4a6bfc
......@@ -379,6 +379,7 @@ void AppListPresenterImpl::ScheduleDismissAnimation() {
animation.SetAnimationMetricsReporter(
view_->GetStateTransitionMetricsReporter());
animation.AddObserver(this);
TRACE_EVENT_ASYNC_BEGIN0("ui", "AppList::StateTransitionAnimations", this);
layer->SetTransform(gfx::Transform());
}
......@@ -446,6 +447,9 @@ void AppListPresenterImpl::OnWindowFocused(aura::Window* gained_focus,
// AppListPresenterImpl, ui::ImplicitAnimationObserver implementation:
void AppListPresenterImpl::OnImplicitAnimationsCompleted() {
// This class observes the closing animation only.
TRACE_EVENT_ASYNC_END1("ui", "AppList::StateTransitionAnimations", this,
"state", ash::mojom::AppListViewState::kClosed);
NotifyVisibilityChanged(GetTargetVisibility(), GetDisplayId());
if (is_visible_) {
......
......@@ -386,6 +386,8 @@ class TransitionAnimationObserver : public ui::ImplicitAnimationObserver {
// ui::ImplicitAnimationObserver:
void OnImplicitAnimationsCompleted() override {
TRACE_EVENT_ASYNC_END1("ui", "AppList::StateTransitionAnimations", this,
"state", view_->app_list_state());
DCHECK(view_);
view_->Layout();
}
......@@ -1544,6 +1546,8 @@ void AppListView::StartAnimationForState(
settings.SetAnimationMetricsReporter(GetStateTransitionMetricsReporter());
settings.AddObserver(transition_animation_observer_.get());
TRACE_EVENT_ASYNC_BEGIN0("ui", "AppList::StateTransitionAnimations",
transition_animation_observer_.get());
layer->SetTransform(gfx::Transform());
......
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