summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-09-25 19:16:28 -0700
committerThe Android Automerger <android-build@android.com>2012-09-25 20:47:29 -0700
commite272b25aa9ec1ada8b69bb7fe71ca284a50571f0 (patch)
treecb46bf639c24fd5662971b3bbe38054cf7f04cdd
parent52d3d4de8851fe0f877333331e4c415095a9efbf (diff)
downloadframeworks_native-e272b25aa9ec1ada8b69bb7fe71ca284a50571f0.zip
frameworks_native-e272b25aa9ec1ada8b69bb7fe71ca284a50571f0.tar.gz
frameworks_native-e272b25aa9ec1ada8b69bb7fe71ca284a50571f0.tar.bz2
only abort when errors happen on the main display
Bug: 7232690 Change-Id: I2c4b35a82f131da26deea738ef294e100e536d15
-rw-r--r--services/surfaceflinger/DisplayDevice.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index 56852da..47dd073 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -228,11 +228,14 @@ 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",
- mDisplay, mSurface, eglGetError());
+ 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 {