Functions
/usr/local/google/home/srhines/android_trees/jb-mr2-dev/frameworks/rs/scriptc/rs_allocation.rsh File Reference

Functions

rs_allocation rsGetAllocation (const void *)
uint32_t rsAllocationGetDimX (rs_allocation)
uint32_t rsAllocationGetDimY (rs_allocation)
uint32_t rsAllocationGetDimZ (rs_allocation)
uint32_t rsAllocationGetDimLOD (rs_allocation)
uint32_t rsAllocationGetDimFaces (rs_allocation)
void rsAllocationCopy1DRange (rs_allocation dstAlloc, uint32_t dstOff, uint32_t dstMip, uint32_t count, rs_allocation srcAlloc, uint32_t srcOff, uint32_t srcMip)
void rsAllocationCopy2DRange (rs_allocation dstAlloc, uint32_t dstXoff, uint32_t dstYoff, uint32_t dstMip, rs_allocation_cubemap_face dstFace, uint32_t width, uint32_t height, rs_allocation srcAlloc, uint32_t srcXoff, uint32_t srcYoff, uint32_t srcMip, rs_allocation_cubemap_face srcFace)
const void * rsGetElementAt (rs_allocation a, uint32_t x)
const void * rsGetElementAt (rs_allocation a, uint32_t x, uint32_t y)
const void * rsGetElementAt (rs_allocation a, uint32_t x, uint32_t y, uint32_t z)
const void rsAllocationIoSend (rs_allocation a)
const void rsAllocationIoReceive (rs_allocation a)
rs_element rsAllocationGetElement (rs_allocation a)
const float4 rsSample (rs_allocation a, rs_sampler s, float location)
const float4 rsSample (rs_allocation a, rs_sampler s, float location, float lod)
void rsSetElementAt (rs_allocation a, void *ptr, uint32_t x)
void rsSetElementAt (rs_allocation a, void *ptr, uint32_t x, uint32_t y)
const uchar rsGetElementAtYuv_uchar_Y (rs_allocation a, uint32_t x, uint32_t y)
const uchar rsGetElementAtYuv_uchar_U (rs_allocation a, uint32_t x, uint32_t y)
const uchar rsGetElementAtYuv_uchar_V (rs_allocation a, uint32_t x, uint32_t y)

Detailed Description

Allocation routines.

Definition in file rs_allocation.rsh.


Function Documentation

void rsAllocationCopy1DRange ( rs_allocation  dstAlloc,
uint32_t  dstOff,
uint32_t  dstMip,
uint32_t  count,
rs_allocation  srcAlloc,
uint32_t  srcOff,
uint32_t  srcMip 
)

Copy part of an allocation from another allocation.

Parameters:
dstAllocAllocation to copy data into.
dstOffThe offset of the first element to be copied in the destination allocation.
dstMipMip level in the destination allocation.
countThe number of elements to be copied.
srcAllocThe source data allocation.
srcOffThe offset of the first element in data to be copied in the source allocation.
srcMipMip level in the source allocation.
void rsAllocationCopy2DRange ( rs_allocation  dstAlloc,
uint32_t  dstXoff,
uint32_t  dstYoff,
uint32_t  dstMip,
rs_allocation_cubemap_face  dstFace,
uint32_t  width,
uint32_t  height,
rs_allocation  srcAlloc,
uint32_t  srcXoff,
uint32_t  srcYoff,
uint32_t  srcMip,
rs_allocation_cubemap_face  srcFace 
)

Copy a rectangular region into the allocation from another allocation.

Parameters:
dstAllocallocation to copy data into.
dstXoffX offset of the region to update in the destination allocation.
dstYoffY offset of the region to update in the destination allocation.
dstMipMip level in the destination allocation.
dstFaceCubemap face of the destination allocation, ignored for allocations that aren't cubemaps.
widthWidth of the incoming region to update.
heightHeight of the incoming region to update.
srcAllocThe source data allocation.
srcXoffX offset in data of the source allocation.
srcYoffY offset in data of the source allocation.
srcMipMip level in the source allocation.
srcFaceCubemap face of the source allocation, ignored for allocations that aren't cubemaps.
uint32_t rsAllocationGetDimFaces ( rs_allocation  )

