I created glut_waffle by forking Piglit's (now extinct) glut_egl. Much of
the code that glut_waffle inherited from glut_egl has never been used.
This patch kills it.

Signed-off-by: Chad Versace <chad.vers...@linux.intel.com>
---
 src/glut_waffle/glut_waffle.c | 56 -------------------------------------------
 src/glut_waffle/glut_waffle.h | 15 ------------
 2 files changed, 71 deletions(-)

diff --git a/src/glut_waffle/glut_waffle.c b/src/glut_waffle/glut_waffle.c
index 11b2149..3381a2e 100644
--- a/src/glut_waffle/glut_waffle.c
+++ b/src/glut_waffle/glut_waffle.c
@@ -28,14 +28,10 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/time.h>
 #include <unistd.h>
 
-#include <EGL/egl.h>
 #include <waffle.h>
 
-extern int piglit_automatic;
-
 struct glut_waffle_window;
 
 struct glut_waffle_state {
@@ -55,11 +51,6 @@ struct glut_waffle_state {
        int window_width;
        int window_height;
 
-       int verbose;
-       int init_time;
-
-       GLUT_EGLidleCB idle_cb;
-
        struct waffle_display *display;
        struct waffle_context *context;
        struct glut_window *window;
@@ -72,7 +63,6 @@ static struct glut_waffle_state _glut_waffle_state = {
        .display_mode = GLUT_RGB,
        .window_width = 300,
        .window_height = 300,
-       .verbose = 0,
        .window_id_pool = 0,
 };
 
@@ -86,7 +76,6 @@ struct glut_window {
        GLUT_EGLreshapeCB reshape_cb;
        GLUT_EGLdisplayCB display_cb;
        GLUT_EGLkeyboardCB keyboard_cb;
-       GLUT_EGLspecialCB special_cb;
 };
 
 static void
@@ -105,20 +94,6 @@ glutFatal(char *format, ...)
        exit(1);
 }
 
-/**  Return current time (in milliseconds). */
-static int
-glutNow(void)
-{
-       struct timeval tv;
-#ifdef __VMS
-       (void) gettimeofday(&tv, NULL );
-#else
-       struct timezone tz;
-       (void) gettimeofday(&tv, &tz);
-#endif
-       return tv.tv_sec * 1000 + tv.tv_usec / 1000;
-}
-
 void
 glutInitAPIMask(int mask)
 {
@@ -183,8 +158,6 @@ glutInit(int *argcp, char **argv)
        _glut->display = waffle_display_connect(display_name);
        if (!_glut->display)
                glutFatal("waffle_display_connect() failed");
-
-       _glut->init_time = glutNow();
 }
 
 void
@@ -254,29 +227,6 @@ glutChooseConfig(void)
        return config;
 }
 
-int
-glutGet(int state)
-{
-       int val;
-
-       switch (state) {
-               case GLUT_ELAPSED_TIME:
-                       val = glutNow() - _glut->init_time;
-                       break;
-               default:
-                       val = -1;
-                       break;
-       }
-
-       return val;
-}
-
-void
-glutIdleFunc(GLUT_EGLidleCB func)
-{
-       _glut->idle_cb = func;
-}
-
 void
 glutPostRedisplay(void)
 {
@@ -374,12 +324,6 @@ glutKeyboardFunc(GLUT_EGLkeyboardCB func)
 }
 
 void
-glutSpecialFunc(GLUT_EGLspecialCB func)
-{
-       _glut->window->special_cb = func;
-}
-
-void
 glutMainLoop(void)
 {
        bool ok = true;
diff --git a/src/glut_waffle/glut_waffle.h b/src/glut_waffle/glut_waffle.h
index 0ac5ead..aa33c58 100644
--- a/src/glut_waffle/glut_waffle.h
+++ b/src/glut_waffle/glut_waffle.h
@@ -44,20 +44,9 @@ enum glut_api {
        GLUT_OPENGL_ES2_BIT = 0x4,
 };
 
-/* used by glutGet */
-enum {
-       GLUT_ELAPSED_TIME,
-       GLUT_WINDOW_RED_SIZE,
-       GLUT_WINDOW_GREEN_SIZE,
-       GLUT_WINDOW_BLUE_SIZE,
-       GLUT_WINDOW_ALPHA_SIZE,
-};
-
-typedef void (*GLUT_EGLidleCB)(void);
 typedef void (*GLUT_EGLreshapeCB)(int, int);
 typedef void (*GLUT_EGLdisplayCB)(void);
 typedef void (*GLUT_EGLkeyboardCB)(unsigned char, int, int);
-typedef void (*GLUT_EGLspecialCB)(int, int, int);
 
 void glutInitAPIMask(int mask);
 void glutInitDisplayMode(unsigned int mode);
@@ -65,9 +54,6 @@ void glutInitWindowPosition(int x, int y);
 void glutInitWindowSize(int width, int height);
 void glutInit(int *argcp, char **argv);
 
-int glutGet(int state);
-
-void glutIdleFunc(GLUT_EGLidleCB func);
 void glutPostRedisplay(void);
 
 void glutMainLoop(void);
@@ -83,5 +69,4 @@ void glutShowWindow(int win);
 void glutDisplayFunc(GLUT_EGLdisplayCB func);
 void glutReshapeFunc(GLUT_EGLreshapeCB func);
 void glutKeyboardFunc(GLUT_EGLkeyboardCB func);
-void glutSpecialFunc(GLUT_EGLspecialCB func);
 void glutSwapBuffers(void);
-- 
1.7.12

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to