OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #include <algorithm> | 10 #include <algorithm> |
11 | 11 |
12 #include "webrtc/base/checks.h" | 12 #include "webrtc/base/checks.h" |
13 #include "webrtc/base/common.h" | 13 #include "webrtc/base/common.h" |
14 #include "webrtc/base/logging.h" | 14 #include "webrtc/base/logging.h" |
15 #include "webrtc/base/messagequeue.h" | 15 #include "webrtc/base/messagequeue.h" |
| 16 #include "webrtc/base/trace_event.h" |
16 | 17 |
17 namespace rtc { | 18 namespace rtc { |
18 | 19 |
19 const uint32_t kMaxMsgLatency = 150; // 150 ms | 20 const uint32_t kMaxMsgLatency = 150; // 150 ms |
20 | 21 |
21 //------------------------------------------------------------------ | 22 //------------------------------------------------------------------ |
22 // MessageQueueManager | 23 // MessageQueueManager |
23 | 24 |
24 MessageQueueManager* MessageQueueManager::instance_ = NULL; | 25 MessageQueueManager* MessageQueueManager::instance_ = NULL; |
25 | 26 |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 435 } |
435 } else { | 436 } else { |
436 *new_end++ = *it; | 437 *new_end++ = *it; |
437 } | 438 } |
438 } | 439 } |
439 dmsgq_.container().erase(new_end, dmsgq_.container().end()); | 440 dmsgq_.container().erase(new_end, dmsgq_.container().end()); |
440 dmsgq_.reheap(); | 441 dmsgq_.reheap(); |
441 } | 442 } |
442 | 443 |
443 void MessageQueue::Dispatch(Message *pmsg) { | 444 void MessageQueue::Dispatch(Message *pmsg) { |
| 445 TRACE_EVENT0("webrtc", "MessageQueue::Dispatch"); |
444 pmsg->phandler->OnMessage(pmsg); | 446 pmsg->phandler->OnMessage(pmsg); |
445 } | 447 } |
446 | 448 |
447 } // namespace rtc | 449 } // namespace rtc |
OLD | NEW |