diff options
Diffstat (limited to 'renderscript/include/rs_object_info.rsh')
-rw-r--r-- | renderscript/include/rs_object_info.rsh | 98 |
1 files changed, 62 insertions, 36 deletions
diff --git a/renderscript/include/rs_object_info.rsh b/renderscript/include/rs_object_info.rsh index 25ac326..6ea7ed6 100644 --- a/renderscript/include/rs_object_info.rsh +++ b/renderscript/include/rs_object_info.rsh @@ -14,18 +14,19 @@ * limitations under the License. */ -// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime. +// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh. /* - * rs_object_info.rsh: Element functions + * rs_object_info.rsh: Object Characteristics Functions + * + * The functions below can be used to query the characteristics of an allocation, + * element, or sampler object. These objects are created from Java. * * The term "element" is used a bit ambiguously in RenderScript, as both * the type of an item of an allocation and the instantiation of that type: - * - * rs_element is a handle to a type specification, and - * - * In functions like rsGetElementAt(), "element" means the instantiation - * of the type, i.e. an item of an allocation. + * - rs_element is a handle to a type specification, and + * - In functions like rsGetElementAt(), "element" means the instantiation + * of the type, i.e. an item of an allocation. * * The functions below let you query the characteristics of the type specificiation. * @@ -39,14 +40,17 @@ * Elements can also have a kind, which is semantic information used mostly to * interpret pixel data. */ + #ifndef RENDERSCRIPT_RS_OBJECT_INFO_RSH #define RENDERSCRIPT_RS_OBJECT_INFO_RSH /* * rsAllocationGetDimFaces: Presence of more than one face * - * If the allocation is a cubemap, this function returns 1 if there's more than one - * face present. In all other cases, it returns 0. + * If the allocation is a cubemap, this function returns 1 if there's more than + * one face present. In all other cases, it returns 0. + * + * Use rsGetDimHasFaces() to get the dimension of a currently running kernel. * * Returns: Returns 1 if more than one face is present, 0 otherwise. */ @@ -54,9 +58,12 @@ extern uint32_t __attribute__((overloadable)) rsAllocationGetDimFaces(rs_allocation a); /* - * rsAllocationGetDimLOD: Presence of levels of details + * rsAllocationGetDimLOD: Presence of levels of detail + * + * Query an allocation for the presence of more than one Level Of Detail. + * This is useful for mipmaps. * - * Query an allocation for the presence of more than one Level Of Details. This is useful for mipmaps. + * Use rsGetDimLod() to get the dimension of a currently running kernel. * * Returns: Returns 1 if more than one LOD is present, 0 otherwise. */ @@ -68,6 +75,8 @@ extern uint32_t __attribute__((overloadable)) * * Returns the size of the X dimension of the allocation. * + * Use rsGetDimX() to get the dimension of a currently running kernel. + * * Returns: The X dimension of the allocation. */ extern uint32_t __attribute__((overloadable)) @@ -79,6 +88,8 @@ extern uint32_t __attribute__((overloadable)) * Returns the size of the Y dimension of the allocation. * If the allocation has less than two dimensions, returns 0. * + * Use rsGetDimY() to get the dimension of a currently running kernel. + * * Returns: The Y dimension of the allocation. */ extern uint32_t __attribute__((overloadable)) @@ -90,6 +101,8 @@ extern uint32_t __attribute__((overloadable)) * Returns the size of the Z dimension of the allocation. * If the allocation has less than three dimensions, returns 0. * + * Use rsGetDimZ() to get the dimension of a currently running kernel. + * * Returns: The Z dimension of the allocation. */ extern uint32_t __attribute__((overloadable)) @@ -99,7 +112,7 @@ extern uint32_t __attribute__((overloadable)) * Get the element object describing the allocation's layout * * Parameters: - * a allocation to get data from + * a: allocation to get data from * * Returns: element describing allocation layout */ @@ -107,8 +120,14 @@ extern rs_element __attribute__((overloadable)) rsAllocationGetElement(rs_allocation a); /* - * rsClearObject: For internal use. + * rsClearObject: Release an object * + * Tells the run time that this handle will no longer be used to access the + * the related object. If this was the last handle to that object, resource + * recovery may happen. + * + * After calling this function, *dst will be set to an empty handle. See + * rsIsObject(). */ extern void __attribute__((overloadable)) rsClearObject(rs_element* dst); @@ -126,8 +145,16 @@ extern void __attribute__((overloadable)) rsClearObject(rs_script* dst); /* - * rsIsObject: For internal use. + * rsIsObject: Check for an empty handle + * + * Returns true if the handle contains a non-null reference. * + * This function does not validate that the internal pointer used in the handle + * points to an actual valid object; it only checks for null. + * + * This function can be used to check the element returned by + * rsElementGetSubElement() or see if rsClearObject() has been called on a + * handle. */ extern bool __attribute__((overloadable)) rsIsObject(rs_element v); @@ -194,8 +221,8 @@ extern rs_data_type __attribute__((overloadable)) * of sub-elements, an invalid handle is returned. * * Parameters: - * e Element to query - * index Index of the sub-element to return + * e: Element to query + * index: Index of the sub-element to return * * Returns: Sub-element at the given index */ @@ -212,8 +239,8 @@ extern rs_element __attribute__((overloadable)) * sub-element at the index. * * Parameters: - * e Element to query - * index Index of the sub-element + * e: Element to query + * index: Index of the sub-element * * Returns: Array size of the sub-element at the given index */ @@ -231,7 +258,7 @@ extern uint32_t __attribute__((overloadable)) * elements or the number of sub-elements otherwise. * * Parameters: - * e Element to get data from + * e: Element to get data from * * Returns: Number of sub-elements in this element */ @@ -247,10 +274,10 @@ extern uint32_t __attribute__((overloadable)) * at the specified index. * * Parameters: - * e Element to get data from - * index Index of the sub-element - * name Array to store the name into - * nameLength Length of the provided name array + * e: Element to get data from + * index: Index of the sub-element + * name: Array to store the name into + * nameLength: Length of the provided name array * * Returns: Number of characters actually written, excluding the null terminator */ @@ -266,8 +293,8 @@ extern uint32_t __attribute__((overloadable)) * sub-element name at index * * Parameters: - * e Element to get data from - * index Index of the sub-element to return + * e: Element to get data from + * index: Index of the sub-element to return * * Returns: Length of the sub-element name including the null terminator (size of buffer needed to write the name) */ @@ -281,8 +308,8 @@ extern uint32_t __attribute__((overloadable)) * the element * * Parameters: - * e Element to get data from - * index Index of the sub-element + * e: Element to get data from + * index: Index of the sub-element * * Returns: Offset in bytes of sub-element in this element at given index */ @@ -295,7 +322,7 @@ extern uint32_t __attribute__((overloadable)) * Returns the element's vector size * * Parameters: - * e Element to get data from + * e: Element to get data from * * Returns: Length of the element vector (for float2, float3, etc.) */ @@ -307,12 +334,11 @@ extern uint32_t __attribute__((overloadable)) /* * rsGetAllocation: Returns the Allocation for a given pointer * + * DEPRECATED. Do not use. + * * 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 from the SDK in a future - * release. */ extern rs_allocation __attribute__((overloadable)) rsGetAllocation(const void* p); @@ -321,7 +347,7 @@ extern rs_allocation __attribute__((overloadable)) * Get sampler anisotropy * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: anisotropy */ @@ -334,7 +360,7 @@ extern float __attribute__((overloadable)) * Get sampler magnification value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: magnification value */ @@ -347,7 +373,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler minification value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: minification value */ @@ -360,7 +386,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler wrap S value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: wrap S value */ @@ -373,7 +399,7 @@ extern rs_sampler_value __attribute__((overloadable)) * Get sampler wrap T value * * Parameters: - * s sampler to query + * s: sampler to query * * Returns: wrap T value */ |