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 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 | 1176 |
1177 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { | 1177 void ThreadProxy::InitializeImplOnImplThread(CompletionEvent* completion) { |
1178 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); | 1178 TRACE_EVENT0("cc", "ThreadProxy::InitializeImplOnImplThread"); |
1179 DCHECK(IsImplThread()); | 1179 DCHECK(IsImplThread()); |
1180 impl().layer_tree_host_impl = | 1180 impl().layer_tree_host_impl = |
1181 layer_tree_host()->CreateLayerTreeHostImpl(this); | 1181 layer_tree_host()->CreateLayerTreeHostImpl(this); |
1182 SchedulerSettings scheduler_settings(layer_tree_host()->settings()); | 1182 SchedulerSettings scheduler_settings(layer_tree_host()->settings()); |
1183 impl().scheduler = Scheduler::Create(this, | 1183 impl().scheduler = Scheduler::Create(this, |
1184 scheduler_settings, | 1184 scheduler_settings, |
1185 impl().layer_tree_host_id, | 1185 impl().layer_tree_host_id, |
1186 ImplThreadTaskRunner()); | 1186 ImplThreadTaskRunner(), |
| 1187 base::PowerMonitor::Get()); |
1187 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); | 1188 impl().scheduler->SetVisible(impl().layer_tree_host_impl->visible()); |
1188 | 1189 |
1189 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); | 1190 impl_thread_weak_ptr_ = impl().weak_factory.GetWeakPtr(); |
1190 completion->Signal(); | 1191 completion->Signal(); |
1191 } | 1192 } |
1192 | 1193 |
1193 void ThreadProxy::DeleteContentsTexturesOnImplThread( | 1194 void ThreadProxy::DeleteContentsTexturesOnImplThread( |
1194 CompletionEvent* completion) { | 1195 CompletionEvent* completion) { |
1195 TRACE_EVENT0("cc", "ThreadProxy::DeleteContentsTexturesOnImplThread"); | 1196 TRACE_EVENT0("cc", "ThreadProxy::DeleteContentsTexturesOnImplThread"); |
1196 DCHECK(IsImplThread()); | 1197 DCHECK(IsImplThread()); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 | 1395 |
1395 impl().timing_history.DidActivateSyncTree(); | 1396 impl().timing_history.DidActivateSyncTree(); |
1396 } | 1397 } |
1397 | 1398 |
1398 void ThreadProxy::DidManageTiles() { | 1399 void ThreadProxy::DidManageTiles() { |
1399 DCHECK(IsImplThread()); | 1400 DCHECK(IsImplThread()); |
1400 impl().scheduler->DidManageTiles(); | 1401 impl().scheduler->DidManageTiles(); |
1401 } | 1402 } |
1402 | 1403 |
1403 } // namespace cc | 1404 } // namespace cc |
OLD | NEW |