diff options
| author | 2013-05-13 23:31:54 -0700 | |
|---|---|---|
| committer | 2013-05-13 23:31:54 -0700 | |
| commit | 59eaeed5fabc27942d62327fa460ebb8bd2f3822 (patch) | |
| tree | 12b08829177cdc3726c72b8e16b4723e7bba0be4 | |
| parent | f9872c8124d896349d1dd0284def8bc9add8e0ac (diff) | |
| parent | 28fc78bf5fbb6288a27f3f25565a960a1873b0ef (diff) | |
am 28fc78bf: am e8fed71d: Merge "Abort surface composition if hw surface is invalid"
* commit '28fc78bf5fbb6288a27f3f25565a960a1873b0ef':
Abort surface composition if hw surface is invalid
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 735c822668..6ab33ef31b 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1538,7 +1538,11 @@ void SurfaceFlinger::doComposeSurfaces(const sp<const DisplayDevice>& hw, const const bool hasGlesComposition = hwc.hasGlesComposition(id) || (cur==end); if (hasGlesComposition) { - DisplayDevice::makeCurrent(mEGLDisplay, hw, mEGLContext); + if (!DisplayDevice::makeCurrent(mEGLDisplay, hw, mEGLContext)) { + ALOGW("DisplayDevice::makeCurrent failed. Aborting surface composition for display %s", + hw->getDisplayName().string()); + return; + } // set the frame buffer glMatrixMode(GL_MODELVIEW); |