Android APIs
public class

AllocationAdapter

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

Class Overview

Only intended for use by generated reflected code.

Summary

[Expand]
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 The type describes the shape of the window.
synchronized 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.
[Expand]
Inherited Methods
From class android.renderscript.Allocation
From class android.renderscript.BaseObj
From class java.lang.Object

Public Methods

public static AllocationAdapter create1D (RenderScript rs, Allocation a)

Added in API level 14

public static AllocationAdapter create2D (RenderScript rs, Allocation a)

Added in API level 11

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

Added in API level 23

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 the type and allcation 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.

public synchronized void resize (int dimX)

Added in API level 11

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 ignored.

public void setFace (Type.CubemapFace cf)

Added in API level 11

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

Parameters
cf The face to make active.

public void setLOD (int lod)

Added in API level 11

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 The LOD to make active.

public void setX (int x)

Added in API level 23

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

Parameters
x The x to make active.

public void setY (int y)

Added in API level 11

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 The y to make active.

public void setZ (int z)

Added in API level 11

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 The z to make active.