DescriptionSkip rule matching during animations.
If a style change is due to animations updating their interpolated values
only, store a clone of the RenderStyle before the animated properties are
applied to use as a base for updating RenderStyle for the next frames.
The base RenderStyle is stored on the ActiveAnimations object and cleared
when a recalc is triggered by changes that require rule matching.
The machinery for detecting if a LocalStyleChange is caused by an animation
update only was already in place, so this CL is making use of that.
Running blink_perf.animation shows a frame rate increase of 18-40% with
the exception of three tests which are unchanged.
In general this seems to shave off nearly 50% of the time used in
recalcStyle for each animation frame if no inherited properties are
animated. For instance, in "The expansion of the dictionary definition card"
from issue 377939.
R=dstockwell@chromium.org,esprehn@chromium.org
BUG=377939, 421822
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183662
Patch Set 1 #Patch Set 2 : Compile fixes #Patch Set 3 : ASSERT that the cached animation base RenderStyle is correct #
Total comments: 6
Patch Set 4 : Avoid RenderStyle.h include #
Total comments: 2
Patch Set 5 : Moved baseRenderStyle handling into ActiveAnimations #
Messages
Total messages: 21 (3 generated)
|