|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
package sun.java2d.marlin; |
|
|
|
|
|
|
|
*/ |
|
interface MarlinConst { |
|
|
|
static final boolean enableLogs = MarlinProperties.isLoggingEnabled(); |
|
|
|
static final boolean useLogger = enableLogs && MarlinProperties.isUseLogger(); |
|
|
|
|
|
static final boolean logCreateContext = enableLogs |
|
&& MarlinProperties.isLogCreateContext(); |
|
|
|
static final boolean logUnsafeMalloc = enableLogs |
|
&& MarlinProperties.isLogUnsafeMalloc(); |
|
|
|
static final boolean doCheckUnsafe = false; |
|
|
|
|
|
static final boolean doStats = enableLogs && MarlinProperties.isDoStats(); |
|
// do monitors |
|
|
|
static final boolean doMonitors = false; |
|
// static final boolean doMonitors = enableLogs && MarlinProperties.isDoMonitors(); |
|
|
|
static final boolean doChecks = enableLogs && MarlinProperties.isDoChecks(); |
|
|
|
|
|
static final boolean DO_AA_RANGE_CHECK = false; |
|
|
|
|
|
static final boolean doLogWidenArray = enableLogs && false; |
|
|
|
static final boolean doLogOverSize = enableLogs && false; |
|
|
|
static final boolean doTrace = enableLogs && false; |
|
|
|
static final boolean doFlushMonitors = true; |
|
|
|
static final boolean useDumpThread = false; |
|
|
|
static final long statDump = 5000L; |
|
|
|
|
|
static final boolean doCleanDirty = false; |
|
|
|
|
|
static final boolean useSimplifier = MarlinProperties.isUseSimplifier(); |
|
|
|
|
|
static final boolean doLogBounds = enableLogs && false; |
|
|
|
// Initial Array sizing (initial context capacity) ~ 512K |
|
|
|
|
|
static final int INITIAL_PIXEL_DIM |
|
= MarlinProperties.getInitialImageSize(); |
|
|
|
|
|
static final int INITIAL_ARRAY = 256; |
|
static final int INITIAL_SMALL_ARRAY = 1024; |
|
static final int INITIAL_MEDIUM_ARRAY = 4096; |
|
static final int INITIAL_LARGE_ARRAY = 8192; |
|
static final int INITIAL_ARRAY_16K = 16384; |
|
static final int INITIAL_ARRAY_32K = 32768; |
|
|
|
static final int INITIAL_AA_ARRAY = INITIAL_PIXEL_DIM; |
|
|
|
// initial edges (24 bytes) = 24K [ints] = 96K |
|
static final int INITIAL_EDGES_CAPACITY = 4096 * 24; |
|
|
|
|
|
static final byte BYTE_0 = (byte) 0; |
|
|
|
|
|
public static final int SUBPIXEL_LG_POSITIONS_X |
|
= MarlinProperties.getSubPixel_Log2_X(); |
|
public static final int SUBPIXEL_LG_POSITIONS_Y |
|
= MarlinProperties.getSubPixel_Log2_Y(); |
|
|
|
|
|
public static final int SUBPIXEL_POSITIONS_X = 1 << (SUBPIXEL_LG_POSITIONS_X); |
|
public static final int SUBPIXEL_POSITIONS_Y = 1 << (SUBPIXEL_LG_POSITIONS_Y); |
|
|
|
public static final float NORM_SUBPIXELS |
|
= (float)Math.sqrt(( SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_X |
|
+ SUBPIXEL_POSITIONS_Y * SUBPIXEL_POSITIONS_Y)/2.0); |
|
|
|
public static final int MAX_AA_ALPHA |
|
= SUBPIXEL_POSITIONS_X * SUBPIXEL_POSITIONS_Y; |
|
|
|
public static final int TILE_SIZE_LG = MarlinProperties.getTileSize_Log2(); |
|
public static final int TILE_SIZE = 1 << TILE_SIZE_LG; |
|
|
|
public static final int BLOCK_SIZE_LG = MarlinProperties.getBlockSize_Log2(); |
|
public static final int BLOCK_SIZE = 1 << BLOCK_SIZE_LG; |
|
} |