From eada5b81deafbfbea76a2da269c763fa0d83196b Mon Sep 17 00:00:00 2001 From: Yochai Shefi Simchon Date: Sun, 22 May 2011 13:11:30 +0300 Subject: [PATCH] ThreadInfo- use explicit rather than void pointers Replace the void* pointers with explicit pointers for EglContext, EglDisplay and GLEScontext. Use forward declarations. This is to improve finding errors in compile time rather than on run time. Change-Id: Iaec3c36c1e12f36b37d34f68e9d8aa58ff1b30c0 --- .../host/libs/Translator/EGL/ThreadInfo.cpp | 7 ++++++- .../Translator/include/GLcommon/ThreadInfo.h | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp index 6814fe9d2..8acf8a13c 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp @@ -17,7 +17,12 @@ #include -void ThreadInfo::updateInfo(void* eglCtx,void* dpy,void* glesCtx,ShareGroupPtr share,ObjectNameManager* manager) { +void ThreadInfo::updateInfo(EglContext* eglCtx, + EglDisplay* dpy, + GLEScontext* glesCtx, + ShareGroupPtr share, + ObjectNameManager* manager) { + eglContext = eglCtx; eglDisplay = dpy; glesContext = glesCtx; diff --git a/tools/emulator/opengl/host/libs/Translator/include/GLcommon/ThreadInfo.h b/tools/emulator/opengl/host/libs/Translator/include/GLcommon/ThreadInfo.h index ba451e684..69b8ac44b 100644 --- a/tools/emulator/opengl/host/libs/Translator/include/GLcommon/ThreadInfo.h +++ b/tools/emulator/opengl/host/libs/Translator/include/GLcommon/ThreadInfo.h @@ -18,12 +18,22 @@ #include "objectNameManager.h" +class EglContext; +class EglDisplay; +class GLEScontext; + struct ThreadInfo { ThreadInfo():eglContext(NULL),glesContext(NULL),objManager(NULL){} - void updateInfo(void* eglctx,void* dpy,void* glesCtx,ShareGroupPtr share,ObjectNameManager* manager); - void* eglContext; - void* eglDisplay; - void* glesContext; + + void updateInfo(EglContext* eglctx, + EglDisplay* dpy, + GLEScontext* glesCtx, + ShareGroupPtr share, + ObjectNameManager* manager); + + EglContext* eglContext; + EglDisplay* eglDisplay; + GLEScontext* glesContext; ShareGroupPtr shareGroup; ObjectNameManager* objManager; };