Skip to content

Commit

Permalink
Abort surface composition if hw surface is invalid
Browse files Browse the repository at this point in the history
If an invalid display device is detected during surface composition
(e.g., a simulated secondary display is removed), abort the
composition.

Change-Id: Ia6afb2e287882d8ae0614eb25463d3f85b687adf
  • Loading branch information
mchock-nv authored and Whitehawkx committed Jun 1, 2013
1 parent 046e402 commit fffab2e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/surfaceflinger/SurfaceFlinger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1542,7 +1542,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);
Expand Down

0 comments on commit fffab2e

Please sign in to comment.