Revert "SurfaceFlinger: Allows Surfaces to outlive their parents."
This reverts commit 4340607f5f5c277eb031fdd1424fc8a1a69924e2.
Reason for revert: Causes bug 117401269
Change-Id: I10973c9dd734499e09c18f48c06f1b1a6a1f8da0
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 1bf1c5a..b77bf48 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -559,6 +559,11 @@
// ISurfaceComposerClient::destroySurface()
status_t onLayerRemoved(const sp<Client>& client, const sp<IBinder>& handle);
+ // called when all clients have released all their references to
+ // this layer meaning it is entirely safe to destroy all
+ // resources associated to this layer.
+ status_t onLayerDestroyed(const wp<Layer>& layer);
+
// remove a layer from SurfaceFlinger immediately
status_t removeLayer(const sp<Layer>& layer, bool topLevelOnly = false);
status_t removeLayerLocked(const Mutex&, const sp<Layer>& layer, bool topLevelOnly = false);