Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 17351017: Re-land: cc: Add raster finished signals to RasterWorkerPool. (Closed) Base URL: http://git.chromium.org/chromium/src.git@new-graph-build
Patch Set: Use "ready to activate" signal for activation in LTHI and fix task scheduling problems in pixel buf… Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698