javax.media.jai
Interface TileScheduler


public abstract interface TileScheduler

A class implementing a mechanism for scheduling tile calculation. In various implementations tile computation may make use of multithreading and multiple simultaneous network connections for improved performance.


Method Summary
 void prefetchTiles(PlanarImage target, java.awt.Point[] tileIndices)
          Hints to the TileScheduler that the given tiles from the given PlanarImage might be needed in the near future.
 java.awt.image.Raster scheduleTile(OpImage target, int tileX, int tileY)
          Schedules a tile for computation.
 java.awt.image.Raster[] scheduleTiles(OpImage target, java.awt.Point[] tileIndices)
          Schedules a list of tiles for computation.
 

Method Detail

scheduleTile

public java.awt.image.Raster scheduleTile(OpImage target,
                                          int tileX,
                                          int tileY)
Schedules a tile for computation. Called by OpImage.getTile(). After performing a dependency analysis, this method makes OpImage.computeTile() calls for source tiles needed to calculate the ultimate destination tile.
Parameters:
target - An OpImage whose tile is to be computed.
tileX - The X index of the tile to be computed.
tileY - The Y index of the tile to be computed.
Returns:
A Raster containing the contents of the tile.

scheduleTiles

public java.awt.image.Raster[] scheduleTiles(OpImage target,
                                             java.awt.Point[] tileIndices)
Schedules a list of tiles for computation. Called by OpImage.getTiles. After performing a dependency analysis, this method makes OpImage.computeTile() calls for source tiles needed to calculate the ultimate destination tile.
Parameters:
target - The OpImage to schedule tiles from.
tileIndices - A list of tileIndices indicating which tiles to schedule for computation.
Returns:
An array of Raster containing a computed raster for every tileIndex passed in.

prefetchTiles

public void prefetchTiles(PlanarImage target,
                          java.awt.Point[] tileIndices)
Hints to the TileScheduler that the given tiles from the given PlanarImage might be needed in the near future. Some TileScheduler implementations will spawn a low priority thread to compute the tiles while others may ignore the hint.
Parameters:
target - The OpImage to prefetch tiles from.
tileIndices - A list of tileIndices indicating which tiles to prefetch.



Casa de Bender