diff options
| author | Jesse Hall <jessehall@google.com> | 2012-08-23 18:05:44 -0700 |
|---|---|---|
| committer | Jesse Hall <jessehall@google.com> | 2012-08-24 10:41:07 -0700 |
| commit | 425be59a9fbc663fd7ac43cb7f447b4230c019d3 (patch) | |
| tree | 3a025f969c0fbbd617e5ed9de40bb6f32eadea37 /emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp | |
| parent | 3246083057e51e1e0b8f1b73a7600215eca83d4e (diff) | |
| download | sdk-425be59a9fbc663fd7ac43cb7f447b4230c019d3.zip sdk-425be59a9fbc663fd7ac43cb7f447b4230c019d3.tar.gz sdk-425be59a9fbc663fd7ac43cb7f447b4230c019d3.tar.bz2 | |
Check that the native display is valid before using it
EglOS::getDefaultDisplay() can return an invalid display, e.g. on X11
if $DISPLAY is not set. This is called from the EglGlobalInfo
constructor, which doesn't have a good way to indicate failure. So
instead EglGlobalInfo::addDisplay() checks that the display is valid
before wrapping it in a EglDisplay.
Bug: 7020498
Change-Id: Id18fc568dae5bff4b45b706f3322ae5e4785d95d
Diffstat (limited to 'emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp')
| -rw-r--r-- | emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp b/emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp index b5e7d67..fd3cb0b 100644 --- a/emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp +++ b/emulator/opengl/host/libs/Translator/EGL/EglMacApi.cpp @@ -103,6 +103,10 @@ void queryConfigs(EGLNativeDisplayType dpy,int renderableType,ConfigsList& listO } } +bool validNativeDisplay(EGLNativeInternalDisplayType dpy) { + return true; +} + bool validNativeWin(EGLNativeDisplayType dpy, EGLNativeWindowType win) { unsigned int width,height; return nsGetWinDims(win,&width,&height); |
