summaryrefslogtreecommitdiff
path: root/libs/surfaceflinger/MessageQueue.cpp
diff options
context:
space:
mode:
author Kenny Root <kroot@google.com> 2010-06-01 19:56:42 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2010-06-01 19:56:42 -0700
commit847b82d8a6d3cc6969cbeeaf9ca7e879abab482a (patch)
tree75dc7b61d605847df777139daceefd72866c46b0 /libs/surfaceflinger/MessageQueue.cpp
parent8799cdfb012935501e47f15f28d6a8ed90bd464d (diff)
parent89bc1395748a0a139db82adbf01166ed6fa79766 (diff)
am 89bc1395: Merge "Add more error checking for ndc" into froyo
Merge commit '89bc1395748a0a139db82adbf01166ed6fa79766' into froyo-plus-aosp * commit '89bc1395748a0a139db82adbf01166ed6fa79766': (392 commits) Add more error checking for ndc Add javadoc for camera scene modes. more clean-up in preparation of bigger changes Fix a typo in Singleton<> Avoid copying for input recording frames in CameraSource Add video frame parameter. more clean-up of Surfaceflinger's client management Better sniffing of MPEG4 content by checking for a compatible sub-brand. Remove the logic in CameraSource using CameraParameters class to find out the buffer size. Add support for gps altitude EXIF tags. minor clean-up GLclampx -> GLclampf clean-up dead-code Make sure to use filtering while in fixed-size mode oopsie. forgot to displatch SET_BUFFERS_GEOMETRY Avoid repeatedly allocating and freeing memory in CameraSource After failing to create an AudioTrack, only stop the source if we were the ones starting it. Convert a number of assertions into runtime errors (OggExtractor) fix [2712278] The preview buffer left some black borders in left and bottom edges Fix 2667859: change text back to default size Support for thumbnail extraction in the Matroska extractor. ...
Diffstat (limited to 'libs/surfaceflinger/MessageQueue.cpp')
-rw-r--r--libs/surfaceflinger/MessageQueue.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/libs/surfaceflinger/MessageQueue.cpp b/libs/surfaceflinger/MessageQueue.cpp
index b43d80173a3f..d668e88d471f 100644
--- a/libs/surfaceflinger/MessageQueue.cpp
+++ b/libs/surfaceflinger/MessageQueue.cpp
@@ -60,9 +60,9 @@ MessageQueue::~MessageQueue()
{
}
-MessageList::value_type MessageQueue::waitMessage(nsecs_t timeout)
+sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
{
- MessageList::value_type result;
+ sp<MessageBase> result;
bool again;
do {
@@ -132,6 +132,7 @@ MessageList::value_type MessageQueue::waitMessage(nsecs_t timeout)
if (again) {
// the message has been processed. release our reference to it
// without holding the lock.
+ result->notify();
result = 0;
}
@@ -141,7 +142,7 @@ MessageList::value_type MessageQueue::waitMessage(nsecs_t timeout)
}
status_t MessageQueue::postMessage(
- const MessageList::value_type& message, nsecs_t relTime, uint32_t flags)
+ const sp<MessageBase>& message, nsecs_t relTime, uint32_t flags)
{
return queueMessage(message, relTime, flags);
}
@@ -154,7 +155,7 @@ status_t MessageQueue::invalidate() {
}
status_t MessageQueue::queueMessage(
- const MessageList::value_type& message, nsecs_t relTime, uint32_t flags)
+ const sp<MessageBase>& message, nsecs_t relTime, uint32_t flags)
{
Mutex::Autolock _l(mLock);
message->when = systemTime() + relTime;
@@ -167,13 +168,13 @@ status_t MessageQueue::queueMessage(
return NO_ERROR;
}
-void MessageQueue::dump(const MessageList::value_type& message)
+void MessageQueue::dump(const sp<MessageBase>& message)
{
Mutex::Autolock _l(mLock);
dumpLocked(message);
}
-void MessageQueue::dumpLocked(const MessageList::value_type& message)
+void MessageQueue::dumpLocked(const sp<MessageBase>& message)
{
LIST::const_iterator cur(mMessages.begin());
LIST::const_iterator end(mMessages.end());