1 /*
2  * Copyright (C) 2007 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 #ifndef RENDER_SCRIPT_H
18 #define RENDER_SCRIPT_H
19 
20 #include <stdint.h>
21 #include <sys/types.h>
22 
23 #include "rsInternalDefines.h"
24 
25 extern "C" {
26 // Legacy graphics functions
27 RsObjectBase rsaFileA3DGetEntryByIndex(RsContext, uint32_t idx, RsFile)
28     __DEPRECATED_IN(
29         31,
30         "RenderScript is deprecated. See "
31         "https://developer.android.com/guide/topics/renderscript/migrate");
32 RsFile rsaFileA3DCreateFromMemory(RsContext, const void* data, uint32_t len)
33     __DEPRECATED_IN(
34         31,
35         "RenderScript is deprecated. See "
36         "https://developer.android.com/guide/topics/renderscript/migrate");
37 RsFile rsaFileA3DCreateFromAsset(RsContext, void* asset) __DEPRECATED_IN(
38     31,
39     "RenderScript is deprecated. See "
40     "https://developer.android.com/guide/topics/renderscript/migrate");
41 RsFile rsaFileA3DCreateFromFile(RsContext, const char* path) __DEPRECATED_IN(
42     31,
43     "RenderScript is deprecated. See "
44     "https://developer.android.com/guide/topics/renderscript/migrate");
45 void rsaFileA3DGetNumIndexEntries(RsContext, int32_t* numEntries, RsFile)
46     __DEPRECATED_IN(
47         31,
48         "RenderScript is deprecated. See "
49         "https://developer.android.com/guide/topics/renderscript/migrate");
50 void rsaFileA3DGetIndexEntries(RsContext, RsFileIndexEntry* fileEntries,
51                                uint32_t numEntries, RsFile)
52     __DEPRECATED_IN(
53         31,
54         "RenderScript is deprecated. See "
55         "https://developer.android.com/guide/topics/renderscript/migrate");
56 // Mesh update functions
57 void rsaMeshGetVertexBufferCount(RsContext, RsMesh, int32_t* vtxCount)
58     __DEPRECATED_IN(
59         31,
60         "RenderScript is deprecated. See "
61         "https://developer.android.com/guide/topics/renderscript/migrate");
62 void rsaMeshGetIndexCount(RsContext, RsMesh, int32_t* idxCount) __DEPRECATED_IN(
63     31,
64     "RenderScript is deprecated. See "
65     "https://developer.android.com/guide/topics/renderscript/migrate");
66 void rsaMeshGetVertices(RsContext, RsMesh, RsAllocation* vtxData,
67                         uint32_t vtxDataCount)
68     __DEPRECATED_IN(
69         31,
70         "RenderScript is deprecated. See "
71         "https://developer.android.com/guide/topics/renderscript/migrate");
72 void rsaMeshGetIndices(RsContext, RsMesh, RsAllocation* va, uint32_t* primType,
73                        uint32_t idxDataCount)
74     __DEPRECATED_IN(
75         31,
76         "RenderScript is deprecated. See "
77         "https://developer.android.com/guide/topics/renderscript/migrate");
78 RsContext rsContextCreateGL(RsDevice dev, uint32_t version, uint32_t sdkVersion,
79                             RsSurfaceConfig sc, uint32_t dpi)
80     __DEPRECATED_IN(
81         31,
82         "RenderScript is deprecated. See "
83         "https://developer.android.com/guide/topics/renderscript/migrate");
84 
85 void rsaGetName(RsContext, void* obj, const char** name) __DEPRECATED_IN(
86     31,
87     "RenderScript is deprecated. See "
88     "https://developer.android.com/guide/topics/renderscript/migrate");
89 // Allocation update
90 const void* rsaAllocationGetType(RsContext con, RsAllocation va)
91     __DEPRECATED_IN(
92         31,
93         "RenderScript is deprecated. See "
94         "https://developer.android.com/guide/topics/renderscript/migrate");
95 // Type update
96 void rsaTypeGetNativeData(RsContext, RsType, uintptr_t* typeData,
97                           uint32_t typeDataSize)
98     __DEPRECATED_IN(
99         31,
100         "RenderScript is deprecated. See "
101         "https://developer.android.com/guide/topics/renderscript/migrate");
102 // Element update
103 void rsaElementGetNativeData(RsContext, RsElement, uintptr_t* elemData,
104                              uint32_t elemDataSize)
105     __DEPRECATED_IN(
106         31,
107         "RenderScript is deprecated. See "
108         "https://developer.android.com/guide/topics/renderscript/migrate");
109 void rsaElementGetSubElements(RsContext, RsElement, uintptr_t* ids,
110                               const char** names, uint32_t* arraySizes,
111                               uint32_t dataSize)
112     __DEPRECATED_IN(
113         31,
114         "RenderScript is deprecated. See "
115         "https://developer.android.com/guide/topics/renderscript/migrate");
116 
117 RsDevice rsDeviceCreate() __DEPRECATED_IN(
118     31,
119     "RenderScript is deprecated. See "
120     "https://developer.android.com/guide/topics/renderscript/migrate");
121 void rsDeviceDestroy(RsDevice dev) __DEPRECATED_IN(
122     31,
123     "RenderScript is deprecated. See "
124     "https://developer.android.com/guide/topics/renderscript/migrate");
125 void rsDeviceSetConfig(RsDevice dev, RsDeviceParam p, int32_t value)
126     __DEPRECATED_IN(
127         31,
128         "RenderScript is deprecated. See "
129         "https://developer.android.com/guide/topics/renderscript/migrate");
130 RsContext rsContextCreate(RsDevice dev, uint32_t version, uint32_t sdkVersion,
131                           RsContextType ct, uint32_t flags)
132     __DEPRECATED_IN(
133         31,
134         "RenderScript is deprecated. See "
135         "https://developer.android.com/guide/topics/renderscript/migrate");
136 }
137 #include "rsgApiFuncDecl.h"
138 
139 #endif // RENDER_SCRIPT_H
140 
141 
142 
143