Use the adjustment directly rather than going through the prefs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2150 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ImageManager.java,v 1.39 2003/01/15 02:31:50 mdb Exp $
|
||||
// $Id: ImageManager.java,v 1.40 2003/01/15 02:36:18 mdb Exp $
|
||||
|
||||
package com.threerings.media.image;
|
||||
|
||||
@@ -94,8 +94,7 @@ public class ImageManager
|
||||
_rmgr = rmgr;
|
||||
|
||||
// create our image cache
|
||||
int icsize = MediaPrefs.config.getValue(
|
||||
IMAGE_CACHE_SIZE_KEY, DEFAULT_IMAGE_CACHE_SIZE);
|
||||
int icsize = _cacheSize.getValue();
|
||||
Log.debug("Creating image cache [size=" + icsize + "].");
|
||||
_ccache = new LRUHashMap(icsize);
|
||||
|
||||
@@ -491,18 +490,11 @@ public class ImageManager
|
||||
protected static RuntimeAdjust.IntAdjust _cacheSize =
|
||||
new RuntimeAdjust.IntAdjust(
|
||||
"Size (in images) of the image manager LRU cache [requires reboot]",
|
||||
IMAGE_CACHE_SIZE_KEY, MediaPrefs.config, DEFAULT_IMAGE_CACHE_SIZE);
|
||||
"narya.media.image.cache_size", MediaPrefs.config, 100);
|
||||
|
||||
/** The classname of the ImageIO-based image loader which we attempt
|
||||
* to use but fallback from if we're not running a JVM that has
|
||||
* ImageIO support. */
|
||||
protected static final String IMAGEIO_LOADER =
|
||||
"com.threerings.media.image.ImageIOLoader";
|
||||
|
||||
/** The config key for our cache size property. */
|
||||
protected static final String IMAGE_CACHE_SIZE_KEY =
|
||||
"narya.media.image.cache_size";
|
||||
|
||||
/** The maximum number of images that may be cached at any one time. */
|
||||
protected static final int DEFAULT_IMAGE_CACHE_SIZE = 100;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TileSet.java,v 1.38 2003/01/15 02:31:50 mdb Exp $
|
||||
// $Id: TileSet.java,v 1.39 2003/01/15 02:36:18 mdb Exp $
|
||||
|
||||
package com.threerings.media.tile;
|
||||
|
||||
@@ -141,8 +141,7 @@ public abstract class TileSet
|
||||
|
||||
// create our tile cache if necessary
|
||||
if (_tiles == null) {
|
||||
int tcsize = MediaPrefs.config.getValue(
|
||||
TILE_CACHE_SIZE_KEY, DEFAULT_TILE_CACHE_SIZE);
|
||||
int tcsize = _cacheSize.getValue();
|
||||
Log.debug("Creating tile cache [size=" + tcsize + "].");
|
||||
_tiles = new LRUHashMap(tcsize);
|
||||
}
|
||||
@@ -307,12 +306,5 @@ public abstract class TileSet
|
||||
protected static RuntimeAdjust.IntAdjust _cacheSize =
|
||||
new RuntimeAdjust.IntAdjust(
|
||||
"Size (in tiles) of the tile LRU cache [requires reboot]",
|
||||
TILE_CACHE_SIZE_KEY, MediaPrefs.config, DEFAULT_TILE_CACHE_SIZE);
|
||||
|
||||
/** The config key for our cache size property. */
|
||||
protected static final String TILE_CACHE_SIZE_KEY =
|
||||
"narya.media.tile.cache_size";
|
||||
|
||||
/** The default tile cache size. */
|
||||
protected static final int DEFAULT_TILE_CACHE_SIZE = 500;
|
||||
"narya.media.tile.cache_size", MediaPrefs.config, 500);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user