| Index: cc/trees/layer_tree_host_impl.cc
|
| diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
| index 672ffe80b30be64a8033a4d6b7d24b884582ac14..0136288019b5125ddf7c9c46e0daf1cb41194354 100644
|
| --- a/cc/trees/layer_tree_host_impl.cc
|
| +++ b/cc/trees/layer_tree_host_impl.cc
|
| @@ -1202,58 +1202,8 @@ void LayerTreeHostImpl::DidModifyTilePriorities() {
|
| client_->SetNeedsPrepareTilesOnImplThread();
|
| }
|
|
|
| -void LayerTreeHostImpl::GetPictureLayerImplPairs(
|
| - std::vector<PictureLayerImpl::Pair>* layer_pairs,
|
| - bool need_valid_tile_priorities) const {
|
| - DCHECK(layer_pairs->empty());
|
| - for (std::vector<PictureLayerImpl*>::const_iterator it =
|
| - picture_layers_.begin();
|
| - it != picture_layers_.end();
|
| - ++it) {
|
| - PictureLayerImpl* layer = *it;
|
| -
|
| - if (!layer->IsOnActiveOrPendingTree() ||
|
| - (need_valid_tile_priorities && !layer->HasValidTilePriorities()))
|
| - continue;
|
| -
|
| - PictureLayerImpl* twin_layer = layer->GetPendingOrActiveTwinLayer();
|
| -
|
| - // Ignore the twin layer when tile priorities are invalid.
|
| - if (need_valid_tile_priorities && twin_layer &&
|
| - !twin_layer->HasValidTilePriorities())
|
| - twin_layer = NULL;
|
| -
|
| - // If the current tree is ACTIVE_TREE, then always generate a layer_pair.
|
| - // If current tree is PENDING_TREE, then only generate a layer_pair if
|
| - // there is no twin layer.
|
| - if (layer->GetTree() == ACTIVE_TREE) {
|
| - DCHECK_IMPLIES(twin_layer, twin_layer->GetTree() == PENDING_TREE);
|
| - layer_pairs->push_back(PictureLayerImpl::Pair(layer, twin_layer));
|
| - } else if (!twin_layer) {
|
| - DCHECK(layer->GetTree() == PENDING_TREE);
|
| - layer_pairs->push_back(PictureLayerImpl::Pair(NULL, layer));
|
| - }
|
| - }
|
| -}
|
| -
|
| -scoped_ptr<RasterTilePriorityQueue> LayerTreeHostImpl::BuildRasterQueue(
|
| - TreePriority tree_priority,
|
| - RasterTilePriorityQueue::Type type) {
|
| - TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildRasterQueue");
|
| - picture_layer_pairs_.clear();
|
| - GetPictureLayerImplPairs(&picture_layer_pairs_, true);
|
| - return RasterTilePriorityQueue::Create(picture_layer_pairs_, tree_priority,
|
| - type);
|
| -}
|
| -
|
| -scoped_ptr<EvictionTilePriorityQueue> LayerTreeHostImpl::BuildEvictionQueue(
|
| - TreePriority tree_priority) {
|
| - TRACE_EVENT0("cc", "LayerTreeHostImpl::BuildEvictionQueue");
|
| - scoped_ptr<EvictionTilePriorityQueue> queue(new EvictionTilePriorityQueue);
|
| - picture_layer_pairs_.clear();
|
| - GetPictureLayerImplPairs(&picture_layer_pairs_, false);
|
| - queue->Build(picture_layer_pairs_, tree_priority);
|
| - return queue;
|
| +bool LayerTreeHostImpl::PendingTreeExists() {
|
| + return !!pending_tree();
|
| }
|
|
|
| void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
| @@ -1265,11 +1215,6 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
| is_likely_to_require_a_draw_ = is_likely_to_require_a_draw;
|
| }
|
|
|
| -const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers()
|
| - const {
|
| - return picture_layers_;
|
| -}
|
| -
|
| void LayerTreeHostImpl::NotifyReadyToActivate() {
|
| client_->NotifyReadyToActivate();
|
| }
|
| @@ -1829,9 +1774,10 @@ void LayerTreeHostImpl::ActivateSyncTree() {
|
| ActivateAnimations();
|
| if (settings_.impl_side_painting) {
|
| client_->RenewTreePriority();
|
| - // If we have any picture layers, then by activating we also modified tile
|
| - // priorities.
|
| - if (!picture_layers_.empty())
|
| + // If tile manager has tiling sets (ie, it tree priority changes would
|
| + // potentially affect some tiles), then make sure to schedule PrepareTiles
|
| + // via DidModifyTilePriorities.
|
| + if (tile_manager()->HasPictureLayerTilingSets())
|
| DidModifyTilePriorities();
|
| }
|
|
|
| @@ -3509,17 +3455,4 @@ void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfForwardingToMainThread() {
|
| (*it)->OnForwardScrollUpdateToMainThreadOnImpl();
|
| }
|
|
|
| -void LayerTreeHostImpl::RegisterPictureLayerImpl(PictureLayerImpl* layer) {
|
| - DCHECK(std::find(picture_layers_.begin(), picture_layers_.end(), layer) ==
|
| - picture_layers_.end());
|
| - picture_layers_.push_back(layer);
|
| -}
|
| -
|
| -void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
|
| - std::vector<PictureLayerImpl*>::iterator it =
|
| - std::find(picture_layers_.begin(), picture_layers_.end(), layer);
|
| - DCHECK(it != picture_layers_.end());
|
| - picture_layers_.erase(it);
|
| -}
|
| -
|
| } // namespace cc
|
|
|