OSDN Git Service

Fix crashes after HDMI disconnect
authorAndy McFadden <fadden@android.com>
Wed, 3 Oct 2012 02:04:45 +0000 (19:04 -0700)
committerMathias Agopian <mathias@google.com>
Thu, 4 Oct 2012 09:02:23 +0000 (02:02 -0700)
commit27ec5739bc05330e08b02f25b62a8f597bad897a
tree50e484067f099f8803beb531655ed4479cdcaba1
parenta573945df7d21cfb73aa9cdba41561105e2ffb01
Fix crashes after HDMI disconnect

The display was being removed from SurfaceFlinger's list before we
had a chance to reset HWComposer's layer list, so we were passing
stale data into the hardware composer (which has its own per-display
data).  This resulted in "invalid gralloc handle" complaints.
We now clear the layer list immediately after removing the display.

The display was being removed while its EGLSurface was still
"current", resulting in "cancelBuffer: BufferQueue has been
abandoned" complaints.  We now call makeCurrent on the primary
display before removing the external display.

Bug 7274254

Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
services/surfaceflinger/DisplayHardware/HWComposer.cpp
services/surfaceflinger/DisplayHardware/HWComposer.h
services/surfaceflinger/SurfaceFlinger.cpp