diff options
author | 2009-09-10 19:41:18 -0700 | |
---|---|---|
committer | 2009-09-10 19:41:18 -0700 | |
commit | 248b5bd51e325107f8119b564db6a06ac51c232a (patch) | |
tree | 9a059822a1817d5ffb68d471f6e83ec20f583a89 /libs/ui/SharedBufferStack.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/ui/SharedBufferStack.cpp')
-rw-r--r-- | libs/ui/SharedBufferStack.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ui/SharedBufferStack.cpp b/libs/ui/SharedBufferStack.cpp index 73fb582f9c3e..3fbd8c7ae34e 100644 --- a/libs/ui/SharedBufferStack.cpp +++ b/libs/ui/SharedBufferStack.cpp @@ -53,21 +53,20 @@ uint32_t SharedClient::getIdentity(size_t token) const { return uint32_t(surfaces[token].identity); } -status_t SharedClient::setIdentity(size_t token, uint32_t identity) { - if (token >= NUM_LAYERS_MAX) - return BAD_INDEX; - surfaces[token].identity = identity; - return NO_ERROR; -} - // ---------------------------------------------------------------------------- SharedBufferStack::SharedBufferStack() - : inUse(-1), status(NO_ERROR), identity(-1) { } +void SharedBufferStack::init(int32_t i) +{ + inUse = -1; + status = NO_ERROR; + identity = i; +} + status_t SharedBufferStack::setDirtyRegion(int buffer, const Region& dirty) { if (uint32_t(buffer) >= NUM_BUFFER_MAX) @@ -312,9 +311,10 @@ status_t SharedBufferClient::setDirtyRegion(int buffer, const Region& reg) // ---------------------------------------------------------------------------- SharedBufferServer::SharedBufferServer(SharedClient* sharedClient, - int surface, int num) + int surface, int num, int32_t identity) : SharedBufferBase(sharedClient, surface, num) { + mSharedStack->init(identity); mSharedStack->head = num-1; mSharedStack->available = num; mSharedStack->queued = 0; |