New issue
Advanced search Search tips

Issue 664258 link

Starred by 5 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

CSS animations on offscreen elements cause document repaint on every frame.

Project Member Reported by erikc...@chromium.org, Nov 10 2016

Issue description

See https://docs.google.com/document/d/1YVO9FGRBF1RUsedU28H6P8lt9bDpOci0vi0CLSkFih8/edit# for a more details of the investigation. See section on uol.com.br. The problem is that the offscreen elements are not being promoted to be their own layers, due to the property being animated. 
 
 
Components: Blink>Animation
Labels: Performance Update-Quarterly OS-All

Comment 2 by suzyh@chromium.org, Nov 23 2016

erikchen: Is there any action that you need from the animations team on this bug at the moment (and the two others in Blink>Animation that you own), or is the ball still in your court?
 Issue 661151  has been merged into this issue.

Comment 4 by nduca@chromium.org, Apr 5 2017

Labels: Performance-Power
Cc: erikc...@chromium.org
Owner: ----
Status: Untriaged (was: Assigned)
I don't have time to look into this right now.

Comment 6 by ojan@chromium.org, Apr 6 2017

Cc: ikilpatrick@chromium.org
Rather than give them their own layer, I think we should look at just not running offscreen CSS animations. Of course, that runs up against potential web compatibility issues that we'll have to be careful about, but I'm fairly optimistic we can ship something here.

Basic idea is that we'd compute the bounding box of the animation and not run it until the bounding box intersects the viewport. Of course, we'd need to maintain a timeline so that when it starts intersecting the viewport we play forward the animation to the right point.

There's an open question on whether we'd fire transitionend events for the offscreen animations since that's web observable. My preference would be that we try to avoid firing them and only add that in if we find it's necessary for web compat.
Yep, I definitely agree with Ojan here. There's going to be some gnarly details, but in general, 'not running the animations' is the best answer to this.
Labels: -Pri-3 Pri-2
Status: available (was: Untriaged)
I think we should add more understanding about offscreen-ness to the main thread animation scheduling logic. We should not schedule main thread animation when we know it to not be visible. This is an analog to how the main thread does not schedule animation when we know the animation is handled by the compositor.

This may range from easy (paint affecting animations in offscreen areas), medium (transform effects which require bounding box calculations and time intersections), to hard/impossible (layout inducing animations).

Breaking web-compat by not firing events is a different issue that should be discussed separately.
Labels: -Performance
Project Member

Comment 10 by sheriffbot@chromium.org, Apr 26 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Type-Bug -Pri-2 -Hotlist-Recharge-Cold Pri-3 Type-Feature
Status: Available (was: Untriaged)
Cc: f...@opera.com chrishtr@chromium.org
 Issue 724237  has been merged into this issue.

Sign in to add a comment