New issue
Advanced search Search tips

Issue 907044 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 28
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 905020



Sign in to add a comment

[Tab loading animation] Replace gfx::Animation usage with timestamps

Project Member Reported by pbos@chromium.org, Nov 20

Issue description

gfx::Animation usage triggers timers and callbacks at 60fps that we don't really use, we just poll the animation value. We are already woken up by a timer shared between all loading animations at ~30fps, so we can replace TabIcon gfx::LinearAnimation usage with base::Timestamps that are the start time of the animation and generate the 0-1 value from those instead.
 
Labels: Hotlist-DesktopUIConsider
Labels: Group-Platform
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 27

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

commit 923f6277d4226d05e0f7296cc8131c8534d8df14
Author: Peter Boström <pbos@chromium.org>
Date: Tue Nov 27 19:02:20 2018

Rewrite tab animation to use TimeTicks

Avoids having additional high-frequency post tasking for no-op tasks in
the background.

To keep track of when to stop animating without an AnimationEnded
callback, we keep track of the last-drawn animation state. This also has
the side effect of allowing us to avoid repainting the loading-progress
bar if would paint the same pixels we drew last time. This should avoid
a lot of repaints for slow-loading sites.

This also ends up fixing backwards-jumping indicators. Probably because
the logic for clamping the loading-progress timer got easier.

Bug:  chromium:907044 , chromium:905020, chromium:905452
Change-Id: Ic83748bad83115ef2283c881a89ed65e3d3938ab
Reviewed-on: https://chromium-review.googlesource.com/c/1346831
Reviewed-by: Sidney San Martín <sdy@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611234}
[modify] https://crrev.com/923f6277d4226d05e0f7296cc8131c8534d8df14/chrome/browser/ui/views/tabs/tab_icon.cc
[modify] https://crrev.com/923f6277d4226d05e0f7296cc8131c8534d8df14/chrome/browser/ui/views/tabs/tab_icon.h
[modify] https://crrev.com/923f6277d4226d05e0f7296cc8131c8534d8df14/chrome/browser/ui/views/tabs/tab_unittest.cc

Status: Fixed (was: Assigned)

Sign in to add a comment