Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2016-06-15 09:42:26 +0000
committerAlexander Kurtakov2016-06-15 09:42:26 +0000
commit02b099465cbe32576dedcf71d10691f1566a05e7 (patch)
treed22d29ed7bf99bfd65c173d80249435094dc49d2 /bundles
parent5a532b2298e7b9e82321cfd90c6940ccc220ea5f (diff)
downloadeclipse.platform.swt-02b099465cbe32576dedcf71d10691f1566a05e7.tar.gz
eclipse.platform.swt-02b099465cbe32576dedcf71d10691f1566a05e7.tar.xz
eclipse.platform.swt-02b099465cbe32576dedcf71d10691f1566a05e7.zip
Bug 496158 - Remove useless function binding in GLX
As these functions are not used they just increase code and binaries size and make it harder to look at what's needed to use GTK 3.18 built-in GL draw. Change-Id: Ia6c2d15a2be00faac8c497e5566d1a220adfd61b Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c156
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java136
4 files changed, 4 insertions, 316 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
index 80e4ef268b..5a43d72acc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -69,16 +69,6 @@ fail:
}
#endif
-#ifndef NO__1glXCopyContext
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXCopyContext)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3)
-{
- GLX_NATIVE_ENTER(env, that, _1glXCopyContext_FUNC);
- glXCopyContext((Display *)arg0, (GLXContext)arg1, (GLXContext)arg2, arg3);
- GLX_NATIVE_EXIT(env, that, _1glXCopyContext_FUNC);
-}
-#endif
-
#ifndef NO__1glXCreateContext
JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXCreateContext)
(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2, jboolean arg3)
@@ -95,22 +85,6 @@ fail:
}
#endif
-#ifndef NO__1glXCreateGLXPixmap
-JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXCreateGLXPixmap)
- (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jintLong arg2)
-{
- XVisualInfo _arg1, *lparg1=NULL;
- jintLong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXCreateGLXPixmap_FUNC);
- if (arg1) if ((lparg1 = getXVisualInfoFields(env, arg1, &_arg1)) == NULL) goto fail;
- rc = (jintLong)glXCreateGLXPixmap((Display *)arg0, lparg1, (Pixmap)arg2);
-fail:
- if (arg1 && lparg1) setXVisualInfoFields(env, arg1, lparg1);
- GLX_NATIVE_EXIT(env, that, _1glXCreateGLXPixmap_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1glXDestroyContext
JNIEXPORT void JNICALL GLX_NATIVE(_1glXDestroyContext)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -121,28 +95,6 @@ JNIEXPORT void JNICALL GLX_NATIVE(_1glXDestroyContext)
}
#endif
-#ifndef NO__1glXDestroyGLXPixmap
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXDestroyGLXPixmap)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- GLX_NATIVE_ENTER(env, that, _1glXDestroyGLXPixmap_FUNC);
- glXDestroyGLXPixmap((Display *)arg0, (GLXPixmap)arg1);
- GLX_NATIVE_EXIT(env, that, _1glXDestroyGLXPixmap_FUNC);
-}
-#endif
-
-#ifndef NO__1glXGetClientString
-JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXGetClientString)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jintLong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXGetClientString_FUNC);
- rc = (jintLong)glXGetClientString((Display *)arg0, arg1);
- GLX_NATIVE_EXIT(env, that, _1glXGetClientString_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1glXGetConfig
JNIEXPORT jint JNICALL GLX_NATIVE(_1glXGetConfig)
(JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2, jintArray arg3)
@@ -174,30 +126,6 @@ JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXGetCurrentContext)
}
#endif
-#ifndef NO__1glXGetCurrentDrawable
-JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXGetCurrentDrawable)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXGetCurrentDrawable_FUNC);
- rc = (jintLong)glXGetCurrentDrawable();
- GLX_NATIVE_EXIT(env, that, _1glXGetCurrentDrawable_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1glXIsDirect
-JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXIsDirect)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- jboolean rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXIsDirect_FUNC);
- rc = (jboolean)glXIsDirect((Display *)arg0, (GLXContext)arg1);
- GLX_NATIVE_EXIT(env, that, _1glXIsDirect_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1glXMakeCurrent
JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXMakeCurrent)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2)
@@ -210,68 +138,6 @@ JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXMakeCurrent)
}
#endif
-#ifndef NO__1glXQueryExtension
-JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXQueryExtension)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXQueryExtension_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jboolean)glXQueryExtension((Display *)arg0, lparg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GLX_NATIVE_EXIT(env, that, _1glXQueryExtension_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1glXQueryExtensionsString
-JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXQueryExtensionsString)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1)
-{
- jintLong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXQueryExtensionsString_FUNC);
- rc = (jintLong)glXQueryExtensionsString((Display *)arg0, arg1);
- GLX_NATIVE_EXIT(env, that, _1glXQueryExtensionsString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1glXQueryServerString
-JNIEXPORT jintLong JNICALL GLX_NATIVE(_1glXQueryServerString)
- (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2)
-{
- jintLong rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXQueryServerString_FUNC);
- rc = (jintLong)glXQueryServerString((Display *)arg0, arg1, arg2);
- GLX_NATIVE_EXIT(env, that, _1glXQueryServerString_FUNC);
- return rc;
-}
-#endif
-
-#ifndef NO__1glXQueryVersion
-JNIEXPORT jboolean JNICALL GLX_NATIVE(_1glXQueryVersion)
- (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
-{
- jint *lparg1=NULL;
- jint *lparg2=NULL;
- jboolean rc = 0;
- GLX_NATIVE_ENTER(env, that, _1glXQueryVersion_FUNC);
- if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail;
- if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail;
- rc = (jboolean)glXQueryVersion((Display *)arg0, lparg1, lparg2);
-fail:
- if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0);
- if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0);
- GLX_NATIVE_EXIT(env, that, _1glXQueryVersion_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1glXSwapBuffers
JNIEXPORT void JNICALL GLX_NATIVE(_1glXSwapBuffers)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
@@ -282,26 +148,6 @@ JNIEXPORT void JNICALL GLX_NATIVE(_1glXSwapBuffers)
}
#endif
-#ifndef NO__1glXWaitGL
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXWaitGL)
- (JNIEnv *env, jclass that)
-{
- GLX_NATIVE_ENTER(env, that, _1glXWaitGL_FUNC);
- glXWaitGL();
- GLX_NATIVE_EXIT(env, that, _1glXWaitGL_FUNC);
-}
-#endif
-
-#ifndef NO__1glXWaitX
-JNIEXPORT void JNICALL GLX_NATIVE(_1glXWaitX)
- (JNIEnv *env, jclass that)
-{
- GLX_NATIVE_ENTER(env, that, _1glXWaitX_FUNC);
- glXWaitX();
- GLX_NATIVE_EXIT(env, that, _1glXWaitX_FUNC);
-}
-#endif
-
#ifndef NO_memmove
JNIEXPORT void JNICALL GLX_NATIVE(memmove)
(JNIEnv *env, jclass that, jobject arg0, jintLong arg1, jint arg2)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
index 6fd31ebe45..8dcad2f1b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,24 +19,12 @@ char * GLX_nativeFunctionNames[] = {
"_1glGetIntegerv",
"_1glViewport",
"_1glXChooseVisual",
- "_1glXCopyContext",
"_1glXCreateContext",
- "_1glXCreateGLXPixmap",
"_1glXDestroyContext",
- "_1glXDestroyGLXPixmap",
- "_1glXGetClientString",
"_1glXGetConfig",
"_1glXGetCurrentContext",
- "_1glXGetCurrentDrawable",
- "_1glXIsDirect",
"_1glXMakeCurrent",
- "_1glXQueryExtension",
- "_1glXQueryExtensionsString",
- "_1glXQueryServerString",
- "_1glXQueryVersion",
"_1glXSwapBuffers",
- "_1glXWaitGL",
- "_1glXWaitX",
"memmove",
};
#define NATIVE_FUNCTION_COUNT sizeof(GLX_nativeFunctionNames) / sizeof(char*)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
index 3c39671663..226a46b37f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/library/glx_stats.h
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,23 +29,11 @@ typedef enum {
_1glGetIntegerv_FUNC,
_1glViewport_FUNC,
_1glXChooseVisual_FUNC,
- _1glXCopyContext_FUNC,
_1glXCreateContext_FUNC,
- _1glXCreateGLXPixmap_FUNC,
_1glXDestroyContext_FUNC,
- _1glXDestroyGLXPixmap_FUNC,
- _1glXGetClientString_FUNC,
_1glXGetConfig_FUNC,
_1glXGetCurrentContext_FUNC,
- _1glXGetCurrentDrawable_FUNC,
- _1glXIsDirect_FUNC,
_1glXMakeCurrent_FUNC,
- _1glXQueryExtension_FUNC,
- _1glXQueryExtensionsString_FUNC,
- _1glXQueryServerString_FUNC,
- _1glXQueryVersion_FUNC,
_1glXSwapBuffers_FUNC,
- _1glXWaitGL_FUNC,
- _1glXWaitX_FUNC,
memmove_FUNC,
} GLX_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
index 5a868f9984..c48b89bcb8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/glx/org/eclipse/swt/internal/opengl/glx/GLX.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -242,20 +242,6 @@ public static final long /*int*/ glXChooseVisual(long /*int*/ dpy, int screen, i
}
/**
* @param dpy cast=(Display *)
- * @param src cast=(GLXContext)
- * @param dst cast=(GLXContext)
- */
-public static final native void _glXCopyContext(long /*int*/ dpy, long /*int*/ src, long /*int*/ dst, int mask);
-public static final void glXCopyContext(long /*int*/ dpy, long /*int*/ src, long /*int*/ dst, int mask) {
- lock.lock();
- try {
- _glXCopyContext(dpy, src, dst, mask);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param dpy cast=(Display *)
* @param shareList cast=(GLXContext)
*/
public static final native long /*int*/ _glXCreateContext(long /*int*/ dpy, XVisualInfo vis, long /*int*/ shareList, boolean direct);
@@ -269,19 +255,6 @@ public static final long /*int*/ glXCreateContext(long /*int*/ dpy, XVisualInfo
}
/**
* @param dpy cast=(Display *)
- * @param pixmap cast=(Pixmap)
- */
-public static final native long /*int*/ _glXCreateGLXPixmap(long /*int*/ dpy, XVisualInfo vis, long /*int*/ pixmap);
-public static final long /*int*/ glXCreateGLXPixmap(long /*int*/ dpy, XVisualInfo vis, long /*int*/ pixmap) {
- lock.lock();
- try {
- return _glXCreateGLXPixmap(dpy, vis, pixmap);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param dpy cast=(Display *)
* @param ctx cast=(GLXContext)
*/
public static final native void _glXDestroyContext(long /*int*/ dpy, long /*int*/ ctx);
@@ -293,29 +266,6 @@ public static final void glXDestroyContext(long /*int*/ dpy, long /*int*/ ctx) {
lock.unlock();
}
}
-/**
- * @param dpy cast=(Display *)
- * @param pix cast=(GLXPixmap)
- */
-public static final native void _glXDestroyGLXPixmap(long /*int*/ dpy, long /*int*/ pix);
-public static final void glXDestroyGLXPixmap(long /*int*/ dpy, long /*int*/ pix) {
- lock.lock();
- try {
- _glXDestroyGLXPixmap(dpy, pix);
- } finally {
- lock.unlock();
- }
-}
-/** @param dpy cast=(Display *) */
-public static final native long /*int*/ _glXGetClientString(long /*int*/ dpy, int name);
-public static final long /*int*/ glXGetClientString(long /*int*/ dpy, int name) {
- lock.lock();
- try {
- return _glXGetClientString(dpy, name);
- } finally {
- lock.unlock();
- }
-}
/** @param dpy cast=(Display *) */
public static final native int _glXGetConfig(long /*int*/ dpy, XVisualInfo vis, int attrib, int[] value);
public static final int glXGetConfig(long /*int*/ dpy, XVisualInfo vis, int attrib, int[] value) {
@@ -335,28 +285,6 @@ public static final long /*int*/ glXGetCurrentContext() {
lock.unlock();
}
}
-public static final native long /*int*/ _glXGetCurrentDrawable();
-public static final long /*int*/ glXGetCurrentDrawable() {
- lock.lock();
- try {
- return _glXGetCurrentDrawable();
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param dpy cast=(Display *)
- * @param ctx cast=(GLXContext)
- */
-public static final native boolean _glXIsDirect(long /*int*/ dpy, long /*int*/ ctx);
-public static final boolean glXIsDirect(long /*int*/ dpy, long /*int*/ ctx) {
- lock.lock();
- try {
- return _glXIsDirect(dpy, ctx);
- } finally {
- lock.unlock();
- }
-}
/**
* @param dpy cast=(Display *)
* @param drawable cast=(GLXDrawable)
@@ -371,50 +299,6 @@ public static final boolean glXMakeCurrent(long /*int*/ dpy, long /*int*/ drawab
lock.unlock();
}
}
-/** @param dpy cast=(Display *) */
-public static final native boolean _glXQueryExtension(long /*int*/ dpy, int[] errorBase, int[] eventBase);
-public static final boolean glXQueryExtension(long /*int*/ dpy, int[] errorBase, int[] eventBase) {
- lock.lock();
- try {
- return _glXQueryExtension(dpy, errorBase, eventBase);
- } finally {
- lock.unlock();
- }
-}
-/** @param dpy cast=(Display *) */
-public static final native long /*int*/ _glXQueryExtensionsString(long /*int*/ dpy, int screen);
-public static final long /*int*/ glXQueryExtensionsString(long /*int*/ dpy, int screen) {
- lock.lock();
- try {
- return _glXQueryExtensionsString(dpy, screen);
- } finally {
- lock.unlock();
- }
-}
-/** @param dpy cast=(Display *) */
-public static final native long /*int*/ _glXQueryServerString(long /*int*/ dpy, int screen, int name);
-public static final long /*int*/ glXQueryServerString(long /*int*/ dpy, int screen, int name) {
- lock.lock();
- try {
- return _glXQueryServerString(dpy, screen, name);
- } finally {
- lock.unlock();
- }
-}
-/**
- * @param dpy cast=(Display *)
- * @param major flags=no_in
- * @param minor flags=no_in
- */
-public static final native boolean _glXQueryVersion(long /*int*/ dpy, int[] major, int[] minor);
-public static final boolean glXQueryVersion(long /*int*/ dpy, int[] major, int[] minor) {
- lock.lock();
- try {
- return _glXQueryVersion(dpy, major, minor);
- } finally {
- lock.unlock();
- }
-}
/**
* @param dpy cast=(Display *)
* @param drawable cast=(GLXDrawable)
@@ -428,24 +312,6 @@ public static final void glXSwapBuffers(long /*int*/ dpy, long /*int*/ drawable)
lock.unlock();
}
}
-public static final native void _glXWaitGL();
-public static final void glXWaitGL() {
- lock.lock();
- try {
- _glXWaitGL();
- } finally {
- lock.unlock();
- }
-}
-public static final native void _glXWaitX();
-public static final void glXWaitX() {
- lock.lock();
- try {
- _glXWaitX();
- } finally {
- lock.unlock();
- }
-}
/**
* @param src cast=(const void *)
* @param size cast=(size_t)

Back to the top