--- a/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java Wed Jun 15 16:33:05 2016 +0530
+++ b/jdk/src/java.desktop/share/classes/sun/java2d/marlin/Dasher.java Wed Jun 15 21:43:39 2016 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -41,9 +41,9 @@
*/
final class Dasher implements sun.awt.geom.PathConsumer2D, MarlinConst {
- static final int recLimit = 4;
+ static final int REC_LIMIT = 4;
static final float ERR = 0.01f;
- static final float minTincrement = 1f / (1 << recLimit);
+ static final float MIN_T_INC = 1f / (1 << REC_LIMIT);
private PathConsumer2D out;
private float[] dash;
@@ -139,7 +139,7 @@
* clean up before reusing this instance
*/
void dispose() {
- if (doCleanDirty) {
+ if (DO_CLEAN_DIRTY) {
// Force zero-fill dirty arrays:
Arrays.fill(curCurvepts, 0f);
Arrays.fill(firstSegmentsBuffer, 0f);
@@ -217,8 +217,8 @@
int segIdx = firstSegidx;
float[] buf = firstSegmentsBuffer;
if (segIdx + len > buf.length) {
- if (doStats) {
- RendererContext.stats.stat_array_dasher_firstSegmentsBuffer
+ if (DO_STATS) {
+ rdrCtx.stats.stat_array_dasher_firstSegmentsBuffer
.add(segIdx + len);
}
firstSegmentsBuffer = buf
@@ -403,8 +403,8 @@
private final float[] curLeafCtrlPolyLengths = new float[3];
LengthIterator() {
- this.recCurveStack = new float[recLimit + 1][8];
- this.sides = new Side[recLimit];
+ this.recCurveStack = new float[REC_LIMIT + 1][8];
+ this.sides = new Side[REC_LIMIT];
// if any methods are called without first initializing this object
// on a curve, we want it to fail ASAP.
this.nextT = Float.MAX_VALUE;
@@ -421,7 +421,7 @@
void reset() {
// keep data dirty
// as it appears not useful to reset data:
- if (doCleanDirty) {
+ if (DO_CLEAN_DIRTY) {
final int recLimit = recCurveStack.length - 1;
for (int i = recLimit; i >= 0; i--) {
Arrays.fill(recCurveStack[i], 0f);
@@ -607,7 +607,7 @@
if (len >= 0f) {
lastT = nextT;
lenAtLastT = lenAtNextT;
- nextT += (1 << (recLimit - recLevel)) * minTincrement;
+ nextT += (1 << (REC_LIMIT - recLevel)) * MIN_T_INC;
lenAtNextT += len;
// invalidate caches
flatLeafCoefCache[2] = -1f;
@@ -641,7 +641,7 @@
final float lineLen = Helpers.linelen(curve[0], curve[1],
curve[curveType-2],
curve[curveType-1]);
- if ((polyLen - lineLen) < ERR || recLevel == recLimit) {
+ if ((polyLen - lineLen) < ERR || recLevel == REC_LIMIT) {
return (polyLen + lineLen) / 2f;
}
return -1f;