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 1147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 TRACE_EVENT0("cc", "ThreadProxy::SetAnimationEvents"); | 1158 TRACE_EVENT0("cc", "ThreadProxy::SetAnimationEvents"); |
1159 DCHECK(IsMainThread()); | 1159 DCHECK(IsMainThread()); |
1160 layer_tree_host()->SetAnimationEvents(events.Pass()); | 1160 layer_tree_host()->SetAnimationEvents(events.Pass()); |
1161 } | 1161 } |
1162 | 1162 |
1163 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 1163 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
1164 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1164 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
1165 DCHECK(IsImplThread()); | 1165 DCHECK(IsImplThread()); |
1166 impl().layer_tree_host_impl = | 1166 impl().layer_tree_host_impl = |
1167 layer_tree_host()->CreateLayerTreeHostImpl(this); | 1167 layer_tree_host()->CreateLayerTreeHostImpl(this); |
1168 SchedulerSettings scheduler_settings(layer_tree_host()->settings()); | 1168 SchedulerSettings scheduler_settings( |
| 1169 layer_tree_host()->settings().ToSchedulerSettings()); |
1169 impl().scheduler = Scheduler::Create( | 1170 impl().scheduler = Scheduler::Create( |
1170 this, | 1171 this, |
1171 scheduler_settings, | 1172 scheduler_settings, |
1172 impl().layer_tree_host_id, | 1173 impl().layer_tree_host_id, |
1173 ImplThreadTaskRunner(), | 1174 ImplThreadTaskRunner(), |
1174 impl().external_begin_frame_source.Pass()); | 1175 impl().external_begin_frame_source.Pass()); |
1175 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); | 1176 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); |
1176 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); | 1177 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); |
1177 completion->Signal(); | 1178 completion->Signal(); |
1178 } | 1179 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 } | 1364 } |
1364 | 1365 |
1365 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { | 1366 void ThreadProxy::DidCompletePageScaleAnimationOnImplThread() { |
1366 DCHECK(IsImplThread()); | 1367 DCHECK(IsImplThread()); |
1367 Proxy::MainThreadTaskRunner()->PostTask( | 1368 Proxy::MainThreadTaskRunner()->PostTask( |
1368 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, | 1369 FROM_HERE, base::Bind(&ThreadProxy::DidCompletePageScaleAnimation, |
1369 main_thread_weak_ptr_)); | 1370 main_thread_weak_ptr_)); |
1370 } | 1371 } |
1371 | 1372 |
1372 } // namespace cc | 1373 } // namespace cc |
OLD | NEW |