OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | |
6 | |
7 #include "cc/scoped_thread_proxy.h" | 5 #include "cc/scoped_thread_proxy.h" |
8 | 6 |
9 #include "base/bind.h" | 7 #include "base/bind.h" |
10 | 8 |
11 namespace cc { | 9 namespace cc { |
12 | 10 |
13 ScopedThreadProxy::ScopedThreadProxy(cc::Thread* targetThread) | 11 ScopedThreadProxy::ScopedThreadProxy(cc::Thread* targetThread) |
14 : m_targetThread(targetThread) | 12 : m_targetThread(targetThread) |
15 , m_shutdown(false) | 13 , m_shutdown(false) |
16 { | 14 { |
(...skipping 20 matching lines...) Expand all Loading... |
37 // If our shutdown flag is set, it's possible that m_targetThread has alread
y been destroyed so don't | 35 // If our shutdown flag is set, it's possible that m_targetThread has alread
y been destroyed so don't |
38 // touch it. | 36 // touch it. |
39 if (m_shutdown) { | 37 if (m_shutdown) { |
40 return; | 38 return; |
41 } | 39 } |
42 DCHECK(m_targetThread->belongsToCurrentThread()); | 40 DCHECK(m_targetThread->belongsToCurrentThread()); |
43 cb.Run(); | 41 cb.Run(); |
44 } | 42 } |
45 | 43 |
46 } // namespace cc | 44 } // namespace cc |
OLD | NEW |