New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 860137 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 860367



Sign in to add a comment

Resizing TrayBubbleView is slow (UnifiedSystemTray animation is janky)

Project Member Reported by tetsui@chromium.org, Jul 4

Issue description

UnifiedSystemTray's expand / collapse animation is janky (~30fps).

The bottleneck is resize of TrayBubbleView. By removing PreferredSizeChanged, we can get ~60fps even in current implementation.

https://cs.chromium.org/chromium/src/ash/system/unified/unified_system_tray_view.cc?l=219&rcl=98f5773e4e07d4d95c22833241a7dbc59793d1ad

There are three reasons why we cannot just call UnifiedSystemTrayView::SetTransform() and gfx::Transform::Translate():
* notification list is not properly resized
* backgrond blur is not properly resized
* bubble shadow is not properly resized
 
Blockedon: 860367
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f00504b150e84b709c8bbdac59d7fb50b4ba1e17

commit f00504b150e84b709c8bbdac59d7fb50b4ba1e17
Author: Tetsui Ohkubo <tetsui@chromium.org>
Date: Mon Jul 09 02:34:03 2018

Optimize animation in UnifiedSystemTray.

This CL improves the animation performance of UnifiedSystemTray from
roughly 30fps to 60fps (tested on "link" device).

The bottleneck of the animation was TrayBubbleView::SizeToContents().
It caused all tiles in the bubble to rasterize every frame.
In order to avoid that, this CL uses layer transformation to move
position of contents rather than resizing the bubble every frame.

Test procedure:
1. Enable chrome://flags/#ash-debug-shortcuts
2. Ctrl-Shift-Alt-F to show FPS counter
3. Add TogglExpanded() at the end of
   UnifiedSystemTrayController::AnimationEnded to run animation in loop.

TEST=manual
BUG= 860137 

Change-Id: I26f28ce66adaa1073b0951ebf275d261770fa636
Reviewed-on: https://chromium-review.googlesource.com/1126897
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573203}
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/feature_pods_container_view.cc
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/feature_pods_container_view.h
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_bubble.cc
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_bubble.h
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_controller.cc
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_controller.h
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_view.cc
[modify] https://crrev.com/f00504b150e84b709c8bbdac59d7fb50b4ba1e17/ash/system/unified/unified_system_tray_view.h

Status: Fixed (was: Assigned)
Cc: tetsui@chromium.org
 Issue 869656  has been merged into this issue.
Cc: abodenha@chromium.org dbehr@chromium.org kaznacheev@chromium.org cywang@chromium.org ddavenp...@chromium.org
 Issue 863585  has been merged into this issue.

Sign in to add a comment