Bug 10931
| Summary: | WebCore needs a separate AnimationCompositor class for animation calculations | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | jeffschiller, zimmermann |
| Priority: | P4 | ||
| Version: | 420+ | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
| URL: | http://www.w3.org/TR/2005/REC-SMIL2-20051213/animation.html#animationNS-AnimationSandwichModel | ||
| Bug Depends on: | |||
| Bug Blocks: | 41761 | ||
Eric Seidel (no email)
WebCore needs a separate AnimationCompositor class for animation calculations
KSVG2 had a hackish animation model in which a single class (KSVGTimeScheduler) held all of the logic necessary for animation (in a single function with a large switch statement).
A bette model for animation would involve at least:
1. a separate timer scheduling class
2. separate classes containing animation application logic for each of the basic animation elements
3. a animation compositor class, to orchestrate the application of animation
This bug covers implementing #3, the compositor.
The SMIL animation composition model (aka "AnimationSandwichModel") is pretty well spelled out in:
http://www.w3.org/TR/2005/REC-SMIL2-20051213/animation.html#animationNS-AnimationSandwichModel
1. individual animation elements will need to know their priority (a monotonically increasing number based on parse order, or a override value manually specified on the element)
2. when the "applyAnimations()" method is called on the compositor, a specific target will be passed
3. animation elements targeting the passed element will be grabbed out of a hash and sorted into priority order.
4. the compositor will walk backwards through that priority list until either hitting the beginning or an animation with additive="replace".
5. the compositor can then walk forwards to generate the new value from the original baseValue or replaced value.
This is a very rough sketch.
This bug covers breaking the existing KSVGTimeScheduler composition logic out into its own class, and wiring things up enough to at least confirm that simple animations work.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nikolas Zimmermann
This is long done.