1 # 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 header: 18 summary: Object Types 19 description: 20 The types below are used to manipulate RenderScript objects like allocations, samplers, 21 elements, and scripts. Most of these object are created using the Java RenderScript APIs. 22 include: 23 #define NULL ((void *)0) 24 25 // Opaque handle to a RenderScript object. Do not use this directly. 26 #ifndef __LP64__ 27 #define _RS_OBJECT_DECL \ 28 {\ 29 const int* const p;\ 30 } __attribute__((packed, aligned(4))) 31 #else 32 #define _RS_OBJECT_DECL \ 33 {\ 34 const long* const p;\ 35 const long* const r;\ 36 const long* const v1;\ 37 const long* const v2;\ 38 } 39 #endif 40 end: 41 42 type: rs_element 43 rs_object: 44 summary: Handle to an element 45 description: 46 An opaque handle to a RenderScript element. 47 48 See <a href="http://developer.android.com/reference/android/renderscript/Element.html">android.renderscript.Element</a>. 49 end: 50 51 type: rs_type 52 rs_object: 53 summary: Handle to a Type 54 description: 55 An opaque handle to a RenderScript type. 56 57 See <a href="http://developer.android.com/reference/android/renderscript/Type.html">android.renderscript.Type</a>. 58 end: 59 60 type: rs_allocation 61 rs_object: 62 summary: Handle to an allocation 63 description: 64 An opaque handle to a RenderScript allocation. 65 66 See <a href="http://developer.android.com/reference/android/renderscript/Allocation.html">android.renderscript.Allocation</a>. 67 end: 68 69 type: rs_sampler 70 rs_object: 71 summary: Handle to a Sampler 72 description: 73 An opaque handle to a RenderScript sampler object. 74 75 See <a href="http://developer.android.com/reference/android/renderscript/Sampler.html">android.renderscript.Sampler</a>. 76 end: 77 78 type: rs_script 79 rs_object: 80 summary: Handle to a Script 81 description: 82 An opaque handle to a RenderScript script object. 83 84 See <a href="http://developer.android.com/reference/android/renderscript/ScriptC.html">android.renderscript.ScriptC</a>. 85 end: 86 87 type: rs_allocation_cubemap_face 88 version: 14 89 enum: 90 value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_X = 0 91 value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_X = 1 92 value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Y = 2 93 value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Y = 3 94 value: RS_ALLOCATION_CUBEMAP_FACE_POSITIVE_Z = 4 95 value: RS_ALLOCATION_CUBEMAP_FACE_NEGATIVE_Z = 5 96 summary: Enum for selecting cube map faces 97 description: 98 An enum used to specify one the six faces of a cubemap. 99 end: 100 101 type: rs_allocation_usage_type 102 version: 14 103 enum: 104 value: RS_ALLOCATION_USAGE_SCRIPT = 0x0001, "Allocation is bound to and accessed by scripts." 105 value: RS_ALLOCATION_USAGE_GRAPHICS_TEXTURE = 0x0002, "Allocation is used as a texture source." 106 value: RS_ALLOCATION_USAGE_GRAPHICS_VERTEX = 0x0004, "Deprecated." 107 value: RS_ALLOCATION_USAGE_GRAPHICS_CONSTANTS = 0x0008, "Deprecated." 108 value: RS_ALLOCATION_USAGE_GRAPHICS_RENDER_TARGET = 0x0010, "Deprecated." 109 value: RS_ALLOCATION_USAGE_IO_INPUT = 0x0020, "Allocation is used as a Surface consumer." 110 value: RS_ALLOCATION_USAGE_IO_OUTPUT = 0x0040, "Allocation is used as a Surface producer." 111 value: RS_ALLOCATION_USAGE_SHARED = 0x0080, "Allocation's backing store is shared with another object (usually a Bitmap). Copying to or from the original source Bitmap will cause a synchronization rather than a full copy." 112 summary: Bitfield to specify how an allocation is used 113 description: 114 These values are ORed together to specify which usages or memory spaces are 115 relevant to an allocation or an operation on an allocation. 116 end: 117 118 type: rs_data_type 119 version: 16 120 enum: 121 value: RS_TYPE_NONE = 0, "Element is a complex type, i.e. a struct." 122 value: RS_TYPE_FLOAT_16 = 1, "A 16 bit floating point value." 123 value: RS_TYPE_FLOAT_32 = 2, "A 32 bit floating point value." 124 value: RS_TYPE_FLOAT_64 = 3, "A 64 bit floating point value." 125 value: RS_TYPE_SIGNED_8 = 4, "An 8 bit signed integer." 126 value: RS_TYPE_SIGNED_16 = 5, "A 16 bit signed integer." 127 value: RS_TYPE_SIGNED_32 = 6, "A 32 bit signed integer." 128 value: RS_TYPE_SIGNED_64 = 7, "A 64 bit signed integer." 129 value: RS_TYPE_UNSIGNED_8 = 8, "An 8 bit unsigned integer." 130 value: RS_TYPE_UNSIGNED_16 = 9, "A 16 bit unsigned integer." 131 value: RS_TYPE_UNSIGNED_32 = 10, "A 32 bit unsigned integer." 132 value: RS_TYPE_UNSIGNED_64 = 11, "A 64 bit unsigned integer." 133 value: RS_TYPE_BOOLEAN = 12, "0 or 1 (false or true) stored in an 8 bit container." 134 value: RS_TYPE_UNSIGNED_5_6_5 = 13, "A 16 bit unsigned integer packing graphical data in 5, 6, and 5 bit sections." 135 value: RS_TYPE_UNSIGNED_5_5_5_1 = 14, "A 16 bit unsigned integer packing graphical data in 5, 5, 5, and 1 bit sections." 136 value: RS_TYPE_UNSIGNED_4_4_4_4 = 15, "A 16 bit unsigned integer packing graphical data in 4, 4, 4, and 4 bit sections." 137 value: RS_TYPE_MATRIX_4X4 = 16, "A 4x4 matrix of 32 bit floats, aligned on a 32 bit boundary." 138 value: RS_TYPE_MATRIX_3X3 = 17, "A 3x3 matrix of 32 bit floats, aligned on a 32 bit boundary." 139 value: RS_TYPE_MATRIX_2X2 = 18, "A 2x2 matrix of 32 bit floats, aligned on a 32 bit boundary." 140 value: RS_TYPE_ELEMENT = 1000, "A handle to an Element." 141 value: RS_TYPE_TYPE = 1001, "A handle to a Type." 142 value: RS_TYPE_ALLOCATION = 1002, "A handle to an Allocation." 143 value: RS_TYPE_SAMPLER = 1003, "A handle to a Sampler." 144 value: RS_TYPE_SCRIPT = 1004, "A handle to a Script." 145 value: RS_TYPE_MESH = 1005, "Deprecated." 146 value: RS_TYPE_PROGRAM_FRAGMENT = 1006, "Deprecated." 147 value: RS_TYPE_PROGRAM_VERTEX = 1007, "Deprecated." 148 value: RS_TYPE_PROGRAM_RASTER = 1008, "Deprecated." 149 value: RS_TYPE_PROGRAM_STORE = 1009, "Deprecated." 150 value: RS_TYPE_FONT = 1010, "Deprecated." 151 value: RS_TYPE_INVALID = 10000 152 summary: Element basic data type 153 description: 154 rs_data_type is used to encode the type information of a basic element. 155 156 RS_TYPE_UNSIGNED_5_6_5, RS_TYPE_UNSIGNED_5_5_5_1, RS_TYPE_UNSIGNED_4_4_4_4 are for packed 157 graphical data formats and represent vectors with per vector member sizes which are treated 158 as a single unit for packing and alignment purposes. 159 end: 160 161 type: rs_data_kind 162 version: 16 163 enum: 164 value: RS_KIND_USER = 0, "No special interpretation." 165 value: RS_KIND_PIXEL_L = 7, "Luminance." 166 value: RS_KIND_PIXEL_A = 8, "Alpha." 167 value: RS_KIND_PIXEL_LA = 9, "Luminance and Alpha." 168 value: RS_KIND_PIXEL_RGB = 10, "Red, Green, Blue." 169 value: RS_KIND_PIXEL_RGBA = 11, "Red, Green, Blue, and Alpha." 170 value: RS_KIND_PIXEL_DEPTH = 12, "Depth for a depth texture." 171 value: RS_KIND_PIXEL_YUV = 13, "Luminance and chrominance." 172 value: RS_KIND_INVALID = 100 173 summary: Element data kind 174 description: 175 This enumeration is primarly useful for graphical data. It provides additional information to 176 help interpret the rs_data_type. 177 178 RS_KIND_USER indicates no special interpretation is expected. 179 180 The RS_KIND_PIXEL_* values are used in conjunction with the standard data types for representing 181 texture formats. 182 183 See the <a href='http://developer.android.com/reference/android/renderscript/Element.html#createPixel(android.renderscript.RenderScript,%20android.renderscript.Element.DataType, android.renderscript.Element.DataKind)'>Element.createPixel()</a> method. 184 end: 185 186 type: rs_yuv_format 187 version: 24 188 enum: 189 value: RS_YUV_NONE = 0 190 value: RS_YUV_YV12 = 0x32315659 191 value: RS_YUV_NV21 = 0x11 192 value: RS_YUV_420_888 = 0x23 193 summary: YUV format 194 description: 195 Android YUV formats that can be associated with a RenderScript Type. 196 197 See <a href='http://developer.android.com/reference/android/graphics/ImageFormat.html'>android.graphics.ImageFormat</a> for a description of each format. 198 end: 199 200 type: rs_sampler_value 201 version: 16 202 enum: 203 value: RS_SAMPLER_NEAREST = 0 204 value: RS_SAMPLER_LINEAR = 1 205 value: RS_SAMPLER_LINEAR_MIP_LINEAR = 2 206 value: RS_SAMPLER_WRAP = 3 207 value: RS_SAMPLER_CLAMP = 4 208 value: RS_SAMPLER_LINEAR_MIP_NEAREST = 5 209 value: RS_SAMPLER_MIRRORED_REPEAT = 6 210 value: RS_SAMPLER_INVALID = 100 211 summary: Sampler wrap T value 212 description: 213 end: 214