needsPaint() will only be called by the FrameManager *after* it has just
called tick(), therefore we don't need to incorporate _tickPaintPending into our determinations. Additionally, we need to clear _tickPaintPending if we return false from this method because we won't get painted in that case and won't clear it in paint(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2369 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: MediaPanel.java,v 1.30 2003/03/25 23:05:58 mdb Exp $
|
||||
// $Id: MediaPanel.java,v 1.31 2003/04/01 03:38:03 mdb Exp $
|
||||
|
||||
package com.threerings.media;
|
||||
|
||||
@@ -231,7 +231,13 @@ public class MediaPanel extends JComponent
|
||||
_dirtyPerTick = (float)dirty/100;
|
||||
}
|
||||
|
||||
return (!_tickPaintPending || _remgr.haveDirtyRegions());
|
||||
// if we have no dirty regions, clear our pending tick indicator
|
||||
// because we're not going to get painted
|
||||
boolean needsPaint = _remgr.haveDirtyRegions();
|
||||
if (!needsPaint) {
|
||||
_tickPaintPending = false;
|
||||
}
|
||||
return needsPaint;
|
||||
}
|
||||
|
||||
// documentation inherited from interface
|
||||
|
||||
Reference in New Issue
Block a user