[android] #2996 - test workaround for device not sharing context

This commit is contained in:
Tobrun
2016-03-07 15:27:56 -05:00
parent 30c753e7c4
commit 46986c665e

View File

@@ -429,6 +429,11 @@ void NativeMapView::createSurface(ANativeWindow *window_) {
oldDisplay = display;
}
if (!eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)) {
mbgl::Log::Error(mbgl::Event::OpenGL,"eglMakeCurrent(EGL_NO_CONTEXT) returned error %d", eglGetError());
throw new std::runtime_error("eglMakeCurrent() failed");
}
if (!eglMakeCurrent(oldDisplay, oldDrawSurface, oldReadSurface, oldContext)) {
mbgl::Log::Error(mbgl::Event::OpenGL,
"eglMakeCurrent(EGL_NO_CONTEXT) returned error %d", eglGetError());