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