Only dirty regions in the MediaOverlay corresponding to its actual media.

Since its dirty regions propagate out to the repaint manager, a big update
there would lead to dirty calls ping-ponging back and forth for a few cycles.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@600 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Charlie Groves
2008-08-04 23:38:12 +00:00
parent 78cab07b78
commit 5567dcf2a1
5 changed files with 54 additions and 30 deletions
@@ -21,6 +21,8 @@
package com.threerings.media.animation;
import java.util.Iterator;
import com.samskivert.util.SortableArrayList;
import com.threerings.media.AbstractMedia;
@@ -31,6 +33,7 @@ import com.threerings.media.AbstractMediaManager;
* generating events when animations finish and suchlike.
*/
public class AnimationManager extends AbstractMediaManager
implements Iterable<Animation>
{
/**
* Registers the given {@link Animation} with the animation manager for ticking and painting.
@@ -50,6 +53,11 @@ public class AnimationManager extends AbstractMediaManager
removeMedia(anim);
}
public Iterator<Animation> iterator ()
{
return _anims.iterator();
}
@Override
protected void tickAllMedia (long tickStamp)
{