1ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat/* EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
2ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhatstatic jobject
3ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhatandroid_eglGetDisplay
4ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat  (JNIEnv *_env, jobject _this, jlong display_id) {
5ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    EGLDisplay _returnValue = (EGLDisplay) 0;
6ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    _returnValue = eglGetDisplay(
7ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat        reinterpret_cast<EGLNativeDisplayType>(display_id)
8ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    );
9ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    return toEGLHandle(_env, egldisplayClass, egldisplayConstructor, _returnValue);
10ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat}
11ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat
12ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat/* EGLDisplay eglGetDisplay ( EGLNativeDisplayType display_id ) */
13ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhatstatic jobject
14ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhatandroid_eglGetDisplayInt
15ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat  (JNIEnv *_env, jobject _this, jint display_id) {
16ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat
17ad0f52fc2be6161f61fd95e4f12739c65661673aDan Albert    if (static_cast<uintptr_t>(display_id) !=
18ad0f52fc2be6161f61fd95e4f12739c65661673aDan Albert        reinterpret_cast<uintptr_t>(EGL_DEFAULT_DISPLAY)) {
19ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat        jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglGetDisplay");
20ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat        return 0;
21ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    }
22ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat    return android_eglGetDisplay(_env, _this, display_id);
23ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat}
24ab6fc2a86f34be455c144a2d691e94909998c959Ashok Bhat
25