1 /* 2 * Copyright 2016 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 #include <jni.h> 18 #include <stdio.h> 19 20 extern int register_android_graphics_cts_ANativeWindowTest(JNIEnv*); 21 extern int register_android_graphics_cts_ASurfaceTextureTest(JNIEnv*); 22 extern int register_android_graphics_cts_BasicVulkanGpuTest(JNIEnv*); 23 extern int register_android_graphics_cts_BitmapTest(JNIEnv*); 24 extern int register_android_graphics_cts_CameraGpuCtsActivity(JNIEnv*); 25 extern int register_android_graphics_cts_CameraVulkanGpuTest(JNIEnv*); 26 extern int register_android_graphics_cts_MediaVulkanGpuTest(JNIEnv*); 27 extern int register_android_graphics_cts_VulkanFeaturesTest(JNIEnv*); 28 extern int register_android_graphics_cts_VulkanPreTransformCtsActivity(JNIEnv*); 29 30 jint JNI_OnLoad(JavaVM* vm, void* /*reserved*/) { 31 JNIEnv* env = nullptr; 32 if (vm->GetEnv((void**)&env, JNI_VERSION_1_4) != JNI_OK) 33 return JNI_ERR; 34 if (register_android_graphics_cts_ANativeWindowTest(env)) 35 return JNI_ERR; 36 if (register_android_graphics_cts_ASurfaceTextureTest(env)) 37 return JNI_ERR; 38 if (register_android_graphics_cts_BitmapTest(env)) 39 return JNI_ERR; 40 if (register_android_graphics_cts_CameraGpuCtsActivity(env)) 41 return JNI_ERR; 42 if (register_android_graphics_cts_CameraVulkanGpuTest(env)) 43 return JNI_ERR; 44 if (register_android_graphics_cts_MediaVulkanGpuTest(env)) 45 return JNI_ERR; 46 if (register_android_graphics_cts_VulkanFeaturesTest(env)) 47 return JNI_ERR; 48 if (register_android_graphics_cts_VulkanPreTransformCtsActivity(env)) 49 return JNI_ERR; 50 if (register_android_graphics_cts_BasicVulkanGpuTest(env)) 51 return JNI_ERR; 52 if (register_android_graphics_cts_CameraVulkanGpuTest(env)) 53 return JNI_ERR; 54 return JNI_VERSION_1_4; 55 } 56