Try filling the offscreen buffer with a solid color after we create it to

avoid painting garbage to the screen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1303 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-04-27 18:59:27 +00:00
parent 938445071e
commit 6a7fd11321
@@ -1,5 +1,5 @@
// //
// $Id: FrameManager.java,v 1.3 2002/04/27 02:33:14 mdb Exp $ // $Id: FrameManager.java,v 1.4 2002/04/27 18:59:27 mdb Exp $
package com.threerings.media; package com.threerings.media;
@@ -429,8 +429,20 @@ public class FrameManager
*/ */
protected void createBackBuffer (GraphicsConfiguration gc) protected void createBackBuffer (GraphicsConfiguration gc)
{ {
_backimg = gc.createCompatibleVolatileImage( // create the offscreen buffer
_frame.getWidth(), _frame.getHeight()); int width = _frame.getWidth(), height = _frame.getHeight();
_backimg = gc.createCompatibleVolatileImage(width, height);
// fill the back buffer with white
Graphics g = null;
try {
g = _backimg.getGraphics();
g.fillRect(0, 0, width, height);
} finally {
if (g != null) {
g.dispose();
}
}
} }
/** /**