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