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

Issue 135693003: Defer starting of animations until after compositing update (Closed)

Created:
6 years, 10 months ago by dstockwell
Modified:
6 years, 10 months ago
CC:
blink-reviews, shans, eae+blinkwatch, adamk+blink_chromium.org, Steve Block, dino_apple.com, alancutter (OOO until 2018), bemjb+rendering_chromium.org, dsinclair, Timothy Loh, dstockwell, dglazkov+blink, jchaffraix+rendering, pdr., Eric Willigers, rjwright, zoltan1, sof, darktears, leviw+renderwatch, blink-layers+watch_chromium.org, Mike Lawther (Google), Inactive
Visibility:
Public.

Description

Defer starting of animations until after compositing update Starting of animations depends on compositing state so that a decision as to whether to run the animation on the main or compositor threads can be made. Previously this happened following a style recalc where sufficient incremental updating allowed a decision. After this patch starting of animations may be deferred until after a compositing update. Ideally this would happen once before the frame completes, but the lifecycle of a frame is not yet visible to Blink. Following the starting of animations the animation clock is unfrozen allowing getComputedStyle and other animation API calls to advance time when outside a frame. Previously, to maintain synchronization in these situations the clock automatically froze on access and then unfroze after a subsequent style recalc. This was partially inaccurate as calls via the animation API might never trigger a recalc. Deferring the unfreezing until after the compositing update is less feasible. Instead, this patch allows the clock to remain unfrozen outside a frame by throttling the frequency at which the clock is permitted to advance. BUG=339847 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167740 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167865

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Ensure players have start time from current frame' #

Patch Set 4 : Rebase. #

Patch Set 5 : Advance animation clock after minimum delay. #

Total comments: 9

Patch Set 6 : Rebase. #

Patch Set 7 : Improve DocumentAnimations and factor out inner functionality of updateCompositingLayers. #

Patch Set 8 : Remove anonymous namespace. #

Total comments: 11

Patch Set 9 : Move some AnimationClock functions to cpp. #

Total comments: 8

Patch Set 10 : Address comments from esprehn. #

Patch Set 11 : Rebase. #

Patch Set 12 : Fix assertion. #

Patch Set 13 : Reland after fixing flaky tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -96 lines) Patch
LayoutTests/animations/animation-controller-drt-api.html View 2 chunks +16 lines, -17 lines 0 comments Download
LayoutTests/animations/compositor-start-event-timing.html View 1 2 3 4 1 chunk +9 lines, -7 lines 0 comments Download
LayoutTests/transitions/webkit-clip-path-equality.html View 1 chunk +7 lines, -2 lines 0 comments Download
Source/core/animation/AnimationClock.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -15 lines 0 comments Download
Source/core/animation/AnimationClock.cpp View 1 2 3 4 5 6 7 8 2 chunks +15 lines, -11 lines 0 comments Download
Source/core/animation/AnimationClockTest.cpp View 1 2 3 4 5 6 7 2 chunks +15 lines, -7 lines 0 comments Download
M Source/core/animation/DocumentAnimations.h View 1 2 3 4 5 6 1 chunk +5 lines, -3 lines 0 comments Download
M Source/core/animation/DocumentAnimations.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -12 lines 0 comments Download
M Source/core/animation/css/CSSPendingAnimations.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/animation/css/CSSPendingAnimations.cpp View 1 2 2 chunks +5 lines, -13 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -4 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/page/PageAnimator.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/rendering/compositing/RenderLayerCompositor.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/rendering/compositing/RenderLayerCompositor.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +11 lines, -1 line 0 comments Download

Messages

