# AllocationAdapter

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Inherited Constants](https://developer.android.com/reference/android/renderscript/AllocationAdapter#inhconstants)\|[Methods](https://developer.android.com/reference/android/renderscript/AllocationAdapter#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/renderscript/AllocationAdapter#inhmethods)  

# AllocationAdapter

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/renderscript/AllocationAdapter "View this page in Kotlin")\|Java

`
public


class
AllocationAdapter
`  
`


``


``

extends `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)`


``


`

|---|---|---|----------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||||
| ↳ | [android.renderscript.BaseObj](https://developer.android.com/reference/android/renderscript/BaseObj) |||
|   | ↳ | [android.renderscript.Allocation](https://developer.android.com/reference/android/renderscript/Allocation) ||
|   |   | ↳ | android.renderscript.AllocationAdapter |

<br />

*** ** * ** ***

<br />

**This class was deprecated in API level 31.**   
Renderscript has been deprecated in API level 31. Please refer to the[migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide)for the proposed alternatives.

Only intended for use by generated reflected code.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ### Inherited constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From class[android.renderscript.Allocation](https://developer.android.com/reference/android/renderscript/Allocation) |-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `int` | [USAGE_GRAPHICS_CONSTANTS](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_GRAPHICS_CONSTANTS) The Allocation will be used as the source of shader constants by one or more programs.                                                                                                                                                 | | `int` | [USAGE_GRAPHICS_RENDER_TARGET](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_GRAPHICS_RENDER_TARGET) The Allocation will be used as a target for offscreen rendering This was deprecated in API level 16.                                                                                                                           | | `int` | [USAGE_GRAPHICS_TEXTURE](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_GRAPHICS_TEXTURE) The Allocation will be used as a texture source by one or more graphics programs.                                                                                                                                                          | | `int` | [USAGE_GRAPHICS_VERTEX](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_GRAPHICS_VERTEX) The Allocation will be used as a graphics mesh.                                                                                                                                                                                              | | `int` | [USAGE_IO_INPUT](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_IO_INPUT) The Allocation will be used as a[Surface](https://developer.android.com/reference/android/view/Surface)consumer.                                                                                                                                           | | `int` | [USAGE_IO_OUTPUT](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_IO_OUTPUT) The Allocation will be used as a[Surface](https://developer.android.com/reference/android/view/Surface)producer.                                                                                                                                         | | `int` | [USAGE_SCRIPT](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_SCRIPT) The Allocation will be bound to and accessed by scripts.                                                                                                                                                                                                       | | `int` | [USAGE_SHARED](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_SHARED) The Allocation's backing store will be inherited from another object (usually a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)); copying to or from the original source Bitmap will cause a synchronization rather than a full copy. | |

|                                                                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                                                                        ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | ` `[create1D](https://developer.android.com/reference/android/renderscript/AllocationAdapter#create1D(android.renderscript.RenderScript,%20android.renderscript.Allocation))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` a) `                                                                                                                                                                        |
| ` static `[AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | ` `[create2D](https://developer.android.com/reference/android/renderscript/AllocationAdapter#create2D(android.renderscript.RenderScript,%20android.renderscript.Allocation))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` a) `                                                                                                                                                                        |
| ` static `[AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | ` `[createTyped](https://developer.android.com/reference/android/renderscript/AllocationAdapter#createTyped(android.renderscript.RenderScript,%20android.renderscript.Allocation,%20android.renderscript.Type))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` a, `[Type](https://developer.android.com/reference/android/renderscript/Type)` t) ` Create an arbitrary window into the base allocation. |
| ` void`                                                                                                       | ` `[resize](https://developer.android.com/reference/android/renderscript/AllocationAdapter#resize(int))`(int dimX) ` *This method is deprecated. RenderScript objects should be immutable once created. The replacement is to create a new allocation and copy the contents. This function will throw an exception if API 21 or higher is used.*                                                                                                                                                                                                  |
| ` void`                                                                                                       | ` `[setFace](https://developer.android.com/reference/android/renderscript/AllocationAdapter#setFace(android.renderscript.Type.CubemapFace))`(`[Type.CubemapFace](https://developer.android.com/reference/android/renderscript/Type.CubemapFace)` cf) ` Set the active Face.                                                                                                                                                                                                                                                                       |
| ` void`                                                                                                       | ` `[setLOD](https://developer.android.com/reference/android/renderscript/AllocationAdapter#setLOD(int))`(int lod) ` Set the active LOD.                                                                                                                                                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                       | ` `[setX](https://developer.android.com/reference/android/renderscript/AllocationAdapter#setX(int))`(int x) ` Set the active X.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                       | ` `[setY](https://developer.android.com/reference/android/renderscript/AllocationAdapter#setY(int))`(int y) ` Set the active Y.                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ` void`                                                                                                       | ` `[setZ](https://developer.android.com/reference/android/renderscript/AllocationAdapter#setZ(int))`(int z) ` Set the active Z.                                                                                                                                                                                                                                                                                                                                                                                                                   |

| ### Inherited methods |
|-----------------------|---|
| From class` `[android.renderscript.Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` ` |---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20float[]))`(int off, int count, float[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20short[]))`(int off, int count, short[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20java.lang.Object))`(int off, int count, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20android.renderscript.Allocation,%20int))`(int off, int count, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` data, int dataOff) ` Copy part of an Allocation into this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20int[]))`(int off, int count, int[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copy1DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFrom(int,%20int,%20byte[]))`(int off, int count, byte[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[copy1DRangeFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFromUnchecked(int,%20int,%20byte[]))`(int off, int count, byte[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copy1DRangeFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFromUnchecked(int,%20int,%20short[]))`(int off, int count, short[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                           | ` `[copy1DRangeFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFromUnchecked(int,%20int,%20java.lang.Object))`(int off, int count, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copy1DRangeFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFromUnchecked(int,%20int,%20int[]))`(int off, int count, int[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[copy1DRangeFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeFromUnchecked(int,%20int,%20float[]))`(int off, int count, float[] d) ` Copy an array into a 1D region of this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                           | ` `[copy1DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeTo(int,%20int,%20short[]))`(int off, int count, short[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copy1DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeTo(int,%20int,%20java.lang.Object))`(int off, int count, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copy1DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeTo(int,%20int,%20int[]))`(int off, int count, int[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[copy1DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeTo(int,%20int,%20float[]))`(int off, int count, float[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copy1DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeTo(int,%20int,%20byte[]))`(int off, int count, byte[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[copy1DRangeToUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeToUnchecked(int,%20int,%20byte[]))`(int off, int count, byte[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copy1DRangeToUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeToUnchecked(int,%20int,%20short[]))`(int off, int count, short[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[copy1DRangeToUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeToUnchecked(int,%20int,%20java.lang.Object))`(int off, int count, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[copy1DRangeToUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeToUnchecked(int,%20int,%20int[]))`(int off, int count, int[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[copy1DRangeToUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copy1DRangeToUnchecked(int,%20int,%20float[]))`(int off, int count, float[] d) ` Copy a 1D region of this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20android.renderscript.Allocation,%20int,%20int))`(int xoff, int yoff, int w, int h, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` data, int dataXoff, int dataYoff) ` Copy a rectangular region from an Allocation into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20android.graphics.Bitmap))`(int xoff, int yoff, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` data) ` Copy a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)into an Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20byte[]))`(int xoff, int yoff, int w, int h, byte[] data) ` Copy from an array into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20java.lang.Object))`(int xoff, int yoff, int w, int h, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy from an array into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20int[]))`(int xoff, int yoff, int w, int h, int[] data) ` Copy from an array into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20float[]))`(int xoff, int yoff, int w, int h, float[] data) ` Copy from an array into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                           | ` `[copy2DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeFrom(int,%20int,%20int,%20int,%20short[]))`(int xoff, int yoff, int w, int h, short[] data) ` Copy from an array into a rectangular region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                           | ` `[copy2DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeTo(int,%20int,%20int,%20int,%20short[]))`(int xoff, int yoff, int w, int h, short[] data) ` Copy from a rectangular region in this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[copy2DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeTo(int,%20int,%20int,%20int,%20byte[]))`(int xoff, int yoff, int w, int h, byte[] data) ` Copy from a rectangular region in this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                           | ` `[copy2DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeTo(int,%20int,%20int,%20int,%20java.lang.Object))`(int xoff, int yoff, int w, int h, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy from a rectangular region in this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copy2DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeTo(int,%20int,%20int,%20int,%20float[]))`(int xoff, int yoff, int w, int h, float[] data) ` Copy from a rectangular region in this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[copy2DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy2DRangeTo(int,%20int,%20int,%20int,%20int[]))`(int xoff, int yoff, int w, int h, int[] data) ` Copy from a rectangular region in this Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | | ` void`                                                                                           | ` `[copy3DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy3DRangeFrom(int,%20int,%20int,%20int,%20int,%20int,%20android.renderscript.Allocation,%20int,%20int,%20int))`(int xoff, int yoff, int zoff, int w, int h, int d, `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` data, int dataXoff, int dataYoff, int dataZoff) ` Copy a rectangular region into the allocation from another allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[copy3DRangeFrom](https://developer.android.com/reference/android/renderscript/Allocation#copy3DRangeFrom(int,%20int,%20int,%20int,%20int,%20int,%20java.lang.Object))`(int xoff, int yoff, int zoff, int w, int h, int d, `[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy from an array into a 3D region in this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[copy3DRangeTo](https://developer.android.com/reference/android/renderscript/Allocation#copy3DRangeTo(int,%20int,%20int,%20int,%20int,%20int,%20java.lang.Object))`(int xoff, int yoff, int zoff, int w, int h, int d, `[Object](https://developer.android.com/reference/java/lang/Object)` array) `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(android.graphics.Bitmap))`(`[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b) ` Copy into an Allocation from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(short[]))`(short[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(int[]))`(int[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(android.renderscript.BaseObj[]))`(`[BaseObj[]](https://developer.android.com/reference/android/renderscript/BaseObj)` d) ` Copy an array of RS objects to the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(byte[]))`(byte[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(float[]))`(float[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(android.renderscript.Allocation))`(`[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)` a) ` Copy an Allocation from an Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | | ` void`                                                                                           | ` `[copyFrom](https://developer.android.com/reference/android/renderscript/Allocation#copyFrom(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copyFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copyFromUnchecked(float[]))`(float[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[copyFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copyFromUnchecked(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` void`                                                                                           | ` `[copyFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copyFromUnchecked(short[]))`(short[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[copyFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copyFromUnchecked(int[]))`(int[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                           | ` `[copyFromUnchecked](https://developer.android.com/reference/android/renderscript/Allocation#copyFromUnchecked(byte[]))`(byte[] d) ` Copy into this Allocation from an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(android.graphics.Bitmap))`(`[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b) ` Copy from the Allocation into a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(short[]))`(short[] d) ` Copy from the Allocation into a short array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(byte[]))`(byte[] d) ` Copy from the Allocation into a byte array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(float[]))`(float[] d) ` Copy from the Allocation into a float array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(int[]))`(int[] d) ` Copy from the Allocation into a int array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | | ` void`                                                                                           | ` `[copyTo](https://developer.android.com/reference/android/renderscript/Allocation#copyTo(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` array) ` Copy from the Allocation into an array.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` static `[Allocation[]](https://developer.android.com/reference/android/renderscript/Allocation) | ` `[createAllocations](https://developer.android.com/reference/android/renderscript/Allocation#createAllocations(android.renderscript.RenderScript,%20android.renderscript.Type,%20int,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Type](https://developer.android.com/reference/android/renderscript/Type)` t, int usage, int numAlloc) ` Creates a new Allocation Array with the given[Type](https://developer.android.com/reference/android/renderscript/Type), and usage flags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createCubemapFromBitmap](https://developer.android.com/reference/android/renderscript/Allocation#createCubemapFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b, `[Allocation.MipmapControl](https://developer.android.com/reference/android/renderscript/Allocation.MipmapControl)` mips, int usage) ` Creates a cubemap Allocation from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)containing the horizontal list of cube faces.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createCubemapFromBitmap](https://developer.android.com/reference/android/renderscript/Allocation#createCubemapFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b) ` Creates a non-mipmapped cubemap Allocation for use as a graphics texture from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)containing the horizontal list of cube faces.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createCubemapFromCubeFaces](https://developer.android.com/reference/android/renderscript/Allocation#createCubemapFromCubeFaces(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` xpos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` xneg, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` ypos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` yneg, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` zpos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` zneg) ` Creates a non-mipmapped cubemap Allocation for use as a sampler input from 6[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)objects containing the cube faces.                                                                                                                                                     | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createCubemapFromCubeFaces](https://developer.android.com/reference/android/renderscript/Allocation#createCubemapFromCubeFaces(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` xpos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` xneg, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` ypos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` yneg, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` zpos, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` zneg, `[Allocation.MipmapControl](https://developer.android.com/reference/android/renderscript/Allocation.MipmapControl)` mips, int usage) ` Creates a cubemap Allocation from 6[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)objects containing the cube faces. | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createFromBitmap](https://developer.android.com/reference/android/renderscript/Allocation#createFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b) ` Creates an Allocation from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createFromBitmap](https://developer.android.com/reference/android/renderscript/Allocation#createFromBitmap(android.renderscript.RenderScript,%20android.graphics.Bitmap,%20android.renderscript.Allocation.MipmapControl,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)` b, `[Allocation.MipmapControl](https://developer.android.com/reference/android/renderscript/Allocation.MipmapControl)` mips, int usage) ` Creates an Allocation from a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createFromBitmapResource](https://developer.android.com/reference/android/renderscript/Allocation#createFromBitmapResource(android.renderscript.RenderScript,%20android.content.res.Resources,%20int,%20android.renderscript.Allocation.MipmapControl,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Resources](https://developer.android.com/reference/android/content/res/Resources)` res, int id, `[Allocation.MipmapControl](https://developer.android.com/reference/android/renderscript/Allocation.MipmapControl)` mips, int usage) ` Creates an Allocation from the Bitmap referenced by resource ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createFromBitmapResource](https://developer.android.com/reference/android/renderscript/Allocation#createFromBitmapResource(android.renderscript.RenderScript,%20android.content.res.Resources,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Resources](https://developer.android.com/reference/android/content/res/Resources)` res, int id) ` Creates a non-mipmapped Allocation to use as a graphics texture from the[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap)referenced by resource ID.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createFromString](https://developer.android.com/reference/android/renderscript/Allocation#createFromString(android.renderscript.RenderScript,%20java.lang.String,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[String](https://developer.android.com/reference/java/lang/String)` str, int usage) ` Creates an Allocation containing string data encoded in UTF-8 format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createSized](https://developer.android.com/reference/android/renderscript/Allocation#createSized(android.renderscript.RenderScript,%20android.renderscript.Element,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Element](https://developer.android.com/reference/android/renderscript/Element)` e, int count) ` Creates an Allocation with a specified number of given elements                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createSized](https://developer.android.com/reference/android/renderscript/Allocation#createSized(android.renderscript.RenderScript,%20android.renderscript.Element,%20int,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Element](https://developer.android.com/reference/android/renderscript/Element)` e, int count, int usage) ` Creates an Allocation with a specified number of given elements                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createTyped](https://developer.android.com/reference/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type,%20android.renderscript.Allocation.MipmapControl,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Type](https://developer.android.com/reference/android/renderscript/Type)` type, `[Allocation.MipmapControl](https://developer.android.com/reference/android/renderscript/Allocation.MipmapControl)` mips, int usage) ` Creates a new Allocation with the given[Type](https://developer.android.com/reference/android/renderscript/Type), mipmap flag, and usage flags.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createTyped](https://developer.android.com/reference/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Type](https://developer.android.com/reference/android/renderscript/Type)` type) ` Creates an Allocation for use by scripts with a given[Type](https://developer.android.com/reference/android/renderscript/Type)and no mipmaps                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` static `[Allocation](https://developer.android.com/reference/android/renderscript/Allocation)   | ` `[createTyped](https://developer.android.com/reference/android/renderscript/Allocation#createTyped(android.renderscript.RenderScript,%20android.renderscript.Type,%20int))`(`[RenderScript](https://developer.android.com/reference/android/renderscript/RenderScript)` rs, `[Type](https://developer.android.com/reference/android/renderscript/Type)` type, int usage) ` Creates an Allocation with the size specified by the type and no mipmaps generated by default                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` void`                                                                                           | ` `[destroy](https://developer.android.com/reference/android/renderscript/Allocation#destroy())`() ` For USAGE_IO_OUTPUT, destroy() implies setSurface(null).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                           | ` `[finalize](https://developer.android.com/reference/android/renderscript/Allocation#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` void`                                                                                           | ` `[generateMipmaps](https://developer.android.com/reference/android/renderscript/Allocation#generateMipmaps())`() ` Generate a mipmap chain.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` `[ByteBuffer](https://developer.android.com/reference/java/nio/ByteBuffer)                      | ` `[getByteBuffer](https://developer.android.com/reference/android/renderscript/Allocation#getByteBuffer())`() ` Gets or creates a ByteBuffer that contains the raw data of the current Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` int`                                                                                            | ` `[getBytesSize](https://developer.android.com/reference/android/renderscript/Allocation#getBytesSize())`() ` Get the size of the Allocation in bytes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` `[Element](https://developer.android.com/reference/android/renderscript/Element)                | ` `[getElement](https://developer.android.com/reference/android/renderscript/Allocation#getElement())`() ` Get the[Element](https://developer.android.com/reference/android/renderscript/Element)of the[Type](https://developer.android.com/reference/android/renderscript/Type)of the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` long`                                                                                           | ` `[getStride](https://developer.android.com/reference/android/renderscript/Allocation#getStride())`() ` Gets the stride of the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | | ` `[Surface](https://developer.android.com/reference/android/view/Surface)                        | ` `[getSurface](https://developer.android.com/reference/android/renderscript/Allocation#getSurface())`() ` Returns the handle to a raw buffer that is being managed by the screen compositor.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` long`                                                                                           | ` `[getTimeStamp](https://developer.android.com/reference/android/renderscript/Allocation#getTimeStamp())`() ` Get the timestamp for the most recent buffer held by this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | | ` `[Type](https://developer.android.com/reference/android/renderscript/Type)                      | ` `[getType](https://developer.android.com/reference/android/renderscript/Allocation#getType())`() ` Get the[Type](https://developer.android.com/reference/android/renderscript/Type)of the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | | ` int`                                                                                            | ` `[getUsage](https://developer.android.com/reference/android/renderscript/Allocation#getUsage())`() ` Get the usage flags of the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | | ` void`                                                                                           | ` `[ioReceive](https://developer.android.com/reference/android/renderscript/Allocation#ioReceive())`() ` Receive the latest input into the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                           | ` `[ioSend](https://developer.android.com/reference/android/renderscript/Allocation#ioSend())`() ` Send a buffer to the output stream.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | | ` void`                                                                                           | ` `[resize](https://developer.android.com/reference/android/renderscript/Allocation#resize(int))`(int dimX) ` *This method was deprecated in API level 18. RenderScript objects should be immutable once created. The replacement is to create a new allocation and copy the contents. This function will throw an exception if API 21 or higher is used.*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | | ` void`                                                                                           | ` `[setAutoPadding](https://developer.android.com/reference/android/renderscript/Allocation#setAutoPadding(boolean))`(boolean useAutoPadding) ` Specifies the mapping between the Allocation's cells and an array's elements when data is copied from the Allocation to the array, or vice-versa.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[setFromFieldPacker](https://developer.android.com/reference/android/renderscript/Allocation#setFromFieldPacker(int,%20int,%20android.renderscript.FieldPacker))`(int xoff, int component_number, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` fp) ` This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | | ` void`                                                                                           | ` `[setFromFieldPacker](https://developer.android.com/reference/android/renderscript/Allocation#setFromFieldPacker(int,%20android.renderscript.FieldPacker))`(int xoff, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` fp) ` This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | | ` void`                                                                                           | ` `[setFromFieldPacker](https://developer.android.com/reference/android/renderscript/Allocation#setFromFieldPacker(int,%20int,%20int,%20int,%20android.renderscript.FieldPacker))`(int xoff, int yoff, int zoff, int component_number, `[FieldPacker](https://developer.android.com/reference/android/renderscript/FieldPacker)` fp) ` This is only intended to be used by auto-generated code reflected from the RenderScript script files and should not be used by developers.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | | ` void`                                                                                           | ` `[setOnBufferAvailableListener](https://developer.android.com/reference/android/renderscript/Allocation#setOnBufferAvailableListener(android.renderscript.Allocation.OnBufferAvailableListener))`(`[Allocation.OnBufferAvailableListener](https://developer.android.com/reference/android/renderscript/Allocation.OnBufferAvailableListener)` callback) ` Set a notification handler for[USAGE_IO_INPUT](https://developer.android.com/reference/android/renderscript/Allocation#USAGE_IO_INPUT).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[setSurface](https://developer.android.com/reference/android/renderscript/Allocation#setSurface(android.view.Surface))`(`[Surface](https://developer.android.com/reference/android/view/Surface)` sur) ` Associate a[Surface](https://developer.android.com/reference/android/view/Surface)with this Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | | ` void`                                                                                           | ` `[syncAll](https://developer.android.com/reference/android/renderscript/Allocation#syncAll(int))`(int srcLocation) ` Propagate changes from one usage of the Allocation to the other usages of the Allocation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | ||
| From class` `[android.renderscript.BaseObj](https://developer.android.com/reference/android/renderscript/BaseObj)` ` |-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                               | ` `[destroy](https://developer.android.com/reference/android/renderscript/BaseObj#destroy())`() ` Frees any native resources associated with this object.                                                                                              | | ` boolean`                                                            | ` `[equals](https://developer.android.com/reference/android/renderscript/BaseObj#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Compare the current BaseObj with another BaseObj for equality. | | ` void`                                                               | ` `[finalize](https://developer.android.com/reference/android/renderscript/BaseObj#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                   | | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getName](https://developer.android.com/reference/android/renderscript/BaseObj#getName())`() `                                                                                                                                                      | | ` int`                                                                | ` `[hashCode](https://developer.android.com/reference/android/renderscript/BaseObj#hashCode())`() ` Calculates the hash code value for a BaseObj.                                                                                                      | | ` void`                                                               | ` `[setName](https://developer.android.com/reference/android/renderscript/BaseObj#setName(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` name) ` setName assigns a name to an object.                        | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public methods

### create1D

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static AllocationAdapter create1D (RenderScript rs, 
                Allocation a)
```

<br />

<br />

|         Parameters          ||
|------|-----------------------|
| `rs` | `RenderScript` <br /> |
| `a`  | `Allocation` <br />   |

|                                                   Returns                                                   ||
|-----------------------------------------------------------------------------------------------------|--------|
| [AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | <br /> |

### create2D

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static AllocationAdapter create2D (RenderScript rs, 
                Allocation a)
```

<br />

<br />

|         Parameters          ||
|------|-----------------------|
| `rs` | `RenderScript` <br /> |
| `a`  | `Allocation` <br />   |

|                                                   Returns                                                   ||
|-----------------------------------------------------------------------------------------------------|--------|
| [AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | <br /> |

### createTyped

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public static AllocationAdapter createTyped (RenderScript rs, 
                Allocation a, 
                Type t)
```

Create an arbitrary window into the base allocation. The type describes the shape of the window. Any dimensions present in the type must be equal or smaller to the dimensions in the source allocation. A dimension present in the allocation that is not present in the type will be constrained away with the selectors. If a dimension is present in both the type and allocation, one of two things will happen. If the type is smaller than the allocation, a window will be created, the selected value in the adapter for that dimension will act as the base address, and the type will describe the size of the view starting at that point. If the type and allocation dimension are of the same size, then setting the selector for the dimension will be an error.

<br />

|         Parameters          ||
|------|-----------------------|
| `rs` | `RenderScript` <br /> |
| `a`  | `Allocation` <br />   |
| `t`  | `Type` <br />         |

|                                                   Returns                                                   ||
|-----------------------------------------------------------------------------------------------------|--------|
| [AllocationAdapter](https://developer.android.com/reference/android/renderscript/AllocationAdapter) | <br /> |

### resize

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void resize (int dimX)
```

<br />

**This method is deprecated.**   
RenderScript objects should be immutable once created. The replacement is to create a new allocation and copy the contents. This function will throw an exception if API 21 or higher is used.

Override the Allocation resize. Resizing adapters is not allowed and will throw a RSInvalidStateException.

<br />

|           Parameters           ||
|--------|------------------------|
| `dimX` | `int`: ignored. <br /> |

### setFace

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setFace (Type.CubemapFace cf)
```

Set the active Face. The base allocation must be of a type that includes faces.

<br />

|                        Parameters                         ||
|------|-----------------------------------------------------|
| `cf` | `Type.CubemapFace`: The face to make active. <br /> |

### setLOD

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setLOD (int lod)
```

Set the active LOD. The LOD must be within the range for the type being adapted. The base allocation must have mipmaps. Because this changes the dimensions of the adapter the current Y and Z will be reset.

<br />

|                  Parameters                  ||
|-------|---------------------------------------|
| `lod` | `int`: The LOD to make active. <br /> |

### setX

Added in[API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Deprecated in[API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setX (int x)
```

Set the active X. The x value must be within the range for the allocation being adapted.

<br />

|                Parameters                ||
|-----|-------------------------------------|
| `x` | `int`: The x to make active. <br /> |

### setY

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setY (int y)
```

Set the active Y. The y value must be within the range for the allocation being adapted. The base allocation must contain the Y dimension.

<br />

|                Parameters                ||
|-----|-------------------------------------|
| `y` | `int`: The y to make active. <br /> |

### setZ

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void setZ (int z)
```

Set the active Z. The z value must be within the range for the allocation being adapted. The base allocation must contain the Z dimension.

<br />

|                Parameters                ||
|-----|-------------------------------------|
| `z` | `int`: The z to make active. <br /> |