< prev index next >
src/java.desktop/share/classes/java/awt/TexturePaintContext.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -333,11 +333,11 @@
* Note that since the range is half-open, the values are always
* logically less than 1.0. This makes sense because while choosing
* pixels to blend, when the error values reach 1.0 we move to the
* next pixel and reset them to 0.0.
*/
- public static int blend(int rgbs[], int xmul, int ymul) {
+ public static int blend(int[] rgbs, int xmul, int ymul) {
// xmul/ymul are 31 bits wide, (0 => 2^31-1)
// shift them to 12 bits wide, (0 => 2^12-1)
xmul = (xmul >>> 19);
ymul = (ymul >>> 19);
int accumA, accumR, accumG, accumB;
@@ -370,14 +370,14 @@
(((accumB + (1<<23)) >>> 24) ));
}
static class Int extends TexturePaintContext {
IntegerInterleavedRaster srcRas;
- int inData[];
+ int[] inData;
int inOff;
int inSpan;
- int outData[];
+ int[] outData;
int outOff;
int outSpan;
boolean filter;
public Int(IntegerInterleavedRaster srcRas, ColorModel cm,
@@ -420,11 +420,11 @@
int rowxerr = xerr;
int rowyerr = yerr;
if (normalx) {
outSpan -= w;
}
- int rgbs[] = filter ? new int[4] : null;
+ int[] rgbs = filter ? new int[4] : null;
for (int j = 0; j < h; j++) {
if (normalx) {
int in = inOff + rowy * inSpan + bWidth;
x = bWidth - rowx;
out += w;
@@ -506,14 +506,14 @@
}
}
static class Byte extends TexturePaintContext {
ByteInterleavedRaster srcRas;
- byte inData[];
+ byte[] inData;
int inOff;
int inSpan;
- byte outData[];
+ byte[] outData;
int outOff;
int outSpan;
public Byte(ByteInterleavedRaster srcRas, ColorModel cm,
AffineTransform xform, int maxw)
@@ -626,15 +626,15 @@
}
}
static class ByteFilter extends TexturePaintContext {
ByteInterleavedRaster srcRas;
- int inPalette[];
- byte inData[];
+ int[] inPalette;
+ byte[] inData;
int inOff;
int inSpan;
- int outData[];
+ int[] outData;
int outOff;
int outSpan;
public ByteFilter(ByteInterleavedRaster srcRas, ColorModel cm,
AffineTransform xform, int maxw)
@@ -675,11 +675,11 @@
int outSpan = this.outSpan;
int rowx = x;
int rowy = y;
int rowxerr = xerr;
int rowyerr = yerr;
- int rgbs[] = new int[4];
+ int[] rgbs = new int[4];
for (int j = 0; j < h; j++) {
x = rowx;
y = rowy;
xerr = rowxerr;
yerr = rowyerr;
@@ -762,11 +762,11 @@
int rowy = y;
int rowxerr = xerr;
int rowyerr = yerr;
WritableRaster srcRas = this.srcRas;
WritableRaster outRas = this.outRas;
- int rgbs[] = filter ? new int[4] : null;
+ int[] rgbs = filter ? new int[4] : null;
for (int j = 0; j < h; j++) {
x = rowx;
y = rowy;
xerr = rowxerr;
yerr = rowyerr;
< prev index next >