Skip 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

Review URL: https://codereview.chromium.org/635203003

git-svn-id: svn://svn.chromium.org/blink/trunk@183662 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: b9b3de4996fe304f882f9ae7a0bb8ec01dd7b227
  1. third_party/