Added support for obtaining estimated memory usage of a tile; modified

tile cache to be based on memory usage rather than tile count.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2175 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-01-17 02:30:50 +00:00
parent 6f7ad6a09f
commit f2c3211534
2 changed files with 19 additions and 6 deletions
+9 -1
View File
@@ -1,5 +1,5 @@
//
// $Id: Tile.java,v 1.26 2003/01/13 22:49:46 mdb Exp $
// $Id: Tile.java,v 1.27 2003/01/17 02:30:50 mdb Exp $
package com.threerings.media.tile;
@@ -39,6 +39,14 @@ public class Tile implements Cloneable
return _mirage.getHeight();
}
/**
* Returns the estimated memory usage of our underlying tile image.
*/
public long getEstimatedMemoryUsage ()
{
return _mirage.getEstimatedMemoryUsage();
}
/**
* Render the tile image at the specified position in the given
* graphics context.