diff options
| author | 2009-09-10 19:41:18 -0700 | |
|---|---|---|
| committer | 2009-09-10 19:41:18 -0700 | |
| commit | 48d819a1315f7d1b5abfec9d4fd34fb5aed27b1d (patch) | |
| tree | 610ef98303e468061f68511380991e4b65bd547a /libs/surfaceflinger/LayerBase.cpp | |
| parent | b58b5d72d6877300fe39b2a30b4742c6f962833f (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 62e41b0f17..1f224884ff 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 |