summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-11 14:15:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-10-11 14:15:04 -0700
commitd0528b74b6de87c415ea498095e142d52c68875b (patch)
tree51cfc7f365bc5d542de0f7dcb8ba77e8e8186b52
parent446547af37fd10142f15f6a9b3ac3007c6473981 (diff)
parent7b50a6dfacf12acd6825e528f00cb662ec93dac1 (diff)
downloadframeworks_base-d0528b74b6de87c415ea498095e142d52c68875b.zip
frameworks_base-d0528b74b6de87c415ea498095e142d52c68875b.tar.gz
frameworks_base-d0528b74b6de87c415ea498095e142d52c68875b.tar.bz2
Merge "deliver invalidate messages AFTER other messages" into gingerbread
-rw-r--r--services/surfaceflinger/MessageQueue.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
index 4fb1e61..aebe1b8 100644
--- a/services/surfaceflinger/MessageQueue.cpp
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -72,14 +72,6 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
nsecs_t now = systemTime();
nsecs_t nextEventTime = -1;
- // invalidate messages are always handled first
- if (mInvalidate) {
- mInvalidate = false;
- mInvalidateMessage->when = now;
- result = mInvalidateMessage;
- break;
- }
-
LIST::iterator cur(mMessages.begin());
if (cur != mMessages.end()) {
result = *cur;
@@ -95,6 +87,14 @@ sp<MessageBase> MessageQueue::waitMessage(nsecs_t timeout)
result = 0;
}
+ // see if we have an invalidate message
+ if (mInvalidate) {
+ mInvalidate = false;
+ mInvalidateMessage->when = now;
+ result = mInvalidateMessage;
+ break;
+ }
+
if (timeout >= 0) {
if (timeoutTime < now) {
// we timed-out, return a NULL message