APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d.xr

public final Class MaskTileManager

extends Object
Class Inheritance
Imports
java.awt.*, java.util.*

We render non-antialiased geometry (consisting of rectangles) into a mask, which is later used in a composition step. To avoid mask-allocations of large size, MaskTileManager splits geometry larger than MASK_SIZE into several tiles, and stores the geometry in instances of MaskTile.
Author
Clemens Eisserer

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv XRBackend
pack-priv MaskTile
public static final int
pack-priv long
pack-priv int
pack-priv int
pack-priv ArrayList<MaskTile>
pack-priv XRCompositeManager
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
MaskTileManager(XRCompositeManager xrMgr, int parentXid)

Method Summary

Modifier and TypeMethod and Description
protected void
allocTiles(DirtyRegion maskArea)

Allocates enough MaskTile instances, to cover the whole mask area, or resets existing ones.

public void
clearUploadMask(int mask, int w, int h)

Clears the area of the mask-pixmap used for uploading aa coverage values.

protected void
compositeSingleTile(XRSurfaceData dst, MaskTile tile, DirtyRegion dirtyArea, boolean maskRequired, int tileStartX, int tileStartY, XRColor maskColor)

Renders the rectangles provided to the mask, and does a composition operation with the properties set inXRCompositeManager.

public void
fillMask(XRSurfaceData dst)

Transfers the geometry stored (rectangles, lines) to one or more masks, and renders the result to the destination surface.

public MaskTile
getMainTile()

Returns: MainTile to which rectangles are added before composition.

private void
limitRectCoords(GrowableRectArray rects, int index)

Limits the rect's coordinates to the mask coordinates.

protected void
tileRects()

Tiles the stored rectangles, if they are larger than the MASK_SIZE

public int
uploadMask(int w, int h, int maskscan, int maskoff, byte[] mask)

Uploads aa geometry generated for maskblit/fill into the mask pixmap.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allocatedTilesback to summary
pack-priv int allocatedTiles
conback to summary
pack-priv XRBackend con
mainTileback to summary
pack-priv MaskTile mainTile
MASK_SIZEback to summary
public static final int MASK_SIZE
maskGCback to summary
pack-priv long maskGC
maskPictureback to summary
pack-priv int maskPicture
maskPixmapback to summary
pack-priv int maskPixmap
tileListback to summary
pack-priv ArrayList<MaskTile> tileList
xrMgrback to summary
pack-priv XRCompositeManager xrMgr
xTilesback to summary
pack-priv int xTiles
yTilesback to summary
pack-priv int yTiles

Constructor Detail

MaskTileManagerback to summary
public MaskTileManager(XRCompositeManager xrMgr, int parentXid)

Method Detail

allocTilesback to summary
protected void allocTiles(DirtyRegion maskArea)

Allocates enough MaskTile instances, to cover the whole mask area, or resets existing ones.

clearUploadMaskback to summary
public void clearUploadMask(int mask, int w, int h)

Clears the area of the mask-pixmap used for uploading aa coverage values.

compositeSingleTileback to summary
protected void compositeSingleTile(XRSurfaceData dst, MaskTile tile, DirtyRegion dirtyArea, boolean maskRequired, int tileStartX, int tileStartY, XRColor maskColor)

Renders the rectangles provided to the mask, and does a composition operation with the properties set inXRCompositeManager.

fillMaskback to summary
public void fillMask(XRSurfaceData dst)

Transfers the geometry stored (rectangles, lines) to one or more masks, and renders the result to the destination surface.

getMainTileback to summary
public MaskTile getMainTile()
Returns:MaskTile

MainTile to which rectangles are added before composition.

limitRectCoordsback to summary
private void limitRectCoords(GrowableRectArray rects, int index)

Limits the rect's coordinates to the mask coordinates. The result is used by growDirtyRegion.

tileRectsback to summary
protected void tileRects()

Tiles the stored rectangles, if they are larger than the MASK_SIZE

uploadMaskback to summary
public int uploadMask(int w, int h, int maskscan, int maskoff, byte[] mask)

Uploads aa geometry generated for maskblit/fill into the mask pixmap.