1/* 2 * Copyright (C) 2013 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 17package android.support.v8.renderscript; 18 19class ScriptIntrinsicBlendThunker extends ScriptIntrinsicBlend { 20 android.renderscript.ScriptIntrinsicBlend mN; 21 22 android.renderscript.ScriptIntrinsicBlend getNObj() { 23 return mN; 24 } 25 26 ScriptIntrinsicBlendThunker(int id, RenderScript rs) { 27 super(id, rs); 28 } 29 30 public static ScriptIntrinsicBlendThunker create(RenderScript rs, Element e) { 31 RenderScriptThunker rst = (RenderScriptThunker) rs; 32 ElementThunker et = (ElementThunker)e; 33 34 ScriptIntrinsicBlendThunker blend = new ScriptIntrinsicBlendThunker(0, rs); 35 try { 36 blend.mN = android.renderscript.ScriptIntrinsicBlend.create(rst.mN, et.getNObj()); 37 } catch (android.renderscript.RSRuntimeException exc) { 38 throw ExceptionThunker.convertException(exc); 39 } 40 return blend; 41 } 42 43 public void forEachClear(Allocation ain, Allocation aout) { 44 AllocationThunker aint = (AllocationThunker)ain; 45 AllocationThunker aoutt = (AllocationThunker)aout; 46 47 try { 48 mN.forEachClear(aint.getNObj(), aoutt.getNObj()); 49 } catch (android.renderscript.RSRuntimeException e) { 50 throw ExceptionThunker.convertException(e); 51 } 52 } 53 54 public Script.KernelID getKernelIDClear() { 55 Script.KernelID k = createKernelID(0, 3, null, null); 56 try { 57 k.mN = mN.getKernelIDClear(); 58 } catch (android.renderscript.RSRuntimeException e) { 59 throw ExceptionThunker.convertException(e); 60 } 61 return k; 62 } 63 64 public void forEachSrc(Allocation ain, Allocation aout) { 65 AllocationThunker aint = (AllocationThunker)ain; 66 AllocationThunker aoutt = (AllocationThunker)aout; 67 68 try { 69 mN.forEachSrc(aint.getNObj(), aoutt.getNObj()); 70 } catch (android.renderscript.RSRuntimeException e) { 71 throw ExceptionThunker.convertException(e); 72 } 73 } 74 75 public Script.KernelID getKernelIDSrc() { 76 Script.KernelID k = createKernelID(1, 3, null, null); 77 try { 78 k.mN = mN.getKernelIDSrc(); 79 } catch (android.renderscript.RSRuntimeException e) { 80 throw ExceptionThunker.convertException(e); 81 } 82 return k; 83 } 84 85 public void forEachDst(Allocation ain, Allocation aout) { 86 AllocationThunker aint = (AllocationThunker)ain; 87 AllocationThunker aoutt = (AllocationThunker)aout; 88 89 try { 90 mN.forEachDst(aint.getNObj(), aoutt.getNObj()); 91 } catch (android.renderscript.RSRuntimeException e) { 92 throw ExceptionThunker.convertException(e); 93 } 94 } 95 96 public Script.KernelID getKernelIDDst() { 97 Script.KernelID k = createKernelID(2, 3, null, null); 98 try { 99 k.mN = mN.getKernelIDDst(); 100 } catch (android.renderscript.RSRuntimeException e) { 101 throw ExceptionThunker.convertException(e); 102 } 103 return k; 104 } 105 106 public void forEachSrcOver(Allocation ain, Allocation aout) { 107 AllocationThunker aint = (AllocationThunker)ain; 108 AllocationThunker aoutt = (AllocationThunker)aout; 109 110 try { 111 mN.forEachSrcOver(aint.getNObj(), aoutt.getNObj()); 112 } catch (android.renderscript.RSRuntimeException e) { 113 throw ExceptionThunker.convertException(e); 114 } 115 } 116 117 public Script.KernelID getKernelIDSrcOver() { 118 Script.KernelID k = createKernelID(3, 3, null, null); 119 try { 120 k.mN = mN.getKernelIDSrcOver(); 121 } catch (android.renderscript.RSRuntimeException e) { 122 throw ExceptionThunker.convertException(e); 123 } 124 return k; 125 } 126 127 public void forEachDstOver(Allocation ain, Allocation aout) { 128 AllocationThunker aint = (AllocationThunker)ain; 129 AllocationThunker aoutt = (AllocationThunker)aout; 130 131 try { 132 mN.forEachDstOver(aint.getNObj(), aoutt.getNObj()); 133 } catch (android.renderscript.RSRuntimeException e) { 134 throw ExceptionThunker.convertException(e); 135 } 136 } 137 138 public Script.KernelID getKernelIDDstOver() { 139 Script.KernelID k = createKernelID(4, 3, null, null); 140 try { 141 k.mN = mN.getKernelIDDstOver(); 142 } catch (android.renderscript.RSRuntimeException e) { 143 throw ExceptionThunker.convertException(e); 144 } 145 return k; 146 } 147 148 public void forEachSrcIn(Allocation ain, Allocation aout) { 149 AllocationThunker aint = (AllocationThunker)ain; 150 AllocationThunker aoutt = (AllocationThunker)aout; 151 152 try { 153 mN.forEachSrcIn(aint.getNObj(), aoutt.getNObj()); 154 } catch (android.renderscript.RSRuntimeException e) { 155 throw ExceptionThunker.convertException(e); 156 } 157 } 158 159 public Script.KernelID getKernelIDSrcIn() { 160 Script.KernelID k = createKernelID(5, 3, null, null); 161 try { 162 k.mN = mN.getKernelIDSrcIn(); 163 } catch (android.renderscript.RSRuntimeException e) { 164 throw ExceptionThunker.convertException(e); 165 } 166 return k; 167 } 168 169 public void forEachDstIn(Allocation ain, Allocation aout) { 170 AllocationThunker aint = (AllocationThunker)ain; 171 AllocationThunker aoutt = (AllocationThunker)aout; 172 173 try { 174 mN.forEachDstIn(aint.getNObj(), aoutt.getNObj()); 175 } catch (android.renderscript.RSRuntimeException e) { 176 throw ExceptionThunker.convertException(e); 177 } 178 } 179 180 public Script.KernelID getKernelIDDstIn() { 181 Script.KernelID k = createKernelID(6, 3, null, null); 182 try { 183 k.mN = mN.getKernelIDDstIn(); 184 } catch (android.renderscript.RSRuntimeException e) { 185 throw ExceptionThunker.convertException(e); 186 } 187 return k; 188 } 189 190 public void forEachSrcOut(Allocation ain, Allocation aout) { 191 AllocationThunker aint = (AllocationThunker)ain; 192 AllocationThunker aoutt = (AllocationThunker)aout; 193 194 try { 195 mN.forEachSrcOut(aint.getNObj(), aoutt.getNObj()); 196 } catch (android.renderscript.RSRuntimeException e) { 197 throw ExceptionThunker.convertException(e); 198 } 199 } 200 201 public Script.KernelID getKernelIDSrcOut() { 202 Script.KernelID k = createKernelID(7, 3, null, null); 203 try { 204 k.mN = mN.getKernelIDSrcOut(); 205 } catch (android.renderscript.RSRuntimeException e) { 206 throw ExceptionThunker.convertException(e); 207 } 208 return k; 209 } 210 211 public void forEachDstOut(Allocation ain, Allocation aout) { 212 AllocationThunker aint = (AllocationThunker)ain; 213 AllocationThunker aoutt = (AllocationThunker)aout; 214 215 try { 216 mN.forEachDstOut(aint.getNObj(), aoutt.getNObj()); 217 } catch (android.renderscript.RSRuntimeException e) { 218 throw ExceptionThunker.convertException(e); 219 } 220 } 221 222 public Script.KernelID getKernelIDDstOut() { 223 Script.KernelID k = createKernelID(8, 3, null, null); 224 try { 225 k.mN = mN.getKernelIDDstOut(); 226 } catch (android.renderscript.RSRuntimeException e) { 227 throw ExceptionThunker.convertException(e); 228 } 229 return k; 230 } 231 232 public void forEachSrcAtop(Allocation ain, Allocation aout) { 233 AllocationThunker aint = (AllocationThunker)ain; 234 AllocationThunker aoutt = (AllocationThunker)aout; 235 236 try { 237 mN.forEachSrcAtop(aint.getNObj(), aoutt.getNObj()); 238 } catch (android.renderscript.RSRuntimeException e) { 239 throw ExceptionThunker.convertException(e); 240 } 241 } 242 243 public Script.KernelID getKernelIDSrcAtop() { 244 Script.KernelID k = createKernelID(9, 3, null, null); 245 try { 246 k.mN = mN.getKernelIDSrcAtop(); 247 } catch (android.renderscript.RSRuntimeException e) { 248 throw ExceptionThunker.convertException(e); 249 } 250 return k; 251 } 252 253 public void forEachDstAtop(Allocation ain, Allocation aout) { 254 AllocationThunker aint = (AllocationThunker)ain; 255 AllocationThunker aoutt = (AllocationThunker)aout; 256 257 try { 258 mN.forEachDstAtop(aint.getNObj(), aoutt.getNObj()); 259 } catch (android.renderscript.RSRuntimeException e) { 260 throw ExceptionThunker.convertException(e); 261 } 262 } 263 264 public Script.KernelID getKernelIDDstAtop() { 265 Script.KernelID k = createKernelID(10, 3, null, null); 266 try { 267 k.mN = mN.getKernelIDDstAtop(); 268 } catch (android.renderscript.RSRuntimeException e) { 269 throw ExceptionThunker.convertException(e); 270 } 271 return k; 272 } 273 274 public void forEachXor(Allocation ain, Allocation aout) { 275 AllocationThunker aint = (AllocationThunker)ain; 276 AllocationThunker aoutt = (AllocationThunker)aout; 277 278 try { 279 mN.forEachXor(aint.getNObj(), aoutt.getNObj()); 280 } catch (android.renderscript.RSRuntimeException e) { 281 throw ExceptionThunker.convertException(e); 282 } 283 } 284 285 public Script.KernelID getKernelIDXor() { 286 Script.KernelID k = createKernelID(11, 3, null, null); 287 try { 288 k.mN = mN.getKernelIDXor(); 289 } catch (android.renderscript.RSRuntimeException e) { 290 throw ExceptionThunker.convertException(e); 291 } 292 return k; 293 } 294 295 public void forEachMultiply(Allocation ain, Allocation aout) { 296 AllocationThunker aint = (AllocationThunker)ain; 297 AllocationThunker aoutt = (AllocationThunker)aout; 298 299 try { 300 mN.forEachMultiply(aint.getNObj(), aoutt.getNObj()); 301 } catch (android.renderscript.RSRuntimeException e) { 302 throw ExceptionThunker.convertException(e); 303 } 304 } 305 306 public Script.KernelID getKernelIDMultiply() { 307 Script.KernelID k = createKernelID(14, 3, null, null); 308 try { 309 k.mN = mN.getKernelIDMultiply(); 310 } catch (android.renderscript.RSRuntimeException e) { 311 throw ExceptionThunker.convertException(e); 312 } 313 return k; 314 } 315 316 public void forEachAdd(Allocation ain, Allocation aout) { 317 AllocationThunker aint = (AllocationThunker)ain; 318 AllocationThunker aoutt = (AllocationThunker)aout; 319 320 try { 321 mN.forEachAdd(aint.getNObj(), aoutt.getNObj()); 322 } catch (android.renderscript.RSRuntimeException e) { 323 throw ExceptionThunker.convertException(e); 324 } 325 } 326 327 public Script.KernelID getKernelIDAdd() { 328 Script.KernelID k = createKernelID(34, 3, null, null); 329 try { 330 k.mN = mN.getKernelIDAdd(); 331 } catch (android.renderscript.RSRuntimeException e) { 332 throw ExceptionThunker.convertException(e); 333 } 334 return k; 335 } 336 337 public void forEachSubtract(Allocation ain, Allocation aout) { 338 AllocationThunker aint = (AllocationThunker)ain; 339 AllocationThunker aoutt = (AllocationThunker)aout; 340 341 try { 342 mN.forEachSubtract(aint.getNObj(), aoutt.getNObj()); 343 } catch (android.renderscript.RSRuntimeException e) { 344 throw ExceptionThunker.convertException(e); 345 } 346 } 347 348 public Script.KernelID getKernelIDSubtract() { 349 Script.KernelID k = createKernelID(35, 3, null, null); 350 try { 351 k.mN = mN.getKernelIDSubtract(); 352 } catch (android.renderscript.RSRuntimeException e) { 353 throw ExceptionThunker.convertException(e); 354 } 355 return k; 356 } 357 358} 359 360