Descripción general
Las siguientes funciones se pueden usar para crear asignaciones desde una secuencia de comandos.
Estas funciones se pueden llamar de manera directa o indirecta desde una función invocable. Si alguna ruta de flujo de control puede generar una llamada a estas funciones desde una función del kernel de RenderScript, se generará un error del compilador.
Resumen
Funciones | |
---|---|
rsCreateAllocation | Crea un objeto rs_allocation de un tipo determinado. |
rsCreateElement. | Crea un objeto rs_element del tipo de datos especificado. |
rsCreatePixelElement. | Crea un objeto rs_element del tipo y tipo de datos especificados. |
rsCreateType | Crea un objeto rs_type con los atributos de elemento y forma especificados. |
rsCreateVectorElement. | Crea un objeto rs_element del tipo de datos y el ancho del vector especificados |
Funciones
rsCreateAllocation : Crea un objeto rs_allocation de un tipo determinado.
rs_allocation rsCreateAllocation(rs_type type); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation(rs_type tipo, rs_allocation_mipmap_control mipmap, usos uint32_t, void* ptr); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation(rs_type, uso de uint32_t); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_char4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_double4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_float4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_half4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_int4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_long4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_short4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uchar4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_uint4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ulong4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort2(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort2(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort3(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort3(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort4(uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_allocation rsCreateAllocation_ushort4(uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
Parámetros
tipo | Tipo de asignación |
---|---|
uso | Marca de uso para la asignación |
mipmap | |
usos | |
ptr; | |
dimX | |
diminuto | |
atenuación Z |
Crea un objeto rs_allocation del tipo y el uso especificados.
RS_ALLOCATION_USAGE_SCRIPT y RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE son las únicas marcas de uso admitidas para las asignaciones creadas desde una secuencia de comandos de RenderScript.
También puedes usar las funciones wrapper rsCreateAllocation_
P.ej., rsCreateAllocation_int4() muestra una asignación de tipo de datos int4 de dimensiones especificadas.
rsCreateElement : Crea un objeto rs_element del tipo de datos especificado.
rs_element rsCreateElement(int32_t data_type, int32_t data_Kind, bool isNormalized, uint32_t vecSize); | Se agregó en el nivel de API 24. |
rs_element rsCreateElement(rs_data_type data_type); | Se agregó en el nivel de API 24. |
Parámetros
tipo_datos | Tipo de datos del elemento |
---|---|
tipo_datos | |
isNormalized | |
Tamaño vec |
Crea un objeto rs_element del tipo de datos especificado. El tipo de datos del elemento se establecerá en RS_KIND_USER y vector_width en 1, lo que indica que no es vectorial.
rsCreatePixelElement : Crea un objeto rs_element del tipo y tipo de datos especificados
rs_element rsCreatePixelElement(rs_data_type data_type, rs_data_kind data_kind); | Se agregó en el nivel de API 24. |
Parámetros
tipo_datos | Tipo de datos del elemento |
---|---|
tipo_datos | Tipo de datos del elemento |
Crea un objeto rs_element del tipo y tipo de datos especificados. El vector_width del elemento se establecerá en 1, lo que indica que no es vectorial.
rsCreateType : Crea un objeto rs_type con los atributos de elemento y forma especificados.
rs_type rsCreateType(elemento rs_element, uint32_t dimX); | Se agregó en el nivel de API 24. |
rs_type rsCreateType(elemento rs_element, uint32_t dimX, uint32_t dimY); | Se agregó en el nivel de API 24. |
rs_type rsCreateType(elemento rs_element, uint32_t dimX, uint32_t dimY, uint32_t dimZ); | Se agregó en el nivel de API 24. |
rs_type rsCreateType(elemento rs_element, uint32_t dimX, uint32_t dimY, uint32_t dimZ, mipmaps bool, rostros booleanos, rs_yuv_format yuv_format); | Se agregó en el nivel de API 24. |
Parámetros
elemento | Elemento que se asociará con el tipo |
---|---|
dimX | Tamaño a lo largo de la dimensión X |
diminuto | Tamaño en la dimensión Y |
atenuación Z | Tamaño en la dimensión Z |
mipmaps | Marca que indica si el Type tiene una cadena de mipmap |
rostros | Marca que indica si el tipo es un cubemap |
formato_yuv | Diseño YUV para Type |
Crea un objeto rs_type con los atributos de elemento y forma especificados.
dimX especifica el tamaño de la dimensión X.
dimY, si está presente y no es cero, indica que la dimensión Y está presente e indica su tamaño.
dimZ, si está presente y no es cero, indica que la dimensión Z está presente e indica su tamaño.
mipmaps indica la presencia de nivel de detalle (LOD).
caras indica la presencia de caras de mapas de cubo.
yuv_format indica el formato YUV asociado (o RS_YUV_NONE).
rsCreateVectorElement : Crea un objeto rs_element del tipo de datos y el ancho del vector especificados.
rs_element rsCreateVectorElement(rs_data_type data_type, uint32_t vector_width); | Se agregó en el nivel de API 24. |
Parámetros
tipo_datos | Tipo de datos del elemento |
---|---|
ancho_vector | Ancho del vector (2, 3 o 4) |
Crea un objeto rs_element del tipo de datos y el ancho del vector especificados. El valor de vector_width debe ser 2, 3 o 4. El tipo de datos del elemento se establecerá en RS_KIND_USER.