diff options
| author | 2009-09-10 19:41:18 -0700 | |
|---|---|---|
| committer | 2009-09-10 19:41:18 -0700 | |
| commit | 248b5bd51e325107f8119b564db6a06ac51c232a (patch) | |
| tree | 9a059822a1817d5ffb68d471f6e83ec20f583a89 /libs/surfaceflinger/LayerBase.cpp | |
| parent | 436c627ca4228284caf363f0cb35947e58b841b9 (diff) | |
fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore
this also fixes part of [2111536] Device is soft rebooted after ending the call through voice dialer
Diffstat (limited to 'libs/surfaceflinger/LayerBase.cpp')
| -rw-r--r-- | libs/surfaceflinger/LayerBase.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/surfaceflinger/LayerBase.cpp b/libs/surfaceflinger/LayerBase.cpp index 62e41b0f17d8..1f224884ff05 100644 --- a/libs/surfaceflinger/LayerBase.cpp +++ b/libs/surfaceflinger/LayerBase.cpp @@ -642,9 +642,12 @@ int32_t LayerBaseClient::sIdentity = 0; LayerBaseClient::LayerBaseClient(SurfaceFlinger* flinger, DisplayID display, const sp<Client>& client, int32_t i) - : LayerBase(flinger, display), client(client), + : LayerBase(flinger, display), lcblk(NULL), client(client), mIndex(i), mIdentity(uint32_t(android_atomic_inc(&sIdentity))) { + lcblk = new SharedBufferServer( + client->ctrlblk, i, NUM_BUFFERS, + mIdentity); } void LayerBaseClient::onFirstRef() @@ -652,8 +655,6 @@ void LayerBaseClient::onFirstRef() sp<Client> client(this->client.promote()); if (client != 0) { client->bindLayer(this, mIndex); - // Initialize this layer's identity - client->ctrlblk->setIdentity(mIndex, mIdentity); } } @@ -663,6 +664,7 @@ LayerBaseClient::~LayerBaseClient() if (client != 0) { client->free(mIndex); } + delete lcblk; } int32_t LayerBaseClient::serverIndex() const |