diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2009-09-29 18:29:35 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2009-09-29 18:33:53 +0800 |
commit | c83d23d30d6ead814d0235fa8b236b5be08a2c2e (patch) | |
tree | 5c63c15e0ad60971121bf16465180d33b014a79e /src/egl/drivers | |
parent | e786472b8d4c5a532c51d024cf019f6e2d9b302f (diff) |
egl_android: Install customized logger.
Diffstat (limited to 'src/egl/drivers')
-rw-r--r-- | src/egl/drivers/android/egl_android.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/egl/drivers/android/egl_android.c b/src/egl/drivers/android/egl_android.c index e9e0114683..601e9fb09c 100644 --- a/src/egl/drivers/android/egl_android.c +++ b/src/egl/drivers/android/egl_android.c @@ -21,6 +21,9 @@ * DEALINGS IN THE SOFTWARE. */ +#define LOG_TAG "DROID-EGL" +#include <utils/Log.h> + #include "glapi/glapi.h" #include "eglconfig.h" @@ -522,6 +525,25 @@ droid_Unload(_EGLDriver *drv) free(droid_drv); } +static void +droid_Log(EGLint level, const char *msg) +{ + switch (level) { + case _EGL_DEBUG: + LOGD(msg); + break; + case _EGL_INFO: + LOGI(msg); + break; + case _EGL_WARNING: + LOGW(msg); + break; + case _EGL_FATAL: + LOGE(msg); + break; + } +} + _EGLDriver * _eglMain(const char *args) { @@ -557,5 +579,7 @@ _eglMain(const char *args) droid_drv->finish_current = (void (*)(void)) droid_eglGetProcAddress("glFinish"); + _eglSetLogProc(droid_Log); + return &droid_drv->base; } |