From 996fd61442e4186e23418cc8a3b0cd593398be26 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Sun, 31 Jan 2010 11:26:56 +0800 Subject: egl: Remove code blocks that are commented out. They are either unit tests or to demonstrate how functions are supposed to be used. The unit test is outdated and it should be better to take a look at any of the working drivers to see how a function is used. --- src/egl/main/eglmode.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'src/egl/main/eglmode.c') diff --git a/src/egl/main/eglmode.c b/src/egl/main/eglmode.c index 1e26ea83f5..66446c0495 100644 --- a/src/egl/main/eglmode.c +++ b/src/egl/main/eglmode.c @@ -350,41 +350,3 @@ _eglQueryModeStringMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLMode *m) { return m->Name; } - - -#if 0 -static int -_eglRand(int max) -{ - return rand() % max; -} - -void -_eglTestModeModule(void) -{ - EGLint count = 30; - _EGLMode *modes = (_EGLMode *) malloc(count * sizeof(_EGLMode)); - _EGLMode **modeList = (_EGLMode **) malloc(count * sizeof(_EGLMode*)); - EGLint i; - - for (i = 0; i < count; i++) { - modes[i].Handle = _eglRand(20); - modes[i].Width = 512 + 256 * _eglRand(2); - modes[i].Height = 512 + 256 * _eglRand(2); - modes[i].RefreshRate = 50 + 5 * _eglRand(3); - modes[i].Interlaced = _eglRand(2); - modes[i].Optimal = _eglRand(4) == 0; - modeList[i] = modes + i; - } - - /* sort array of pointers */ - qsort(modeList, count, sizeof(_EGLMode *), compareModes); - - for (i = 0; i < count; i++) { - _EGLMode *m = modeList[i]; - printf("%2d: %3d %4d x %4d @ %3d opt %d int %d\n", i, - m->Handle, m->Width, m->Height, m->RefreshRate, - m->Optimal, m->Interlaced); - } -} -#endif -- cgit v1.2.3