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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread"); | 1247 TRACE_EVENT0("cc", "ThreadProxy::LayerTreeHostClosedOnImplThread"); |
1248 DCHECK(IsImplThread()); | 1248 DCHECK(IsImplThread()); |
1249 DCHECK(IsMainThreadBlocked()); | 1249 DCHECK(IsMainThreadBlocked()); |
1250 layer_tree_host()->DeleteContentsTexturesOnImplThread( | 1250 layer_tree_host()->DeleteContentsTexturesOnImplThread( |
1251 impl().layer_tree_host_impl->resource_provider()); | 1251 impl().layer_tree_host_impl->resource_provider()); |
1252 impl().current_resource_update_controller.reset(); | 1252 impl().current_resource_update_controller.reset(); |
1253 impl().layer_tree_host_impl->SetNeedsBeginFrame(false); | 1253 impl().layer_tree_host_impl->SetNeedsBeginFrame(false); |
1254 impl().scheduler.reset(); | 1254 impl().scheduler.reset(); |
1255 impl().layer_tree_host_impl.reset(); | 1255 impl().layer_tree_host_impl.reset(); |
1256 impl().weak_factory.InvalidateWeakPtrs(); | 1256 impl().weak_factory.InvalidateWeakPtrs(); |
| 1257 // We need to explicitly cancel the notifier, since it isn't using weak ptrs. |
| 1258 // TODO(vmpstr): We should see if we can make it use weak ptrs and still keep |
| 1259 // the convention of having a weak ptr factory initialized last. Alternatively |
| 1260 // we should moved the notifier (and RenewTreePriority) to LTHI. See |
| 1261 // crbug.com/411972 |
| 1262 impl().smoothness_priority_expiration_notifier.Cancel(); |
1257 impl().contents_texture_manager = NULL; | 1263 impl().contents_texture_manager = NULL; |
1258 completion->Signal(); | 1264 completion->Signal(); |
1259 } | 1265 } |
1260 | 1266 |
1261 size_t ThreadProxy::MaxPartialTextureUpdates() const { | 1267 size_t ThreadProxy::MaxPartialTextureUpdates() const { |
1262 return ResourceUpdateController::MaxPartialTextureUpdates(); | 1268 return ResourceUpdateController::MaxPartialTextureUpdates(); |
1263 } | 1269 } |
1264 | 1270 |
1265 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() | 1271 ThreadProxy::BeginMainFrameAndCommitState::BeginMainFrameAndCommitState() |
1266 : memory_allocation_limit_bytes(0), | 1272 : memory_allocation_limit_bytes(0), |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 | 1396 |
1391 impl().timing_history.DidActivateSyncTree(); | 1397 impl().timing_history.DidActivateSyncTree(); |
1392 } | 1398 } |
1393 | 1399 |
1394 void ThreadProxy::DidManageTiles() { | 1400 void ThreadProxy::DidManageTiles() { |
1395 DCHECK(IsImplThread()); | 1401 DCHECK(IsImplThread()); |
1396 impl().scheduler->DidManageTiles(); | 1402 impl().scheduler->DidManageTiles(); |
1397 } | 1403 } |
1398 | 1404 |
1399 } // namespace cc | 1405 } // namespace cc |
OLD | NEW |