Re-fix AnimationThroughputReporter leak when layer gone
https://crrev.com/c/2590646 fixes the problem by observing Layer directly. It introduces flakiness in ScreenRotationPerf. The screen rotation animates two copied layers and the layers could be destroyed before the reports are received. When that happens, the metric is not recorded. The root cause of the leak problem is AnimationTracker retains LayerAnimator. When underlying Layer is gone, animations are still owned by LayerAnimator and not aborted. Thus, AnimationTracker still thinks it has animations to track. This CL essentially reverts https://crrev.com/c/2590646 and fix the leaking problem by make AnimationTracker not retain LayerAnimator. This allows the animator being destroyed with its layer and the animation callbacks to happen. As a result, HasAnimationsToTrack would correctly return whether there are animations to track when reporter goes away. BUG=1162167, 1158510 Change-Id: Ie2a8191c1abbbc9e57b42090f66014f43fa62bc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2618518Reviewed-by:kylechar <kylechar@chromium.org> Reviewed-by:
Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#842202}
Showing
Please register or sign in to comment