diff options
author | Mathias Agopian <mathias@google.com> | 2010-07-28 16:30:56 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-07-28 16:30:56 -0700 |
commit | 9f2a91bc2b01c2cc60f73a0bae673225fdddec09 (patch) | |
tree | 4896baaf07143ebe2be37685c49714b223e3f100 /libs | |
parent | bae6fe242ff9a97840ff0c5d9d87c0575d261682 (diff) | |
parent | 51c70e3e41ee8bedc1d951a06a74202dafa13009 (diff) | |
download | frameworks_base-9f2a91bc2b01c2cc60f73a0bae673225fdddec09.zip frameworks_base-9f2a91bc2b01c2cc60f73a0bae673225fdddec09.tar.gz frameworks_base-9f2a91bc2b01c2cc60f73a0bae673225fdddec09.tar.bz2 |
Merge "fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once." into gingerbread
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger_client/SharedBufferStack.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/libs/surfaceflinger_client/SharedBufferStack.cpp b/libs/surfaceflinger_client/SharedBufferStack.cpp index d67a589..156a7db 100644 --- a/libs/surfaceflinger_client/SharedBufferStack.cpp +++ b/libs/surfaceflinger_client/SharedBufferStack.cpp @@ -243,21 +243,6 @@ bool SharedBufferClient::LockCondition::operator()() const { (stack.queued > 0 && stack.inUse != buf)); } -SharedBufferServer::ReallocateCondition::ReallocateCondition( - SharedBufferBase* sbb, int buf) : ConditionBase(sbb), buf(buf) { -} -bool SharedBufferServer::ReallocateCondition::operator()() const { - int32_t head = stack.head; - if (uint32_t(head) >= SharedBufferStack::NUM_BUFFER_MAX) { - // if stack.head is messed up, we cannot allow the server to - // crash (since stack.head is mapped on the client side) - stack.status = BAD_VALUE; - return false; - } - // TODO: we should also check that buf has been dequeued - return (buf != stack.index[head]); -} - // ---------------------------------------------------------------------------- SharedBufferClient::QueueUpdate::QueueUpdate(SharedBufferBase* sbb) @@ -558,21 +543,6 @@ int32_t SharedBufferServer::getQueuedCount() const return stack.queued; } -status_t SharedBufferServer::assertReallocate(int buf) -{ - /* - * NOTE: it's safe to hold mLock for read while waiting for - * the ReallocateCondition because that condition is not updated - * by the thread that holds mLock for write. - */ - RWLock::AutoRLock _l(mLock); - - // TODO: need to validate "buf" - ReallocateCondition condition(this, buf); - status_t err = waitForCondition(condition); - return err; -} - Region SharedBufferServer::getDirtyRegion(int buf) const { SharedBufferStack& stack( *mSharedStack ); |