Added support for temporarily disabling image and tile cache flushing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2483 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ImageManager.java,v 1.51 2003/04/27 06:33:11 mdb Exp $
|
||||
// $Id: ImageManager.java,v 1.52 2003/04/27 07:33:15 mdb Exp $
|
||||
|
||||
package com.threerings.media.image;
|
||||
|
||||
@@ -111,6 +111,17 @@ public class ImageManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to disable the flushing of cached images temporarily. If one
|
||||
* wishes to avoid garbage collection for a short period of time, they
|
||||
* may disable image flushing during that period. A call to {@link
|
||||
* System#gc} is probably a good idea once flushing is reenabled.
|
||||
*/
|
||||
public void setCanFlushCache (boolean enabled)
|
||||
{
|
||||
_ccache.setCanFlush(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a buffered image, optimized for display on our graphics
|
||||
* device.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileSet.java,v 1.47 2003/04/25 18:21:49 mdb Exp $
|
||||
// $Id: TileSet.java,v 1.48 2003/04/27 07:33:15 mdb Exp $
|
||||
|
||||
package com.threerings.media.tile;
|
||||
|
||||
@@ -326,6 +326,19 @@ public abstract class TileSet
|
||||
return buf.append("]").toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to disable the flushing of cached tiles temporarily. If one
|
||||
* wishes to avoid garbage collection for a short period of time, they
|
||||
* may disable tile flushing during that period. A call to {@link
|
||||
* System#gc} is probably a good idea once flushing is reenabled.
|
||||
*/
|
||||
public static void setCanFlushCache (boolean enabled)
|
||||
{
|
||||
if (_tiles != null) {
|
||||
_tiles.setCanFlush(enabled);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Derived classes can override this, calling
|
||||
* <code>super.toString(buf)</code> and then appending additional
|
||||
|
||||
Reference in New Issue
Block a user