Merge "Abort surface composition if hw surface is invalid"

This commit is contained in:
Jesse Hall 2013-05-14 00:24:28 +00:00 committed by Gerrit Code Review
commit e8fed71da2
1 changed files with 5 additions and 1 deletions

View File

@ -1520,7 +1520,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);