One of my tasks is to synchronize animations. To do this I will need to build a linked list of currently running animations so I can change them all at once at certain times. This got me to thinking about how the styleAvailable logic has these same characteristics (they need to get marked as waiting for something, and when that thing happens they all have to be notified at the same time). And I realized that keeping them in a list would be an optimization from having to walk through all CompositeAnimations looking for them. So I'm making this change now, both for the optimization and so I can do the same thing for the sync logic.
Created attachment 26926 [details] Patch Change styleAvailable functionality to be a linked list rather than scanning every CompositeAnimation for Animations that are waiting for styleAvailable. This has potential for large performance improvement in cases where there are many animations firing at once. But it will also help in my next fix, which is to synchronize software and accelerated animations. I also changed slightly when the beginAnimationUpdate and endAnimationUpdate calls are made. But this has no real effect on performance or behavior.
Comment on attachment 26926 [details] Patch r=me
Sending WebCore/ChangeLog Sending WebCore/dom/Document.cpp Sending WebCore/page/animation/AnimationBase.cpp Sending WebCore/page/animation/AnimationBase.h Sending WebCore/page/animation/AnimationController.cpp Sending WebCore/page/animation/AnimationController.h Sending WebCore/page/animation/CompositeAnimation.cpp Sending WebCore/page/animation/CompositeAnimation.h Transmitting file data ........ Committed revision 40215.