| 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 "cc/trees/thread_proxy.h" | 5 #include "cc/trees/thread_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 impl_thread_weak_ptr_, | 146 impl_thread_weak_ptr_, |
| 147 &completion)); | 147 &completion)); |
| 148 completion.Wait(); | 148 completion.Wait(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 bool ThreadProxy::IsStarted() const { | 151 bool ThreadProxy::IsStarted() const { |
| 152 DCHECK(Proxy::IsMainThread()); | 152 DCHECK(Proxy::IsMainThread()); |
| 153 return main().started; | 153 return main().started; |
| 154 } | 154 } |
| 155 | 155 |
| 156 bool ThreadProxy::CommitToActiveTree() const { |
| 157 // With ThreadProxy we use a pending tree and activate it once it's ready to |
| 158 // draw. |
| 159 return false; |
| 160 } |
| 161 |
| 156 void ThreadProxy::SetLayerTreeHostClientReady() { | 162 void ThreadProxy::SetLayerTreeHostClientReady() { |
| 157 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReady"); | 163 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReady"); |
| 158 Proxy::ImplThreadTaskRunner()->PostTask( | 164 Proxy::ImplThreadTaskRunner()->PostTask( |
| 159 FROM_HERE, | 165 FROM_HERE, |
| 160 base::Bind(&ThreadProxy::SetLayerTreeHostClientReadyOnImplThread, | 166 base::Bind(&ThreadProxy::SetLayerTreeHostClientReadyOnImplThread, |
| 161 impl_thread_weak_ptr_)); | 167 impl_thread_weak_ptr_)); |
| 162 } | 168 } |
| 163 | 169 |
| 164 void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() { | 170 void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() { |
| 165 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread"); | 171 TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread"); |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 } | 1374 } |
| 1369 | 1375 |
| 1370 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1376 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
| 1371 DCHECK(IsImplThread()); | 1377 DCHECK(IsImplThread()); |
| 1372 Proxy::MainThreadTaskRunner()->PostTask( | 1378 Proxy::MainThreadTaskRunner()->PostTask( |
| 1373 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1379 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
| 1374 main_thread_weak_ptr_)); | 1380 main_thread_weak_ptr_)); |
| 1375 } | 1381 } |
| 1376 | 1382 |
| 1377 } // namespace cc | 1383 } // namespace cc |
| OLD | NEW |