Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Issue 635203003: Skip rule matching during animations. (Closed)

Created:
6 years, 2 months ago by rune
Modified:
6 years, 2 months ago
Reviewers:
dstockwell, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-css, dglazkov+blink, ed+blinkwatch_opera.com, Eric Willigers, Mike Lawther (Google), rjwright, rwlbuis, rune+blink, shans, Steve Block, Timothy Loh
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

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 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -24 lines) Patch
M Source/core/animation/ActiveAnimations.h View 1 2 3 4 3 chunks +5 lines, -5 lines 0 comments Download
M Source/core/animation/ActiveAnimations.cpp View 1 2 3 4 2 chunks +27 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 6 chunks +38 lines, -19 lines 0 comments Download

Messages

Total messages: 21 (3 generated)
rune
6 years, 2 months ago (2014-10-09 11:26:33 UTC) #1
rune
I've been playing around with the polymer paper element demos, and the recalc style time ...
6 years, 2 months ago (2014-10-09 13:22:23 UTC) #2
dstockwell
This is really exciting! Would it be possible to assert that the base style is ...
6 years, 2 months ago (2014-10-10 01:01:05 UTC) #3
rune
On 2014/10/10 at 01:01:05, dstockwell wrote: > This is really exciting! > > Would it ...
6 years, 2 months ago (2014-10-10 13:08:35 UTC) #4
rune
On 2014/10/10 at 13:08:35, rune wrote: > On 2014/10/10 at 01:01:05, dstockwell wrote: > > ...
6 years, 2 months ago (2014-10-10 19:28:26 UTC) #5
rune
@esprehn PTAL
6 years, 2 months ago (2014-10-13 09:45:39 UTC) #6
esprehn
This seems okay, I do wonder if we should finally bite the bullet and steal ...
6 years, 2 months ago (2014-10-13 18:19:33 UTC) #7
rune
https://codereview.chromium.org/635203003/diff/50001/Source/core/animation/ActiveAnimations.h File Source/core/animation/ActiveAnimations.h (right): https://codereview.chromium.org/635203003/diff/50001/Source/core/animation/ActiveAnimations.h#newcode82 Source/core/animation/ActiveAnimations.h:82: void setBaseRenderStyle(PassRefPtr<RenderStyle> renderStyle) On 2014/10/13 at 18:19:33, esprehn wrote: ...
6 years, 2 months ago (2014-10-13 21:31:48 UTC) #8
esprehn
I don't like that constructing a Data object has side effects on the element you ...
6 years, 2 months ago (2014-10-13 21:44:26 UTC) #9
rune
https://codereview.chromium.org/635203003/diff/140001/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/635203003/diff/140001/Source/core/css/resolver/StyleResolver.cpp#newcode560 Source/core/css/resolver/StyleResolver.cpp:560: animations->setBaseRenderStyle(nullptr); On 2014/10/13 at 21:44:26, esprehn wrote: > This ...
6 years, 2 months ago (2014-10-13 22:24:49 UTC) #10
esprehn
On 2014/10/13 at 22:24:49, rune wrote: > https://codereview.chromium.org/635203003/diff/140001/Source/core/css/resolver/StyleResolver.cpp > File Source/core/css/resolver/StyleResolver.cpp (right): > > https://codereview.chromium.org/635203003/diff/140001/Source/core/css/resolver/StyleResolver.cpp#newcode560 ...
6 years, 2 months ago (2014-10-13 22:32:32 UTC) #11
rune
On 2014/10/13 at 22:32:32, esprehn wrote: > updateBaseRenderStyle seems better to me, but whatever makes ...
6 years, 2 months ago (2014-10-13 23:03:07 UTC) #12
esprehn
lgtm
6 years, 2 months ago (2014-10-13 23:51:35 UTC) #13
dstockwell
lgtm
6 years, 2 months ago (2014-10-14 00:26:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/635203003/210001
6 years, 2 months ago (2014-10-14 06:44:49 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/31647)
6 years, 2 months ago (2014-10-14 08:18:15 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/635203003/210001
6 years, 2 months ago (2014-10-14 09:36:15 UTC) #20
commit-bot: I haz the power
6 years, 2 months ago (2014-10-14 10:13:25 UTC) #21
Message was sent while issue was closed.
Committed patchset #5 (id:210001) as 183662

Powered by Google App Engine
This is Rietveld 408576698