src/share/classes/java/awt/image/DataBufferFloat.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2007, 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
--- 1,7 ----
/*
! * Copyright (c) 2000, 2014, 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
*** 154,164 ****
* used as the banks of this <code>DataBuffer</code>.
* @param size The number of elements of each array to be used.
*/
public DataBufferFloat(float dataArray[][], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
! bankdata = (float[][]) dataArray.clone();
data = bankdata[0];
}
/**
* Constructs a <code>float</code>-based <code>DataBuffer</code>
--- 154,164 ----
* used as the banks of this <code>DataBuffer</code>.
* @param size The number of elements of each array to be used.
*/
public DataBufferFloat(float dataArray[][], int size) {
super(UNTRACKABLE, TYPE_FLOAT, size, dataArray.length);
! bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Constructs a <code>float</code>-based <code>DataBuffer</code>
*** 178,188 ****
* @param size The number of elements of each array to be used.
* @param offsets An array of integer offsets, one for each bank.
*/
public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
! bankdata = (float[][]) dataArray.clone();
data = bankdata[0];
}
/**
* Returns the default (first) <code>float</code> data array.
--- 178,188 ----
* @param size The number of elements of each array to be used.
* @param offsets An array of integer offsets, one for each bank.
*/
public DataBufferFloat(float dataArray[][], int size, int offsets[]) {
super(UNTRACKABLE, TYPE_FLOAT, size,dataArray.length, offsets);
! bankdata = dataArray.clone();
data = bankdata[0];
}
/**
* Returns the default (first) <code>float</code> data array.
*** 225,235 ****
*
* @return all data arrays for this data buffer.
*/
public float[][] getBankData() {
theTrackable.setUntrackable();
! return (float[][]) bankdata.clone();
}
/**
* Returns the requested data array element from the first
* (default) bank as an <code>int</code>.
--- 225,235 ----
*
* @return all data arrays for this data buffer.
*/
public float[][] getBankData() {
theTrackable.setUntrackable();
! return bankdata.clone();
}
/**
* Returns the requested data array element from the first
* (default) bank as an <code>int</code>.