diff options
author | 2018-12-11 12:07:25 -0800 | |
---|---|---|
committer | 2019-01-08 11:41:57 -0800 | |
commit | 6fb1a7e9627df030667304d88a3292f91e790ea9 (patch) | |
tree | 8b726ff0728f7813106cb6c02e5700da7b986065 /services/surfaceflinger/Client.cpp | |
parent | abbbbd69c48056490c484a29af4aace65e5e7cf1 (diff) |
SurfaceFlinger: Remove removeLayer
We remove explicit layer destruction and replace it
with reparent->null, completing the transition to
a reference counted model.
Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I8ac7c5c5125e1c8daf84b42db00e1dd93a544bb5
Diffstat (limited to 'services/surfaceflinger/Client.cpp')
-rw-r--r-- | services/surfaceflinger/Client.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/services/surfaceflinger/Client.cpp b/services/surfaceflinger/Client.cpp index ee4ec506f7..4f6fb1cca6 100644 --- a/services/surfaceflinger/Client.cpp +++ b/services/surfaceflinger/Client.cpp @@ -39,26 +39,6 @@ Client::Client(const sp<SurfaceFlinger>& flinger) { } -Client::~Client() -{ - // We need to post a message to remove our remaining layers rather than - // do so directly by acquiring the SurfaceFlinger lock. If we were to - // attempt to directly call the lock it becomes effectively impossible - // to use sp<Client> while holding the SF lock as descoping it could - // then trigger a dead-lock. - - const size_t count = mLayers.size(); - for (size_t i=0 ; i<count ; i++) { - sp<Layer> l = mLayers.valueAt(i).promote(); - if (l == nullptr) { - continue; - } - mFlinger->postMessageAsync(new LambdaMessage([flinger = mFlinger, l]() { - flinger->removeLayer(l); - })); - } -} - status_t Client::initCheck() const { return NO_ERROR; } @@ -115,10 +95,6 @@ status_t Client::createSurface( ownerUid, handle, gbp, &parent); } -status_t Client::destroySurface(const sp<IBinder>& handle) { - return mFlinger->onLayerRemoved(this, handle); -} - status_t Client::clearLayerFrameStats(const sp<IBinder>& handle) const { sp<Layer> layer = getLayerUser(handle); if (layer == nullptr) { |