Resizing TrayBubbleView is slow (UnifiedSystemTray animation is janky) |
|||
Issue descriptionUnifiedSystemTray'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
,
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
,
Jul 9
,
Aug 7
,
Aug 7
Issue 863585 has been merged into this issue. |
|||
►
Sign in to add a comment |
|||
Comment 1 by tetsui@chromium.org
, Jul 5