Loading services/surfaceflinger/SurfaceFlinger.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -3475,6 +3475,15 @@ void SurfaceFlinger::doCommitTransactions() { l->latchAndReleaseBuffer(); } // If a layer has a parent, we allow it to out-live it's handle // with the idea that the parent holds a reference and will eventually // be cleaned up. However no one cleans up the top-level so we do so // here. if (l->isAtRoot()) { l->setIsAtRoot(false); mCurrentState.layersSortedByZ.remove(l); } // If the layer has been removed and has no parent, then it will not be reachable // when traversing layers on screen. Add the layer to the offscreenLayers set to // ensure we can copy its current to drawing state. Loading Loading @@ -4765,14 +4774,6 @@ void SurfaceFlinger::markLayerPendingRemovalLocked(const sp<Layer>& layer) { void SurfaceFlinger::onHandleDestroyed(BBinder* handle, sp<Layer>& layer) { Mutex::Autolock lock(mStateLock); // If a layer has a parent, we allow it to out-live it's handle // with the idea that the parent holds a reference and will eventually // be cleaned up. However no one cleans up the top-level so we do so // here. if (layer->isAtRoot()) { layer->setIsAtRoot(false); mCurrentState.layersSortedByZ.remove(layer); } markLayerPendingRemovalLocked(layer); mBufferCountTracker.remove(handle); layer.clear(); Loading Loading
services/surfaceflinger/SurfaceFlinger.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -3475,6 +3475,15 @@ void SurfaceFlinger::doCommitTransactions() { l->latchAndReleaseBuffer(); } // If a layer has a parent, we allow it to out-live it's handle // with the idea that the parent holds a reference and will eventually // be cleaned up. However no one cleans up the top-level so we do so // here. if (l->isAtRoot()) { l->setIsAtRoot(false); mCurrentState.layersSortedByZ.remove(l); } // If the layer has been removed and has no parent, then it will not be reachable // when traversing layers on screen. Add the layer to the offscreenLayers set to // ensure we can copy its current to drawing state. Loading Loading @@ -4765,14 +4774,6 @@ void SurfaceFlinger::markLayerPendingRemovalLocked(const sp<Layer>& layer) { void SurfaceFlinger::onHandleDestroyed(BBinder* handle, sp<Layer>& layer) { Mutex::Autolock lock(mStateLock); // If a layer has a parent, we allow it to out-live it's handle // with the idea that the parent holds a reference and will eventually // be cleaned up. However no one cleans up the top-level so we do so // here. if (layer->isAtRoot()) { layer->setIsAtRoot(false); mCurrentState.layersSortedByZ.remove(layer); } markLayerPendingRemovalLocked(layer); mBufferCountTracker.remove(handle); layer.clear(); Loading