Skip to content

Most visited

Recently visited

navigation
Added in API level 11

AllocationAdapter

public class AllocationAdapter
extends Allocation

java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Allocation
       ↳ android.renderscript.AllocationAdapter


Only intended for use by generated reflected code.

Summary

Inherited constants

From class android.renderscript.Allocation

Public methods

static AllocationAdapter create1D(RenderScript rs, Allocation a)
static AllocationAdapter create2D(RenderScript rs, Allocation a)
static AllocationAdapter createTyped(RenderScript rs, Allocation a, Type t)

Create an arbitrary window into the base allocation.

void resize(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(Type.CubemapFace cf)

Set the active Face.

void setLOD(int lod)

Set the active LOD.

void setX(int x)

Set the active X.

void setY(int y)

Set the active Y.

void setZ(int z)

Set the active Z.

Inherited methods

From class android.renderscript.Allocation
From class android.renderscript.BaseObj
From class java.lang.Object

Public methods

create1D

Added in API level 14
AllocationAdapter create1D (RenderScript rs, 
                Allocation a)

Parameters
rs RenderScript
a Allocation
Returns
AllocationAdapter

create2D

Added in API level 11
AllocationAdapter create2D (RenderScript rs, 
                Allocation a)

Parameters
rs RenderScript
a Allocation
Returns
AllocationAdapter

createTyped

Added in API level 23
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.

Parameters
rs RenderScript
a Allocation
t Type
Returns
AllocationAdapter

resize

Added in API level 11
void resize (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.

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

Parameters
dimX int: ignored.

setFace

Added in API level 11
void setFace (Type.CubemapFace cf)

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

Parameters
cf Type.CubemapFace: The face to make active.

setLOD

Added in API level 11
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.

Parameters
lod int: The LOD to make active.

setX

Added in API level 23
void setX (int x)

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

Parameters
x int: The x to make active.

setY

Added in API level 11
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.

Parameters
y int: The y to make active.

setZ

Added in API level 11
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.

Parameters
z int: The z to make active.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.