Lines Matching refs:env

93 static jlong nativeCreate(JNIEnv* env, jclass clazz, jobject sessionObj,
95 ScopedUtfChars name(env, nameStr);
96 sp<SurfaceComposerClient> client(android_view_SurfaceSession_getClient(env, sessionObj));
100 jniThrowException(env, OutOfResourcesException, NULL);
107 static void nativeRelease(JNIEnv* env, jclass clazz, jlong nativeObject) {
112 static void nativeDestroy(JNIEnv* env, jclass clazz, jlong nativeObject) {
118 static jobject nativeScreenshotBitmap(JNIEnv* env, jclass clazz,
122 sp<IBinder> displayToken = ibinderForJavaObject(env, displayTokenObj);
127 int left = env->GetIntField(sourceCropObj, gRectClassInfo.left);
128 int top = env->GetIntField(sourceCropObj, gRectClassInfo.top);
129 int right = env->GetIntField(sourceCropObj, gRectClassInfo.right);
130 int bottom = env->GetIntField(sourceCropObj, gRectClassInfo.bottom);
187 return GraphicsJNI::createBitmap(env, bitmap,
191 static void nativeScreenshot(JNIEnv* env, jclass clazz, jobject displayTokenObj,
194 sp<IBinder> displayToken = ibinderForJavaObject(env, displayTokenObj);
196 sp<Surface> consumer = android_view_Surface_getSurface(env, surfaceObj);
198 int left = env->GetIntField(sourceCropObj, gRectClassInfo.left);
199 int top = env->GetIntField(sourceCropObj, gRectClassInfo.top);
200 int right = env->GetIntField(sourceCropObj, gRectClassInfo.right);
201 int bottom = env->GetIntField(sourceCropObj, gRectClassInfo.bottom);
216 static void nativeOpenTransaction(JNIEnv* env, jclass clazz) {
220 static void nativeCloseTransaction(JNIEnv* env, jclass clazz) {
224 static void nativeSetAnimationTransaction(JNIEnv* env, jclass clazz) {
228 static void nativeSetLayer(JNIEnv* env, jclass clazz, jlong nativeObject, jint zorder) {
232 doThrowIAE(env);
236 static void nativeSetPosition(JNIEnv* env, jclass clazz, jlong nativeObject, jfloat x, jfloat y) {
240 doThrowIAE(env);
244 static void nativeSetSize(JNIEnv* env, jclass clazz, jlong nativeObject, jint w, jint h) {
248 doThrowIAE(env);
252 static void nativeSetFlags(JNIEnv* env, jclass clazz, jlong nativeObject, jint flags, jint mask) {
256 doThrowIAE(env);
260 static void nativeSetTransparentRegionHint(JNIEnv* env, jclass clazz, jlong nativeObject, jobject regionObj) {
262 SkRegion* region = android_graphics_Region_getSkRegion(env, regionObj);
264 doThrowIAE(env);
281 doThrowIAE(env);
285 static void nativeSetAlpha(JNIEnv* env, jclass clazz, jlong nativeObject, jfloat alpha) {
289 doThrowIAE(env);
293 static void nativeSetMatrix(JNIEnv* env, jclass clazz, jlong nativeObject,
298 doThrowIAE(env);
302 static void nativeSetWindowCrop(JNIEnv* env, jclass clazz, jlong nativeObject,
308 doThrowIAE(env);
312 static void nativeSetLayerStack(JNIEnv* env, jclass clazz, jlong nativeObject, jint layerStack) {
316 doThrowIAE(env);
320 static jobject nativeGetBuiltInDisplay(JNIEnv* env, jclass clazz, jint id) {
322 return javaObjectForIBinder(env, token);
325 static jobject nativeCreateDisplay(JNIEnv* env, jclass clazz, jstring nameObj,
327 ScopedUtfChars name(env, nameObj);
330 return javaObjectForIBinder(env, token);
333 static void nativeDestroyDisplay(JNIEnv* env, jclass clazz, jobject tokenObj) {
334 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
339 static void nativeSetDisplaySurface(JNIEnv* env, jclass clazz,
341 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
351 static void nativeSetDisplayLayerStack(JNIEnv* env, jclass clazz,
353 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
359 static void nativeSetDisplayProjection(JNIEnv* env, jclass clazz,
363 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
370 static void nativeSetDisplaySize(JNIEnv* env, jclass clazz,
372 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
377 static jobjectArray nativeGetDisplayConfigs(JNIEnv* env, jclass clazz,
379 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
388 jobjectArray configArray = env->NewObjectArray(configs.size(),
393 jobject infoObj = env->NewObject(gPhysicalDisplayInfoClassInfo.clazz,
395 env->SetIntField(infoObj, gPhysicalDisplayInfoClassInfo.width, info.w);
396 env->SetIntField(infoObj, gPhysicalDisplayInfoClassInfo.height, info.h);
397 env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.refreshRate, info.fps);
398 env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.density, info.density);
399 env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.xDpi, info.xdpi);
400 env->SetFloatField(infoObj, gPhysicalDisplayInfoClassInfo.yDpi, info.ydpi);
401 env->SetBooleanField(infoObj, gPhysicalDisplayInfoClassInfo.secure, info.secure);
402 env->SetLongField(infoObj, gPhysicalDisplayInfoClassInfo.appVsyncOffsetNanos,
404 env->SetLongField(infoObj, gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos,
406 env->SetObjectArrayElement(configArray, static_cast<jsize>(c), infoObj);
407 env->DeleteLocalRef(infoObj);
413 static jint nativeGetActiveConfig(JNIEnv* env, jclass clazz, jobject tokenObj) {
414 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
419 static jboolean nativeSetActiveConfig(JNIEnv* env, jclass clazz, jobject tokenObj, jint id) {
420 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
426 static void nativeSetDisplayPowerMode(JNIEnv* env, jclass clazz, jobject tokenObj, jint mode) {
427 sp<IBinder> token(ibinderForJavaObject(env, tokenObj));
434 static jboolean nativeClearContentFrameStats(JNIEnv* env, jclass clazz, jlong nativeObject) {
439 doThrowIAE(env);
450 static jboolean nativeGetContentFrameStats(JNIEnv* env, jclass clazz, jlong nativeObject,
457 doThrowIAE(env);
468 jlongArray postedTimesNanoDst = env->NewLongArray(frameCount);
473 jlongArray presentedTimesNanoDst = env->NewLongArray(frameCount);
478 jlongArray readyTimesNanoDst = env->NewLongArray(frameCount);
507 env->SetLongArrayRegion(postedTimesNanoDst, 0, frameCount, postedTimesNanoSrc);
508 env->SetLongArrayRegion(presentedTimesNanoDst, 0, frameCount, presentedTimesNanoSrc);
509 env->SetLongArrayRegion(readyTimesNanoDst, 0, frameCount, readyTimesNanoSrc);
511 env->CallVoidMethod(outStats, gWindowContentFrameStatsClassInfo.init, refreshPeriodNano,
514 if (env->ExceptionCheck()) {
521 static jboolean nativeClearAnimationFrameStats(JNIEnv* env, jclass clazz) {
525 doThrowIAE(env);
536 static jboolean nativeGetAnimationFrameStats(JNIEnv* env, jclass clazz, jobject outStats) {
541 doThrowIAE(env);
552 jlongArray presentedTimesNanoDst = env->NewLongArray(frameCount);
567 env->SetLongArrayRegion(presentedTimesNanoDst, 0, frameCount, presentedTimesNanoSrc);
569 env->CallVoidMethod(outStats, gWindowAnimationFrameStatsClassInfo.init, refreshPeriodNano,
572 if (env->ExceptionCheck()) {
648 int register_android_view_SurfaceControl(JNIEnv* env)
650 int err = AndroidRuntime::registerNativeMethods(env, "android/view/SurfaceControl",
653 jclass clazz = env->FindClass("android/view/SurfaceControl$PhysicalDisplayInfo");
654 gPhysicalDisplayInfoClassInfo.clazz = static_cast<jclass>(env->NewGlobalRef(clazz));
655 gPhysicalDisplayInfoClassInfo.ctor = env->GetMethodID(gPhysicalDisplayInfoClassInfo.clazz,
657 gPhysicalDisplayInfoClassInfo.width = env->GetFieldID(clazz, "width", "I");
658 gPhysicalDisplayInfoClassInfo.height = env->GetFieldID(clazz, "height", "I");
659 gPhysicalDisplayInfoClassInfo.refreshRate = env->GetFieldID(clazz, "refreshRate", "F");
660 gPhysicalDisplayInfoClassInfo.density = env->GetFieldID(clazz, "density", "F");
661 gPhysicalDisplayInfoClassInfo.xDpi = env->GetFieldID(clazz, "xDpi", "F");
662 gPhysicalDisplayInfoClassInfo.yDpi = env->GetFieldID(clazz, "yDpi", "F");
663 gPhysicalDisplayInfoClassInfo.secure = env->GetFieldID(clazz, "secure", "Z");
664 gPhysicalDisplayInfoClassInfo.appVsyncOffsetNanos = env->GetFieldID(clazz,
666 gPhysicalDisplayInfoClassInfo.presentationDeadlineNanos = env->GetFieldID(clazz,
669 jclass rectClazz = env->FindClass("android/graphics/Rect");
670 gRectClassInfo.bottom = env->GetFieldID(rectClazz, "bottom", "I");
671 gRectClassInfo.left = env->GetFieldID(rectClazz, "left", "I");
672 gRectClassInfo.right = env->GetFieldID(rectClazz, "right", "I");
673 gRectClassInfo.top = env->GetFieldID(rectClazz, "top", "I");
675 jclass frameStatsClazz = env->FindClass("android/view/FrameStats");
676 jfieldID undefined_time_nano_field = env->GetStaticFieldID(frameStatsClazz, "UNDEFINED_TIME_NANO", "J");
677 nsecs_t undefined_time_nano = env->GetStaticLongField(frameStatsClazz, undefined_time_nano_field);
679 jclass contFrameStatsClazz = env->FindClass("android/view/WindowContentFrameStats");
680 gWindowContentFrameStatsClassInfo.init = env->GetMethodID(contFrameStatsClazz, "init", "(J[J[J[J)V");
683 jclass animFrameStatsClazz = env->FindClass("android/view/WindowAnimationFrameStats");
684 gWindowAnimationFrameStatsClassInfo.init = env->GetMethodID(animFrameStatsClazz, "init", "(J[J)V");