am 9dd9d021: Merge "Expose unchecked copyFrom variants." into honeycomb

* commit '9dd9d021896e350df983baf7174d980a43533e69':
  Expose unchecked copyFrom variants.
This commit is contained in:
Jason Sams
2011-01-19 16:28:41 -08:00
committed by Android Git Automerger
3 changed files with 425 additions and 5 deletions

View File

@@ -166482,6 +166482,74 @@
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="int[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="short[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="byte[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copy2DRangeFrom"
return="void"
abstract="false"
@@ -166661,6 +166729,58 @@
<parameter name="b" type="android.graphics.Bitmap">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="int[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="short[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="byte[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copyTo"
return="void"
abstract="false"
@@ -175630,6 +175750,17 @@
visibility="public"
>
</field>
<field name="KEY_PARAM_PAN"
type="java.lang.String"
transient="false"
volatile="false"
value="&quot;pan&quot;"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
<field name="KEY_PARAM_STREAM"
type="java.lang.String"
transient="false"
@@ -175652,6 +175783,17 @@
visibility="public"
>
</field>
<field name="KEY_PARAM_VOLUME"
type="java.lang.String"
transient="false"
volatile="false"
value="&quot;volume&quot;"
static="true"
final="true"
deprecated="not deprecated"
visibility="public"
>
</field>
</class>
<interface name="TextToSpeech.OnInitListener"
abstract="true"

View File

@@ -167956,6 +167956,74 @@
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="int[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="short[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="byte[]">
</parameter>
</method>
<method name="copy1DRangeFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="off" type="int">
</parameter>
<parameter name="count" type="int">
</parameter>
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copy2DRangeFrom"
return="void"
abstract="false"
@@ -168135,6 +168203,58 @@
<parameter name="b" type="android.graphics.Bitmap">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="int[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="short[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="byte[]">
</parameter>
</method>
<method name="copyFromUnchecked"
return="void"
abstract="false"
native="false"
synchronized="false"
static="false"
final="false"
deprecated="not deprecated"
visibility="public"
>
<parameter name="d" type="float[]">
</parameter>
</method>
<method name="copyTo"
return="void"
abstract="false"
@@ -261680,7 +261800,7 @@
deprecated="not deprecated"
visibility="public"
>
<parameter name="t" type="T">
<parameter name="arg0" type="T">
</parameter>
</method>
</interface>

View File

@@ -268,22 +268,105 @@ public class Allocation extends BaseObj {
}
}
/**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
*
* @param d the source data array
*/
public void copyFromUnchecked(int[] d) {
mRS.validate();
copy1DRangeFromUnchecked(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
*
* @param d the source data array
*/
public void copyFromUnchecked(short[] d) {
mRS.validate();
copy1DRangeFromUnchecked(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
*
* @param d the source data array
*/
public void copyFromUnchecked(byte[] d) {
mRS.validate();
copy1DRangeFromUnchecked(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is not type
* checked which allows an application to fill in structured
* data from an array.
*
* @param d the source data array
*/
public void copyFromUnchecked(float[] d) {
mRS.validate();
copy1DRangeFromUnchecked(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 32 bit integer type.
*
* @param d the source data array
*/
public void copyFrom(int[] d) {
mRS.validate();
copy1DRangeFrom(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 16 bit integer type.
*
* @param d the source data array
*/
public void copyFrom(short[] d) {
mRS.validate();
copy1DRangeFrom(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 8 bit integer type.
*
* @param d the source data array
*/
public void copyFrom(byte[] d) {
mRS.validate();
copy1DRangeFrom(0, mType.getCount(), d);
}
/**
* Copy an allocation from an array. This variant is type
* checked and will generate exceptions if the Allocation type
* is not a 32 bit float type.
*
* @param d the source data array
*/
public void copyFrom(float[] d) {
mRS.validate();
copy1DRangeFrom(0, mType.getCount(), d);
}
/**
* Copy an allocation from a bitmap. The height, width, and
* format of the bitmap must match the existing allocation.
*
* @param b the source bitmap
*/
public void copyFrom(Bitmap b) {
mRS.validate();
validateBitmapSize(b);
@@ -369,39 +452,114 @@ public class Allocation extends BaseObj {
mRS.nAllocationGenerateMipmaps(getID());
}
void copy1DRangeFromUnchecked(int off, int count, int[] d) {
/**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, int[] d) {
int dataSize = mType.mElement.getSizeBytes() * count;
data1DChecks(off, count, d.length * 4, dataSize);
mRS.nAllocationData1D(getID(), off, 0, count, d, dataSize);
}
void copy1DRangeFromUnchecked(int off, int count, short[] d) {
/**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, short[] d) {
int dataSize = mType.mElement.getSizeBytes() * count;
data1DChecks(off, count, d.length * 2, dataSize);
mRS.nAllocationData1D(getID(), off, 0, count, d, dataSize);
}
void copy1DRangeFromUnchecked(int off, int count, byte[] d) {
/**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, byte[] d) {
int dataSize = mType.mElement.getSizeBytes() * count;
data1DChecks(off, count, d.length, dataSize);
mRS.nAllocationData1D(getID(), off, 0, count, d, dataSize);
}
void copy1DRangeFromUnchecked(int off, int count, float[] d) {
/**
* Copy part of an allocation from an array. This variant is
* not type checked which allows an application to fill in
* structured data from an array.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFromUnchecked(int off, int count, float[] d) {
int dataSize = mType.mElement.getSizeBytes() * count;
data1DChecks(off, count, d.length * 4, dataSize);
mRS.nAllocationData1D(getID(), off, 0, count, d, dataSize);
}
/**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 32 bit integer type.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, int[] d) {
validateIsInt32();
copy1DRangeFromUnchecked(off, count, d);
}
/**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 16 bit integer type.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, short[] d) {
validateIsInt16();
copy1DRangeFromUnchecked(off, count, d);
}
/**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 8 bit integer type.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, byte[] d) {
validateIsInt8();
copy1DRangeFromUnchecked(off, count, d);
}
/**
* Copy part of an allocation from an array. This variant is
* type checked and will generate exceptions if the Allocation
* type is not a 32 bit float type.
*
* @param off The offset of the first element to be copied.
* @param count The number of elements to be copied.
* @param d the source data array
*/
public void copy1DRangeFrom(int off, int count, float[] d) {
validateIsFloat32();
copy1DRangeFromUnchecked(off, count, d);