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
diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.cpp
index 6814fe9..8acf8a1 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 <GLcommon/ThreadInfo.h>
-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 ba451e6..69b8ac4 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;
};