diff options
| author | David 'Digit' Turner <digit@android.com> | 2014-01-14 11:57:18 +0100 |
|---|---|---|
| committer | David 'Digit' Turner <digit@google.com> | 2014-01-18 16:56:31 +0100 |
| commit | b81cc7bbd7baa35042af6c6b71edcfe94004bbcd (patch) | |
| tree | 409c961afb25f6768f38f76110dcf4466d39a4ca /emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp | |
| parent | 4a218a8b31d712290dce83cc65fc0a529fb10823 (diff) | |
| download | sdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.zip sdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.tar.gz sdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.tar.bz2 | |
emulator/opengl: Get rid of all compiler warnings (Linux).
This patch gets rid of all compiler warnings for the
GPU emulation libraries when building on a Linux host.
Note that GLcommon/GLutils.h now provides two new functions
to perform 'safe' type casts between unsigned integers and
pointers: SafePointerFromUInt() and SafeUIntFromPointer().
Change-Id: I01c48bbd72f925d70eb9831f57e15815e687121f
Diffstat (limited to 'emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp')
| -rw-r--r-- | emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp b/emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp index 99f9d8b..3516986 100644 --- a/emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp +++ b/emulator/opengl/host/libs/Translator/EGL/EglDisplay.cpp @@ -142,7 +142,7 @@ EglConfig* EglDisplay::getConfig(EGLConfig conf) { SurfacePtr EglDisplay::getSurface(EGLSurface surface) { android::Mutex::Autolock mutex(m_lock); /* surface is "key" in map<unsigned int, SurfacePtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)surface); + unsigned int hndl = SafeUIntFromPointer(surface); SurfacesHndlMap::iterator it = m_surfaces.find(hndl); return it != m_surfaces.end() ? (*it).second : @@ -152,7 +152,7 @@ SurfacePtr EglDisplay::getSurface(EGLSurface surface) { ContextPtr EglDisplay::getContext(EGLContext ctx) { android::Mutex::Autolock mutex(m_lock); /* ctx is "key" in map<unsigned int, ContextPtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)ctx); + unsigned int hndl = SafeUIntFromPointer(ctx); ContextsHndlMap::iterator it = m_contexts.find(hndl); return it != m_contexts.end() ? (*it).second : @@ -162,7 +162,7 @@ ContextPtr EglDisplay::getContext(EGLContext ctx) { bool EglDisplay::removeSurface(EGLSurface s) { android::Mutex::Autolock mutex(m_lock); /* s is "key" in map<unsigned int, SurfacePtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)s); + unsigned int hndl = SafeUIntFromPointer(s); SurfacesHndlMap::iterator it = m_surfaces.find(hndl); if(it != m_surfaces.end()) { m_surfaces.erase(it); @@ -191,7 +191,7 @@ bool EglDisplay::removeSurface(SurfacePtr s) { bool EglDisplay::removeContext(EGLContext ctx) { android::Mutex::Autolock mutex(m_lock); /* ctx is "key" in map<unsigned int, ContextPtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)ctx); + unsigned int hndl = SafeUIntFromPointer(ctx); ContextsHndlMap::iterator it = m_contexts.find(hndl); if(it != m_contexts.end()) { m_contexts.erase(it); @@ -295,7 +295,7 @@ EGLImageKHR EglDisplay::addImageKHR(ImagePtr img) { ImagePtr EglDisplay::getImage(EGLImageKHR img) { android::Mutex::Autolock mutex(m_lock); /* img is "key" in map<unsigned int, ImagePtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)img); + unsigned int hndl = SafeUIntFromPointer(img); ImagesHndlMap::iterator i( m_eglImages.find(hndl) ); return (i != m_eglImages.end()) ? (*i).second :ImagePtr(NULL); } @@ -303,7 +303,7 @@ ImagePtr EglDisplay::getImage(EGLImageKHR img) { bool EglDisplay:: destroyImageKHR(EGLImageKHR img) { android::Mutex::Autolock mutex(m_lock); /* img is "key" in map<unsigned int, ImagePtr>. */ - unsigned int hndl = ToTargetCompatibleHandle((uintptr_t)img); + unsigned int hndl = SafeUIntFromPointer(img); ImagesHndlMap::iterator i( m_eglImages.find(hndl) ); if (i != m_eglImages.end()) { |
