Lines Matching refs:_env

98 static void _nInit(JNIEnv *_env, jclass _this)
100 gContextId = _env->GetFieldID(_this, "mContext", "I");
102 jclass bitmapClass = _env->FindClass("android/graphics/Bitmap");
103 gNativeBitmapID = _env->GetFieldID(bitmapClass, "mNativeBitmap", "I");
109 nContextFinish(JNIEnv *_env, jobject _this, RsContext con)
116 nObjDestroy(JNIEnv *_env, jobject _this, RsContext con, jint obj)
125 nDeviceCreate(JNIEnv *_env, jobject _this)
132 nDeviceDestroy(JNIEnv *_env, jobject _this, jint dev)
139 nDeviceSetConfig(JNIEnv *_env, jobject _this, jint dev, jint p, jint value)
146 nContextCreate(JNIEnv *_env, jobject _this, jint dev, jint ver, jint sdkVer)
154 nContextSetPriority(JNIEnv *_env, jobject _this, RsContext con, jint p)
163 nContextDestroy(JNIEnv *_env, jobject _this, RsContext con)
170 nContextDump(JNIEnv *_env, jobject _this, RsContext con, jint bits)
178 nContextGetErrorMessage(JNIEnv *_env, jobject _this, RsContext con)
192 return _env->NewStringUTF(buf);
196 nContextGetUserMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray data)
198 jint len = _env->GetArrayLength(data);
200 jint *ptr = _env->GetIntArrayElements(data, NULL);
210 _env->ReleaseIntArrayElements(data, ptr, 0);
215 nContextPeekMessage(JNIEnv *_env, jobject _this, RsContext con, jintArray auxData)
218 jint *auxDataPtr = _env->GetIntArrayElements(auxData, NULL);
225 _env->ReleaseIntArrayElements(auxData, auxDataPtr, 0);
229 static void nContextInitToClient(JNIEnv *_env, jobject _this, RsContext con)
235 static void nContextDeinitToClient(JNIEnv *_env, jobject _this, RsContext con)
243 nElementCreate(JNIEnv *_env, jobject _this, RsContext con, jint type, jint kind, jboolean norm, jint size)
250 nElementCreate2(JNIEnv *_env, jobject _this, RsContext con,
253 int fieldCount = _env->GetArrayLength(_ids);
256 jint *ids = _env->GetIntArrayElements(_ids, NULL);
257 jint *arraySizes = _env->GetIntArrayElements(_arraySizes, NULL);
259 AutoJavaStringArrayToUTF8 names(_env, _names, fieldCount);
269 _env->ReleaseIntArrayElements(_ids, ids, JNI_ABORT);
270 _env->ReleaseIntArrayElements(_arraySizes, arraySizes, JNI_ABORT);
277 nElementGetSubElements(JNIEnv *_env, jobject _this, RsContext con, jint id,
282 int dataSize = _env->GetArrayLength(_IDs);
292 _env->SetObjectArrayElement(_names, i, _env->NewStringUTF(names[i]));
293 _env->SetIntArrayRegion(_IDs, i, 1, (const jint*)&ids[i]);
294 _env->SetIntArrayRegion(_arraySizes, i, 1, (const jint*)&arraySizes[i]);
305 nTypeCreate(JNIEnv *_env, jobject _this, RsContext con, RsElement eid,
318 nAllocationCreateTyped(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mips, jint usage, jint pointer)
325 nAllocationSyncAll(JNIEnv *_env, jobject _this, RsContext con, jint a, jint bits)
332 nAllocationGenerateMipmaps(JNIEnv *_env, jobject _this, RsContext con, jint alloc)
352 nAllocationCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mip, jobject jbitmap, jint usage)
355 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
361 GetBitmapSize(_env, jbitmap), usage);
362 AndroidBitmap_unlockPixels(_env, jbitmap);
368 nAllocationCubeCreateFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint type, jint mip, jobject jbitmap, jint usage)
371 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
377 pixels, GetBitmapSize(_env, jbitmap), usage);
378 AndroidBitmap_unlockPixels(_env, jbitmap);
384 nAllocationCopyFromBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap)
388 AndroidBitmap_getInfo(_env, jbitmap, &info);
391 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
396 info.width, info.height, pixels, GetBitmapSize(_env, jbitmap));
397 AndroidBitmap_unlockPixels(_env, jbitmap);
402 nAllocationCopyToBitmap(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jobject jbitmap)
406 AndroidBitmap_getInfo(_env, jbitmap, &info);
409 AndroidBitmap_lockPixels(_env, jbitmap, &pixels);
412 rsAllocationCopyToBitmap(con, (RsAllocation)alloc, pixels, GetBitmapSize(_env, jbitmap));
413 AndroidBitmap_unlockPixels(_env, jbitmap);
420 nAllocationData1D_i(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint count, jintArray data, int sizeBytes)
422 jint len = _env->GetArrayLength(data);
424 jint *ptr = _env->GetIntArrayElements(data, NULL);
426 _env->ReleaseIntArrayElements(data, ptr, JNI_ABORT);
430 nAllocationData1D_s(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint count, jshortArray data, int sizeBytes)
432 jint len = _env->GetArrayLength(data);
434 jshort *ptr = _env->GetShortArrayElements(data, NULL);
436 _env->ReleaseShortArrayElements(data, ptr, JNI_ABORT);
440 nAllocationData1D_b(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint count, jbyteArray data, int sizeBytes)
442 jint len = _env->GetArrayLength(data);
444 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
446 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
450 nAllocationData1D_f(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint count, jfloatArray data, int sizeBytes)
452 jint len = _env->GetArrayLength(data);
454 jfloat *ptr = _env->GetFloatArrayElements(data, NULL);
456 _env->ReleaseFloatArrayElements(data, ptr, JNI_ABORT);
461 nAllocationElementData1D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint offset, jint lod, jint compIdx, jbyteArray data, int sizeBytes)
463 jint len = _env->GetArrayLength(data);
465 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
467 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
471 nAllocationData2D_s(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint xoff, jint yoff, jint lod, jint face,
474 jint len = _env->GetArrayLength(data);
476 jshort *ptr = _env->GetShortArrayElements(data, NULL);
478 _env->ReleaseShortArrayElements(data, ptr, JNI_ABORT);
482 nAllocationData2D_b(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint xoff, jint yoff, jint lod, jint face,
485 jint len = _env->GetArrayLength(data);
487 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
489 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
493 nAllocationData2D_i(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint xoff, jint yoff, jint lod, jint face,
496 jint len = _env->GetArrayLength(data);
498 jint *ptr = _env->GetIntArrayElements(data, NULL);
500 _env->ReleaseIntArrayElements(data, ptr, JNI_ABORT);
504 nAllocationData2D_f(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint xoff, jint yoff, jint lod, jint face,
507 jint len = _env->GetArrayLength(data);
509 jfloat *ptr = _env->GetFloatArrayElements(data, NULL);
511 _env->ReleaseFloatArrayElements(data, ptr, JNI_ABORT);
515 nAllocationData2D_alloc(JNIEnv *_env, jobject _this, RsContext con,
539 nAllocationRead_i(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jintArray data)
541 jint len = _env->GetArrayLength(data);
543 jint *ptr = _env->GetIntArrayElements(data, NULL);
544 jsize length = _env->GetArrayLength(data);
546 _env->ReleaseIntArrayElements(data, ptr, 0);
550 nAllocationRead_s(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jshortArray data)
552 jint len = _env->GetArrayLength(data);
554 jshort *ptr = _env->GetShortArrayElements(data, NULL);
555 jsize length = _env->GetArrayLength(data);
557 _env->ReleaseShortArrayElements(data, ptr, 0);
561 nAllocationRead_b(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jbyteArray data)
563 jint len = _env->GetArrayLength(data);
565 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
566 jsize length = _env->GetArrayLength(data);
568 _env->ReleaseByteArrayElements(data, ptr, 0);
572 nAllocationRead_f(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jfloatArray data)
574 jint len = _env->GetArrayLength(data);
576 jfloat *ptr = _env->GetFloatArrayElements(data, NULL);
577 jsize length = _env->GetArrayLength(data);
579 _env->ReleaseFloatArrayElements(data, ptr, 0);
583 nAllocationGetType(JNIEnv *_env, jobject _this, RsContext con, jint a)
590 nAllocationResize1D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint dimX)
597 nAllocationResize2D(JNIEnv *_env, jobject _this, RsContext con, jint alloc, jint dimX, jint dimY)
606 nScriptBindAllocation(JNIEnv *_env, jobject _this, RsContext con, jint script, jint alloc, jint slot)
613 nScriptSetVarI(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val)
620 nScriptSetVarObj(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val)
627 nScriptSetVarJ(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jlong val)
634 nScriptSetVarF(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, float val)
641 nScriptSetVarD(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, double val)
648 nScriptSetVarV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
651 jint len = _env->GetArrayLength(data);
652 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
654 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
658 nScriptSetVarVE(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data, jint elem, jintArray dims)
661 jint len = _env->GetArrayLength(data);
662 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
663 jint dimsLen = _env->GetArrayLength(dims) * sizeof(int);
664 jint *dimsPtr = _env->GetIntArrayElements(dims, NULL);
667 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
668 _env->ReleaseIntArrayElements(dims, dimsPtr, JNI_ABORT);
673 nScriptSetTimeZone(JNIEnv *_env, jobject _this, RsContext con, jint script, jbyteArray timeZone)
677 jint length = _env->GetArrayLength(timeZone);
679 timeZone_ptr = (jbyte *) _env->GetPrimitiveArrayCritical(timeZone, (jboolean *)0);
684 _env->ReleasePrimitiveArrayCritical(timeZone, timeZone_ptr, 0);
689 nScriptInvoke(JNIEnv *_env, jobject _this, RsContext con, jint obj, jint slot)
696 nScriptInvokeV(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jbyteArray data)
699 jint len = _env->GetArrayLength(data);
700 jbyte *ptr = _env->GetByteArrayElements(data, NULL);
702 _env->ReleaseByteArrayElements(data, ptr, JNI_ABORT);
706 nScriptForEach(JNIEnv *_env, jobject _this, RsContext con,
713 nScriptForEachV(JNIEnv *_env, jobject _this, RsContext con,
717 jint len = _env->GetArrayLength(params);
718 jbyte *ptr = _env->GetByteArrayElements(params, NULL);
720 _env->ReleaseByteArrayElements(params, ptr, JNI_ABORT);
727 nScriptCCreate(JNIEnv *_env, jobject _this, RsContext con,
733 AutoJavaStringToUTF8 resNameUTF(_env, resName);
734 AutoJavaStringToUTF8 cacheDirUTF(_env, cacheDir);
741 //jniThrowException(_env, "java/lang/IllegalArgumentException", "script == null");
746 //jniThrowException(_env, "java/lang/IllegalArgumentException", "length < 0");
749 remaining = _env->GetArrayLength(scriptRef);
752 //jniThrowException(_env, "java/lang/IllegalArgumentException",
757 _env->GetPrimitiveArrayCritical(scriptRef, (jboolean *)0);
768 _env->ReleasePrimitiveArrayCritical(scriptRef, script_ptr,
778 nSamplerCreate(JNIEnv *_env, jobject _this, RsContext con, jint magFilter, jint minFilter,
871 static int registerFuncs(JNIEnv *_env)
874 _env, classPathName, methods, NELEM(methods));