am b06fbffb: am 32341381: only abort when errors happen on the main display

* commit 'b06fbffbded32050e91e1c65b452856a1a264d22':
  only abort when errors happen on the main display
This commit is contained in:
Mathias Agopian 2012-09-25 19:24:03 -07:00 committed by Android Git Automerger
commit 29911c8b1a

View File

@ -228,12 +228,15 @@ void DisplayDevice::swapBuffers(HWComposer& hwc) const {
}
}
// TODO: we should at least handle EGL_CONTEXT_LOST, by recreating the
// context and resetting our state.
LOG_ALWAYS_FATAL_IF(!success,
"eglSwapBuffers(%p, %p) failed with 0x%8x",
if (!success) {
EGLint error = eglGetError();
if (error == EGL_CONTEXT_LOST ||
mType == DisplayDevice::DISPLAY_PRIMARY) {
LOG_ALWAYS_FATAL("eglSwapBuffers(%p, %p) failed with 0x%08x",
mDisplay, mSurface, eglGetError());
}
}
}
void DisplayDevice::onSwapBuffersCompleted(HWComposer& hwc) const {
if (hwc.initCheck() == NO_ERROR) {