From fac7c3cb754dfc1d32018c53b42fe4102970c433 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 8 May 2003 05:46:45 +0000 Subject: [PATCH] The frame manager may decide not to paint us if needsPaint() returns false, but we still need to call willPaint() after *every* tick, so we have to do that in needsPaint() where we can be sure it will get called. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2554 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/media/MediaPanel.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/java/com/threerings/media/MediaPanel.java b/src/java/com/threerings/media/MediaPanel.java index 41a57de4e..bd8e7c744 100644 --- a/src/java/com/threerings/media/MediaPanel.java +++ b/src/java/com/threerings/media/MediaPanel.java @@ -1,5 +1,5 @@ // -// $Id: MediaPanel.java,v 1.37 2003/05/04 23:28:18 mdb Exp $ +// $Id: MediaPanel.java,v 1.38 2003/05/08 05:46:45 mdb Exp $ package com.threerings.media; @@ -282,6 +282,15 @@ public class MediaPanel extends JComponent if (!needsPaint) { _tickPaintPending = false; } + + // regardless of whether or not we paint, we need to let our + // abstract media managers know that we've gotten to the point of + // painting because they need to remain prepared to deal with + // media changes that happen any time between the tick() and the + // paint() and thus need to know when paint() happens + _animmgr.willPaint(); + _spritemgr.willPaint(); + return needsPaint; } @@ -304,14 +313,6 @@ public class MediaPanel extends JComponent { Graphics2D gfx = (Graphics2D)g; - // regardless of whether or not we paint, we need to let our - // abstract media managers know that we've gotten to the point of - // painting because they need to remain prepared to deal with - // media changes that happen any time between the tick() and the - // paint() and thus need to know when paint() happens - _animmgr.willPaint(); - _spritemgr.willPaint(); - // no use in painting if we're not showing or if we've not yet // been validated if (!isValid() || !isShowing()) {