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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 644313002: cc: Use reverse spiral iterator in tiling eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 7fd7730be24e32de49cf1a87552ea33e8858320f..10824de28ab14fe58de9e2405ab088c19f7a7fec 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1567,17 +1567,14 @@ void PictureLayerImpl::LayerRasterTileIterator::AdvanceToNextStage() {
PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator()
: layer_(nullptr),
- tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES),
current_category_(PictureLayerTiling::EVENTUALLY),
current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
current_tiling_(0u) {
}
PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
- PictureLayerImpl* layer,
- TreePriority tree_priority)
+ PictureLayerImpl* layer)
: layer_(layer),
- tree_priority_(tree_priority),
current_category_(PictureLayerTiling::EVENTUALLY),
current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
current_tiling_(CurrentTilingRange().start - 1u) {
@@ -1591,7 +1588,6 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
current_iterator_ = PictureLayerTiling::TilingEvictionTileIterator(
layer_->tilings_->tiling_at(CurrentTilingIndex()),
- tree_priority,
current_category_);
} while (!current_iterator_);
}
@@ -1620,7 +1616,6 @@ operator++() {
current_iterator_ = PictureLayerTiling::TilingEvictionTileIterator(
layer_->tilings_->tiling_at(CurrentTilingIndex()),
- tree_priority_,
current_category_);
}
return *this;
@@ -1633,16 +1628,9 @@ PictureLayerImpl::LayerEvictionTileIterator::operator bool() const {
bool PictureLayerImpl::LayerEvictionTileIterator::AdvanceToNextCategory() {
switch (current_category_) {
case PictureLayerTiling::EVENTUALLY:
- current_category_ =
- PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION;
- return true;
- case PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION:
current_category_ = PictureLayerTiling::SOON;
return true;
case PictureLayerTiling::SOON:
- current_category_ = PictureLayerTiling::SOON_AND_REQUIRED_FOR_ACTIVATION;
- return true;
- case PictureLayerTiling::SOON_AND_REQUIRED_FOR_ACTIVATION:
current_category_ = PictureLayerTiling::NOW;
return true;
case PictureLayerTiling::NOW:

Powered by Google App Engine
This is Rietveld 408576698