From 4ae22890bf5df7ff52def3c9efd18b327254d7f2 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Tue, 5 Dec 2006 06:58:04 +0000 Subject: [PATCH] Use our surprisingly handy new method. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@90 ed5b42cb-e716-0410-a449-f6a68f950b19 --- .../media/animation/MultiFrameAnimation.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/java/com/threerings/media/animation/MultiFrameAnimation.java b/src/java/com/threerings/media/animation/MultiFrameAnimation.java index 4abb8100..85de408f 100644 --- a/src/java/com/threerings/media/animation/MultiFrameAnimation.java +++ b/src/java/com/threerings/media/animation/MultiFrameAnimation.java @@ -99,22 +99,13 @@ public class MultiFrameAnimation extends Animation } else if (fidx != _fidx) { // make a note of our current bounds - Rectangle dirty = new Rectangle(_bounds); + Rectangle obounds = new Rectangle(_bounds); // update our frame index and bounds setFrameIndex(fidx); - if (_mgr != null) { - // if our new bounds intersect our old bounds, grow a single - // dirty rectangle to incorporate them both, otherwise - // invalidate them separately - if (_bounds.intersects(dirty)) { - dirty.add(_bounds); - } else { - _mgr.getRegionManager().invalidateRegion(_bounds); - } - _mgr.getRegionManager().addDirtyRegion(dirty); - } + // invalidate our old and new bounds + invalidateAfterChange(obounds); } }