diff options
author | Jesse Hall <jessehall@google.com> | 2013-03-25 14:43:23 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2013-03-27 14:58:09 -0700 |
commit | 02d86567d95b99e1142941ed7ec23a4465822813 (patch) | |
tree | 70c664e137836fb8bbf22391fa2787d8c44a9393 /services/surfaceflinger/DisplayHardware | |
parent | 5a557a61d6a5cd2d82dcd961b1d72b5621eb014d (diff) | |
download | frameworks_native-02d86567d95b99e1142941ed7ec23a4465822813.zip frameworks_native-02d86567d95b99e1142941ed7ec23a4465822813.tar.gz frameworks_native-02d86567d95b99e1142941ed7ec23a4465822813.tar.bz2 |
Clean up HWC state when releasing a DisplayDevice
DisplayDevices can be released when DisplayManager removes them from
the display list, or (for virtual displays) when the surface is set to
NULL. We were only cleaning up HWC resources associated with the
display in the first case.
Bug: 8384764
Change-Id: Id3d226dd7178fbe6d0a2ac4e2660b864ee073de3
Diffstat (limited to 'services/surfaceflinger/DisplayHardware')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWComposer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp index 497593b..86e674a 100644 --- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp +++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp @@ -953,17 +953,17 @@ void HWComposer::dump(String8& result, char* buffer, size_t SIZE) const { result.appendFormat(" mDebugForceFakeVSync=%d\n", mDebugForceFakeVSync); for (size_t i=0 ; i<mNumDisplays ; i++) { const DisplayData& disp(mDisplayData[i]); + if (!disp.connected) + continue; const Vector< sp<Layer> >& visibleLayersSortedByZ = mFlinger->getLayerSortedByZForHwcDisplay(i); - if (disp.connected) { - result.appendFormat( - " Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n", - i, disp.width, disp.height, disp.xdpi, disp.ydpi, disp.refresh); - } + result.appendFormat( + " Display[%d] : %ux%u, xdpi=%f, ydpi=%f, refresh=%lld\n", + i, disp.width, disp.height, disp.xdpi, disp.ydpi, disp.refresh); - if (disp.list && disp.connected) { + if (disp.list) { result.appendFormat( " numHwLayers=%u, flags=%08x\n", disp.list->numHwLayers, disp.list->flags); |