CSS animations on offscreen elements cause document repaint on every frame. |
||||||||
Issue descriptionSee 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.
,
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?
,
Jan 20 2017
Issue 661151 has been merged into this issue.
,
Apr 5 2017
,
Apr 5 2017
I don't have time to look into this right now.
,
Apr 6 2017
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.
,
Apr 6 2017
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.
,
Apr 6 2017
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.
,
Apr 25 2017
,
Apr 26 2018
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
,
Apr 26 2018
,
May 21 2018
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by alancutter@chromium.org
, Nov 15 2016Labels: Performance Update-Quarterly OS-All