blob: 5c09c5adab819c6ac1b1eea0f00b4a2aabd369fc [file] [log] [blame]
Pirama Arumuga Nainarb4b74af2015-10-12 14:38:37 -07001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// Don't edit this file! It is auto-generated by frameworks/rs/api/generate.sh.
18
19/*
20 * rs_allocation_create.rsh: Allocation Creation Functions
21 *
22 * The functions below can be used to create Allocations from a Script.
23 *
24 * These functions can be called directly or indirectly from an invokable
25 * function. If some control-flow path can result in a call to these functions
26 * from a RenderScript kernel function, a compiler error will be generated.
27 */
28
29#ifndef RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH
30#define RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH
31
32/*
33 * rsCreateElement: Creates an rs_element object of the specified data type
34 *
35 * Creates an rs_element object of the specified data type. The data kind of
36 * the Element will be set to RS_KIND_USER and vector_width will be set to 1,
37 * indicating non-vector.
38 *
39 * Parameters:
40 * data_type: Data type of the Element
41 */
42#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
43extern rs_element __attribute__((overloadable))
44 rsCreateElement(rs_data_type data_type);
45#endif
46
47/*
48 * rsCreateVectorElement: Creates an rs_element object of the specified data type and vector width
49 *
50 * Creates an rs_element object of the specified data type and vector width.
51 * Value of vector_width must be 2, 3 or 4. The data kind of the Element will
52 * be set to RS_KIND_USER.
53 *
54 * Parameters:
55 * data_type: Data type of the Element
56 * vector_width: Vector width (either 2, 3, or 4)
57 */
58#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
59extern rs_element __attribute__((overloadable))
60 rsCreateVectorElement(rs_data_type data_type, uint32_t vector_width);
61#endif
62
63/*
64 * rsCreatePixelElement: Creates an rs_element object of the specified data type and data kind
65 *
66 * Creates an rs_element object of the specified data type and data kind. The
67 * vector_width of the Element will be set to 1, indicating non-vector.
68 *
69 * Parameters:
70 * data_type: Data type of the Element
71 * data_kind: Data kind of the Element
72 */
73#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
74extern rs_element __attribute__((overloadable))
75 rsCreatePixelElement(rs_data_type data_type, rs_data_kind data_kind);
76#endif
77
78/*
79 * rsCreateType: Creates an rs_type object with the specified Element and shape attributes
80 *
81 * Creates an rs_type object with the specified Element and shape attributes.
82 *
83 * dimX specifies the size of the X dimension.
84 *
85 * dimY, if present and non-zero, indicates that the Y dimension is present and
86 * indicates its size.
87 *
88 * dimZ, if present and non-zero, indicates that the Z dimension is present and
89 * indicates its size.
90 *
91 * mipmaps indicates the presence of level of detail (LOD).
92 *
93 * faces indicates the presence of cubemap faces.
94 *
95 * yuv_format indicates the associated YUV format (or RS_YUV_NONE).
96 *
97 * Parameters:
98 * element: Element to be associated with the Type
99 * dimX: Size along the X dimension
100 * dimY: Size along the Y dimension
101 * dimZ: Size along the Z dimension
102 * mipmaps: Flag indicating if the Type has a mipmap chain
103 * faces: Flag indicating if the Type is a cubemap
104 * yuv_format: YUV layout for the Type
105 */
106#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
107extern rs_type __attribute__((overloadable))
108 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ, bool mipmaps,
109 bool faces, rs_yuv_format yuv_format);
110#endif
111
112#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
113extern rs_type __attribute__((overloadable))
114 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY, uint32_t dimZ);
115#endif
116
117#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
118extern rs_type __attribute__((overloadable))
119 rsCreateType(rs_element element, uint32_t dimX, uint32_t dimY);
120#endif
121
122#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
123extern rs_type __attribute__((overloadable))
124 rsCreateType(rs_element element, uint32_t dimX);
125#endif
126
127/*
128 * rsCreateAllocation: Create an rs_allocation object of given Type.
129 *
130 * Creates an rs_allocation object of the given Type and usage.
131 *
132 * RS_ALLOCATION_USAGE_SCRIPT and RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE are the
133 * only supported usage flags for Allocations created from within a RenderScript
134 * Script.
135 *
136 * Parameters:
137 * type: Type of the Allocation
138 * usage: Usage flag for the allocation
139 */
140#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
141extern rs_allocation __attribute__((overloadable))
142 rsCreateAllocation(rs_type type, uint32_t usage);
143#endif
144
145#if (defined(RS_VERSION) && (RS_VERSION >= 4294967295) && (defined(RS_DECLARE_EXPIRED_APIS) || RS_VERSION <= 4294967295))
146extern rs_allocation __attribute__((overloadable))
147 rsCreateAllocation(rs_type type);
148#endif
149
150#endif // RENDERSCRIPT_RS_ALLOCATION_CREATE_RSH