APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.geom

public final Class DirtyRegionContainer

extends Object
Class Inheritance
Imports
java.util.Arrays

Container for array of dirty regions. This container internally holds pointer to the first empty dirty region in the array and index of last modified dirty region. It also introduces convenient methods to modify the array of dirty regions.

Field Summary

Modifier and TypeField and Description
private RectBounds[]
public static final int
public static final int
private int
private int[][]
heap

Shared for all compressing algorithms

private int
private long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addDirtyRegion(final RectBounds
the dirty region.
region
)

Adds new dirty region to the array.

public boolean
private RectBounds
compress(final RectBounds region)

private void
compress_heap()

Heap-based compressing algorithm

public DirtyRegionContainer
copy()

public DirtyRegionContainer
public DirtyRegionContainer
public DirtyRegionContainer
public boolean
equals(Object obj)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public RectBounds

Returns:

dirty region at given index
getDirtyRegion
(int
the index of requested dirty region
index
)

Gets the dirty region at given index.

public void
grow(int horizontal, int vertical)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

private boolean

Returns:

true if there is empty region in the array; false otherwise
hasSpace
()

If there are empty regions in the dirty regions array.

private void
private void
private void
initDirtyRegions(int count)

public int
public void
private void
regioncopy(RectBounds[] src, int from, RectBounds[] dest, int to, int length)

public void
private int
resolveMap(int[] map, int idx)

public void
public void
setDirtyRegion(int index, RectBounds region)

private void
siftDown(int i)

public int
size()

private int[]
private int[]
takeMinWithMap(int[] map)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

private int
unifiedRegionArea(int i0, int i1)

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

dirtyRegionsback to summary
private RectBounds[] dirtyRegions
DTR_CONTAINS_CLIPback to summary
public static final int DTR_CONTAINS_CLIP
DTR_OKback to summary
public static final int DTR_OK
emptyIndexback to summary
private int emptyIndex
heapback to summary
private int[][] heap

Shared for all compressing algorithms

heapSizeback to summary
private int heapSize
invalidMaskback to summary
private long invalidMask

Constructor Detail

DirtyRegionContainerback to summary
public DirtyRegionContainer(int count)

Method Detail

addDirtyRegionback to summary
public void addDirtyRegion(final RectBounds region)

Adds new dirty region to the array.

Parameters
region:RectBounds

the dirty region.

checkAndClearRegionback to summary
public boolean checkAndClearRegion(int index)
compressback to summary
private RectBounds compress(final RectBounds region)
compress_heapback to summary
private void compress_heap()

Heap-based compressing algorithm

copyback to summary
public DirtyRegionContainer copy()
deriveWithNewContainerback to summary
public DirtyRegionContainer deriveWithNewContainer(DirtyRegionContainer other)
deriveWithNewRegionback to summary
public DirtyRegionContainer deriveWithNewRegion(RectBounds region)
deriveWithNewRegionsback to summary
public DirtyRegionContainer deriveWithNewRegions(RectBounds[] regions)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Annotations
@Override
getDirtyRegionback to summary
public RectBounds getDirtyRegion(int index)

Gets the dirty region at given index.

Parameters
index:int

the index of requested dirty region

Returns:RectBounds

dirty region at given index

growback to summary
public void grow(int horizontal, int vertical)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
hasSpaceback to summary
private boolean hasSpace()

If there are empty regions in the dirty regions array.

Returns:boolean

true if there is empty region in the array; false otherwise

heapCompressback to summary
private void heapCompress()
heapifyback to summary
private void heapify()
initDirtyRegionsback to summary
private void initDirtyRegions(int count)
maxSpaceback to summary
public int maxSpace()
mergeback to summary
public void merge(DirtyRegionContainer other)
regioncopyback to summary
private void regioncopy(RectBounds[] src, int from, RectBounds[] dest, int to, int length)
resetback to summary
public void reset()
resolveMapback to summary
private int resolveMap(int[] map, int idx)
roundOutback to summary
public void roundOut()
setDirtyRegionback to summary
public void setDirtyRegion(int index, RectBounds region)
siftDownback to summary
private void siftDown(int i)
sizeback to summary
public int size()
takeMinback to summary
private int[] takeMin()
takeMinWithMapback to summary
private int[] takeMinWithMap(int[] map)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
unifiedRegionAreaback to summary
private int unifiedRegionArea(int i0, int i1)