Confirmed users
166
edits
m (→nsSMILAnimationController: -- fixed wording.) |
m (→nsISMILTimeContainer: -- minor edits) |
||
Line 17: | Line 17: | ||
== nsISMILTimeContainer == | == nsISMILTimeContainer == | ||
This is a SMIL time container as described in SMIL 2.0. I'm not pretending to understand | This is a SMIL time container as described in [http://www.w3.org/TR/2005/REC-SMIL2-20050107/ SMIL 2.0]. I'm not pretending to understand or even to have read the SMIL 2.0 spec, but Schimtz describes a similar class so I think this interface would allow us to later support SMIL 2.0 time containers (not required by SVG). | ||
The <tt>getNextChange()</tt> is something to be suspicious of. This seems like an obvious optimisation to me. If for example a document doesn't contain any animations, they are all inactive or the document fragment is paused then it should be possible to inform the animation controller of this so it can suspend the animation timer. Likewise, if no changes are likely to occur, and no events need to be generated for another 60 seconds, it should be possible to suspend the timer. | The <tt>getNextChange()</tt> method is something to be suspicious of. This seems like an obvious optimisation to me. If, for example, a document doesn't contain any animations, they are all inactive or the document fragment is paused then it should be possible to inform the animation controller of this so it can suspend the animation timer. Likewise, if no changes are likely to occur, and no events need to be generated for another 60 seconds, it should be possible to suspend the timer. | ||
If, during | If however, during the time when the animation timer is suspended, an event arises, the <tt>requestUpdate()</tt> method on the animation controller would be called so that timer could be started again. I expect most SVG documents will have no animation or a very short-lived animation and it is important to optimise these cases. (However, we must always create the animation controller etc. because we need to record the document start time in case later an <tt><animate></tt> element is added via the DOM). | ||
In order to be able to call <tt>requestUpdate()</tt>, the nsISMILTimeContainer would probably need to keep a weak reference to its animation controller. | In order to be able to call <tt>requestUpdate()</tt>, the nsISMILTimeContainer would probably need to keep a weak reference to its animation controller. | ||
This interface will probably eventually inherit from nsISMILTimedElement in order to support SMIL 2.0 time containers but for now the only common method I can see us implementing is sampleAt. | This interface will probably eventually inherit from nsISMILTimedElement in order to support SMIL 2.0 time containers but for now the only common method I can see us implementing is <tt>sampleAt()</tt>. | ||
== nsSMILDocumentRoot == | == nsSMILDocumentRoot == |