Query an allocation for the presence of more than one face.

Returns:
uint32_t Returns 1 if more than one face is present, 0 otherwise.
uint32_t rsAllocationGetDimLOD ( rs_allocation  )

Query an allocation for the presence of more than one LOD.

Returns:
uint32_t Returns 1 if more than one LOD is present, 0 otherwise.
uint32_t rsAllocationGetDimX ( rs_allocation  )

Query the dimension of an allocation.

Returns:
uint32_t The X dimension of the allocation.
uint32_t rsAllocationGetDimY ( rs_allocation  )

Query the dimension of an allocation.

Returns:
uint32_t The Y dimension of the allocation.
uint32_t rsAllocationGetDimZ ( rs_allocation  )

Query the dimension of an allocation.

Returns:
uint32_t The Z dimension of the allocation.
rs_element rsAllocationGetElement ( rs_allocation  a)

Get the element object describing the allocation's layout

Parameters:
aallocation to get data from
Returns:
element describing allocation layout
const void rsAllocationIoReceive ( rs_allocation  a)

Receive a new set of contents from the queue.

Parameters:
aallocation to work on
const void rsAllocationIoSend ( rs_allocation  a)

Send the contents of the Allocation to the queue.

Parameters:
aallocation to work on
rs_allocation rsGetAllocation ( const void *  )

Returns the Allocation for a given pointer. The pointer should point within a valid allocation. The results are undefined if the pointer is not from a valid allocation.

This function is deprecated and will be removed in the SDK from a future release.

const void* rsGetElementAt ( rs_allocation  a,
uint32_t  x 
)

Extract a single element from an allocation.

const void* rsGetElementAt ( rs_allocation  a,
uint32_t  x,
uint32_t  y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const void* rsGetElementAt ( rs_allocation  a,
uint32_t  x,
uint32_t  y,
uint32_t  z 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const uchar rsGetElementAtYuv_uchar_U ( rs_allocation  a,
uint32_t  x,
uint32_t  y 
)

Extract a single element from an allocation.

Coordinates are in the dimensions of the Y plane

const uchar rsGetElementAtYuv_uchar_V ( rs_allocation  a,
uint32_t  x,
uint32_t  y 
)

Extract a single element from an allocation.

Coordinates are in the dimensions of the Y plane

const uchar rsGetElementAtYuv_uchar_Y ( rs_allocation  a,
uint32_t  x,
uint32_t  y 
)

Extract a single element from an allocation.

const float4 rsSample ( rs_allocation  a,
rs_sampler  s,
float  location 
)

Fetch allocation in a way described by the sampler

Parameters:
a1D allocation to sample from
ssampler state
locationto sample from

Fetch allocation in a way described by the sampler

Parameters:
a2D allocation to sample from
ssampler state
locationto sample from
const float4 rsSample ( rs_allocation  a,
rs_sampler  s,
float  location,
float  lod 
)

Fetch allocation in a way described by the sampler

Parameters:
a1D allocation to sample from
ssampler state
locationto sample from
lodmip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used

Fetch allocation in a way described by the sampler

Parameters:
a2D allocation to sample from
ssampler state
locationto sample from
lodmip level to sample from, for fractional values mip levels will be interpolated if RS_SAMPLER_LINEAR_MIP_LINEAR is used
void rsSetElementAt ( rs_allocation  a,
void *  ptr,
uint32_t  x 
)

Set single element of an allocation.

void rsSetElementAt ( rs_allocation  a,
void *  ptr,
uint32_t  x,
uint32_t  y 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.