Total messages: 32 (0 generated)
dstockwell
6 years, 10 months ago (2014-02-20 13:20:50 UTC) #1
abarth-chromium
Can we remove any DisableCompositingQueryAsserts as a result of this CL? https://codereview.chromium.org/135693003/diff/280001/Source/core/animation/AnimationClock.h File Source/core/animation/AnimationClock.h (right): ...
6 years, 10 months ago (2014-02-20 17:51:59 UTC) #2
dstockwell
On 2014/02/20 17:51:59, abarth wrote: > Can we remove any DisableCompositingQueryAsserts as a result of ...
6 years, 10 months ago (2014-02-20 18:22:01 UTC) #3
abarth-chromium
https://codereview.chromium.org/135693003/diff/280001/Source/core/animation/css/CSSPendingAnimations.cpp File Source/core/animation/css/CSSPendingAnimations.cpp (left): https://codereview.chromium.org/135693003/diff/280001/Source/core/animation/css/CSSPendingAnimations.cpp#oldcode55 Source/core/animation/css/CSSPendingAnimations.cpp:55: DisableCompositingQueryAsserts disabler; Ah, I missed this. Great!
6 years, 10 months ago (2014-02-20 19:32:31 UTC) #4
abarth-chromium
On 2014/02/20 18:22:01, dstockwell wrote: > I was looking at what we know about the ...
6 years, 10 months ago (2014-02-20 19:40:09 UTC) #5
dstockwell
On 2014/02/20 19:40:09, abarth wrote: > On 2014/02/20 18:22:01, dstockwell wrote: > > I was ...
6 years, 10 months ago (2014-02-24 06:03:24 UTC) #6
abarth-chromium
LGTM with the exception of the constant. I'm not sure where that magic number comes ...
6 years, 10 months ago (2014-02-24 06:14:07 UTC) #7
dstockwell
https://codereview.chromium.org/135693003/diff/560001/Source/core/animation/AnimationClock.h File Source/core/animation/AnimationClock.h (right): https://codereview.chromium.org/135693003/diff/560001/Source/core/animation/AnimationClock.h#newcode44 Source/core/animation/AnimationClock.h:44: const double minTimeBeforeUnsynchronizedAnimationClockTick = 0.005; On 2014/02/24 06:14:08, abarth ...
6 years, 10 months ago (2014-02-24 06:58:06 UTC) #8
dstockwell
https://codereview.chromium.org/135693003/diff/560001/Source/core/animation/AnimationClock.h File Source/core/animation/AnimationClock.h (right): https://codereview.chromium.org/135693003/diff/560001/Source/core/animation/AnimationClock.h#newcode60 Source/core/animation/AnimationClock.h:60: double currentTime() On 2014/02/24 06:14:08, abarth wrote: > Should ...
6 years, 10 months ago (2014-02-24 12:41:16 UTC) #9
abarth-chromium
lgtm
6 years, 10 months ago (2014-02-24 17:48:22 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/650001
6 years, 10 months ago (2014-02-24 17:48:31 UTC) #11
shans
animation changes lgtm
6 years, 10 months ago (2014-02-24 22:48:55 UTC) #12
esprehn
https://codereview.chromium.org/135693003/diff/650001/Source/core/page/PageAnimator.cpp File Source/core/page/PageAnimator.cpp (right): https://codereview.chromium.org/135693003/diff/650001/Source/core/page/PageAnimator.cpp#newcode29 Source/core/page/PageAnimator.cpp:29: DocumentAnimations::dispatchAnimationEvents(*frame->document()); This should have a FIXME that we should ...
6 years, 10 months ago (2014-02-24 23:14:34 UTC) #13
esprehn
https://codereview.chromium.org/135693003/diff/650001/Source/core/animation/DocumentAnimations.cpp File Source/core/animation/DocumentAnimations.cpp (right): https://codereview.chromium.org/135693003/diff/650001/Source/core/animation/DocumentAnimations.cpp#newcode93 Source/core/animation/DocumentAnimations.cpp:93: if (document.cssPendingAnimations().startPendingAnimations() && document.view()) You should ASSERT(document().view()) here, it ...
6 years, 10 months ago (2014-02-25 00:00:47 UTC) #14
dstockwell
https://codereview.chromium.org/135693003/diff/650001/Source/core/animation/DocumentAnimations.cpp File Source/core/animation/DocumentAnimations.cpp (right): https://codereview.chromium.org/135693003/diff/650001/Source/core/animation/DocumentAnimations.cpp#newcode93 Source/core/animation/DocumentAnimations.cpp:93: if (document.cssPendingAnimations().startPendingAnimations() && document.view()) On 2014/02/25 00:00:48, esprehn wrote: ...
6 years, 10 months ago (2014-02-25 00:52:02 UTC) #15
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 10 months ago (2014-02-25 00:52:32 UTC) #16
esprehn
lgtm, thanks!
6 years, 10 months ago (2014-02-25 00:53:14 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/820002
6 years, 10 months ago (2014-02-25 01:01:41 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-25 01:01:59 UTC) #19
commit-bot: I haz the power
Failed to apply patch for Source/core/rendering/RenderLayerCompositor.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
6 years, 10 months ago (2014-02-25 01:02:00 UTC) #20
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 10 months ago (2014-02-25 01:07:26 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/840001
6 years, 10 months ago (2014-02-25 01:13:59 UTC) #22
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 10 months ago (2014-02-25 02:01:27 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/860001
6 years, 10 months ago (2014-02-25 02:01:46 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/860001
6 years, 10 months ago (2014-02-25 05:19:44 UTC) #25
commit-bot: I haz the power
Change committed as 167740
6 years, 10 months ago (2014-02-25 07:16:21 UTC) #26
dstockwell
The CQ bit was checked by dstockwell@chromium.org
6 years, 10 months ago (2014-02-26 00:12:23 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/870001
6 years, 10 months ago (2014-02-26 00:13:12 UTC) #28
Paweł Hajdan Jr.
The CQ bit was unchecked by phajdan.jr@chromium.org
6 years, 10 months ago (2014-02-26 05:33:12 UTC) #29
Paweł Hajdan Jr.
The CQ bit was checked by phajdan.jr@chromium.org
6 years, 10 months ago (2014-02-26 05:42:04 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dstockwell@chromium.org/135693003/870001
6 years, 10 months ago (2014-02-26 05:44:32 UTC) #31
commit-bot: I haz the power
6 years, 10 months ago (2014-02-26 08:53:59 UTC) #32
Message was sent while issue was closed.
Change committed as 167865

Powered by Google App Engine
This is Rietveld 408576698