[Webkit-unassigned] [Bug 12063] New: WebCore needs separate AnimationScheduler class for SMIL support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 1 17:00:05 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=12063

           Summary: WebCore needs separate AnimationScheduler class for SMIL
                    support
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: macdome at opendarwin.org


WebCore needs separate AnimationScheduler class for SMIL support

Some of this is talked about in bug 10931 (Animation Compositor support).  The
current Animation support is inefficient (and broken) with regard to animation
scheduling.  Right now one timer is created for every animation.  When any
timer fires, all animations are re-applied and all animating elements are
invalidated.  A better approach would be:

1.  Ideally only use a single animation timer (WebCore might already do this
under the covers).
2.  add an AnimationScheduler::scheduleNextAnimation method which adjusts the
timer to fire in time for the next animation.  (This method would be called all
over the place -- any time an animation timing is changed, or an animation
fires.)
3.  A single "AnimationScheduler::animationTimerFired" call, which builds the
list of animations which are due to fire (currently part of this functionality
is in SVGTimer::animationsByElement()).  This list should include *only*
animations which are due to fire.  All SVGAnimate* classes will need to contain
some sort of last fired state (at least an m_lastFiredTime) for aiding in the
decision of if they are due to fire.
4.  Once a list of all due animations is built, this list should be converted
into a list of Element/Attribute pairs that they effect.
5. An SVGDocumentExtensions (or AnimationController?) method should be called
to look up all animations relating to each given Element/Attribute pair.  A
separate method can be used to sort these animations by priority order.
6. For each Element effected,
"AnimationCompositor::applyAnimations(SVGElement*,
Vector<SVGAnimatedElement*>)" should be called with the sorted list of
animations.
7.  AnimationCompositor::applyAnimations(SVGElement*,
Vector<SVGAnimatedElement*>) should walk through each animation, calling
"applyAnimationToValue" (or something like it) for each animation.  (Although
it would be nice to walk backwards from the end of the list to the first
"replace" animation and only apply from there forwards (as I suggested in bug
10931), that's not easy to do with inter-dependent properties (such as cx/fx in
gradients).)


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list