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

Issue 190963003: Drive SVG Animations via requestAnimationFrame (Closed)

Created:
6 years, 9 months ago by fs
Modified:
6 years, 9 months ago
CC:
blink-reviews, ed+blinkwatch_opera.com, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), rwlbuis, fs, kouhei+svg_chromium.org, dstockwell, Timothy Loh, krit, f(malita), gyuyoung.kim_webkit.org, darktears, Stephen Chennney, Steve Block, dino_apple.com, Eric Willigers
Visibility:
Public.

Description

Drive SVG Animations via requestAnimationFrame Start using FrameView::scheduleAnimation instead of a Timer for driving the animations in a SMILTimeContainer. The timer however remains to use when the next animation event is further into the future than within the (~) next frame interval. Hence SMILTimeContainer::m_timer is renamed to m_wakeupTimer. An AnimationClock is added to SMILTimeContainer to prepare for switching to the Document AnimationClock. The animation time from the compositor is plumbed through the layers, and used to update said clock. updateAnimations() is refactored to not perform frame scheduling itself, but leave that to the caller. This is used to make any frame triggered by the start of the timeline be scheduled using the wake-up timer instead of the frame "tick". This is a workaround to reduce the risk of races for simple pixel-tests (that want to sample the animation state at time 0.) Frame scheduling is managed by a simple 3-state FSM, where one state is used for "continuous updates" (frame driven), one is for "immediate updates" due to timeline/interval changes. The third state is the 'Idle' state which indicates that no frame/animation update is scheduled. For the SVG-in-<img> (and similar) case(s), SVGImageChromeClient::scheduleAnimation is modified to use a fixed frame interval. In SVGImage, the initialization of m_page is moved later, to disable any methods that depend on accessing the SVG root element (prompted by the need to query if the image has any animations) until the actual document is loaded/being loaded. BUG=231576 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168748

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+186 lines, -44 lines) Patch
M Source/core/animation/DocumentTimeline.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/page/PageAnimator.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/svg/SVGDocumentExtensions.h View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/svg/SVGDocumentExtensions.cpp View 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/svg/animation/SMILTimeContainer.h View 2 chunks +26 lines, -4 lines 0 comments Download
M Source/core/svg/animation/SMILTimeContainer.cpp View 12 chunks +105 lines, -33 lines 0 comments Download
M Source/core/svg/graphics/SVGImage.h View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/svg/graphics/SVGImage.cpp View 4 chunks +19 lines, -5 lines 0 comments Download
M Source/core/svg/graphics/SVGImageChromeClient.cpp View 3 chunks +10 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
fs
Round 2! (Round 1: https://codereview.chromium.org/179293004/) Changes since last version: * At timeline start, the next ...
6 years, 9 months ago (2014-03-07 17:03:22 UTC) #1
pdr.
On 2014/03/07 17:03:22, fs wrote: > Round 2! > > (Round 1: https://codereview.chromium.org/179293004/) > > ...
6 years, 9 months ago (2014-03-07 18:39:25 UTC) #2
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-07 18:39:30 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/190963003/1
6 years, 9 months ago (2014-03-07 18:39:55 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 18:45:51 UTC) #5
Message was sent while issue was closed.
Change committed as 168748

Powered by Google App Engine
This is Rietveld 408576698