summaryrefslogtreecommitdiff
path: root/libs/ui/SharedBufferStack.cpp
diff options
context:
space:
mode:
author Mathias Agopian <mathias@google.com> 2009-09-10 19:41:18 -0700
committer Mathias Agopian <mathias@google.com> 2009-09-10 19:41:18 -0700
commit48d819a1315f7d1b5abfec9d4fd34fb5aed27b1d (patch)
tree610ef98303e468061f68511380991e4b65bd547a /libs/ui/SharedBufferStack.cpp
parentb58b5d72d6877300fe39b2a30b4742c6f962833f (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.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ui/SharedBufferStack.cpp b/libs/ui/SharedBufferStack.cpp
index 73fb582f9c..3fbd8c7ae3 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;