summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer_impl.cc
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 21:28:58 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-11 21:28:58 +0000
commit094508cbeb13900342051fbd56fc882942e593c0 (patch)
tree131373d5c29bb31b28d64e34b95241a0c655a875 /cc/layers/picture_layer_impl.cc
parentad63b5c19a0cc18eab88fa90ab7a244cdf5a8b99 (diff)
downloadchromium_src-094508cbeb13900342051fbd56fc882942e593c0.zip
chromium_src-094508cbeb13900342051fbd56fc882942e593c0.tar.gz
chromium_src-094508cbeb13900342051fbd56fc882942e593c0.tar.bz2
cc: TileManager eviction tile iterator.
This patch adds tile manager eviction tile iterator. BUG= Review URL: https://codereview.chromium.org/225183021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263358 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/picture_layer_impl.cc')
-rw-r--r--cc/layers/picture_layer_impl.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 7dac994..4f2491f 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1393,7 +1393,8 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator()
layer_(NULL) {}
PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
- PictureLayerImpl* layer)
+ PictureLayerImpl* layer,
+ TreePriority tree_priority)
: iterator_index_(0),
iteration_stage_(TilePriority::EVENTUALLY),
required_for_activation_(false),
@@ -1401,9 +1402,6 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
if (!layer_->tilings_ || !layer_->tilings_->num_tilings())
return;
- WhichTree tree =
- layer_->layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
-
size_t high_res_tiling_index = layer_->tilings_->num_tilings();
size_t low_res_tiling_index = layer_->tilings_->num_tilings();
for (size_t i = 0; i < layer_->tilings_->num_tilings(); ++i) {
@@ -1419,7 +1417,7 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
// Higher resolution non-ideal goes first.
for (size_t i = 0; i < high_res_tiling_index; ++i) {
iterators_.push_back(PictureLayerTiling::TilingEvictionTileIterator(
- layer_->tilings_->tiling_at(i), tree));
+ layer_->tilings_->tiling_at(i), tree_priority));
}
// Lower resolution non-ideal goes next.
@@ -1431,19 +1429,19 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
continue;
iterators_.push_back(
- PictureLayerTiling::TilingEvictionTileIterator(tiling, tree));
+ PictureLayerTiling::TilingEvictionTileIterator(tiling, tree_priority));
}
// Now, put the low res tiling if we have one.
if (low_res_tiling_index < layer_->tilings_->num_tilings()) {
iterators_.push_back(PictureLayerTiling::TilingEvictionTileIterator(
- layer_->tilings_->tiling_at(low_res_tiling_index), tree));
+ layer_->tilings_->tiling_at(low_res_tiling_index), tree_priority));
}
// Finally, put the high res tiling if we have one.
if (high_res_tiling_index < layer_->tilings_->num_tilings()) {
iterators_.push_back(PictureLayerTiling::TilingEvictionTileIterator(
- layer_->tilings_->tiling_at(high_res_tiling_index), tree));
+ layer_->tilings_->tiling_at(high_res_tiling_index), tree_priority));
}
DCHECK_GT(iterators_.size(), 0u);