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/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 "Checking for completed uploads within a draw may trigger " | 1343 "Checking for completed uploads within a draw may trigger " |
1344 "spurious redraws."; | 1344 "spurious redraws."; |
1345 if (tile_manager_) | 1345 if (tile_manager_) |
1346 tile_manager_->CheckForCompletedTileUploads(); | 1346 tile_manager_->CheckForCompletedTileUploads(); |
1347 } | 1347 } |
1348 | 1348 |
1349 void LayerTreeHostImpl::ActivatePendingTreeIfNeeded() { | 1349 void LayerTreeHostImpl::ActivatePendingTreeIfNeeded() { |
1350 DCHECK(pending_tree_); | 1350 DCHECK(pending_tree_); |
1351 CHECK(settings_.impl_side_painting); | 1351 CHECK(settings_.impl_side_painting); |
1352 | 1352 |
1353 // This call may activate the tree. | |
1354 CheckForCompletedTileUploads(); | |
1355 if (!pending_tree_) | 1353 if (!pending_tree_) |
1356 return; | 1354 return; |
1357 | 1355 |
1358 // The tile manager is usually responsible for notifying activation. | 1356 // The tile manager is usually responsible for notifying activation. |
1359 // If there is no tile manager, then we need to manually activate. | 1357 // If there is no tile manager, then we need to manually activate. |
1360 if (!tile_manager_ || tile_manager_->AreTilesRequiredForActivationReady()) { | 1358 if (!tile_manager_ || tile_manager_->AreTilesRequiredForActivationReady()) { |
1361 ActivatePendingTree(); | 1359 ActivatePendingTree(); |
1362 return; | 1360 return; |
1363 } | 1361 } |
1364 | 1362 |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2339 } | 2337 } |
2340 | 2338 |
2341 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { | 2339 void LayerTreeHostImpl::SetDebugState(const LayerTreeDebugState& debug_state) { |
2342 if (debug_state_.continuous_painting != debug_state.continuous_painting) | 2340 if (debug_state_.continuous_painting != debug_state.continuous_painting) |
2343 paint_time_counter_->ClearHistory(); | 2341 paint_time_counter_->ClearHistory(); |
2344 | 2342 |
2345 debug_state_ = debug_state; | 2343 debug_state_ = debug_state; |
2346 } | 2344 } |
2347 | 2345 |
2348 } // namespace cc | 2346 } // namespace cc |
OLD | NEW |