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

Unified Diff: cc/resources/picture_layer_tiling.h

Issue 674103004: [WIP] cc: Use reverse spiral iterator in tiling eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.h
diff --git a/cc/resources/picture_layer_tiling.h b/cc/resources/picture_layer_tiling.h
index eb47b60ed61cf6736d1b58f6dd0773076942bb41..5bc978c92c4124afb63910b79b6b37adad76faaf 100644
--- a/cc/resources/picture_layer_tiling.h
+++ b/cc/resources/picture_layer_tiling.h
@@ -124,7 +124,8 @@ class CC_EXPORT PictureLayerTiling {
TilingEvictionTileIterator();
TilingEvictionTileIterator(PictureLayerTiling* tiling,
TreePriority tree_priority,
- EvictionCategory category);
+ EvictionCategory category,
+ bool skip_shared_high_priority_tiles);
~TilingEvictionTileIterator();
operator bool() const;
@@ -133,8 +134,24 @@ class CC_EXPORT PictureLayerTiling {
TilingEvictionTileIterator& operator++();
private:
- const std::vector<Tile*>* eviction_tiles_;
- size_t current_eviction_tiles_index_;
+ void AdvanceEventually(bool* skipped_tiles);
+ void AdvanceSoon();
+ void AdvanceNow();
+ bool PrepareTileUnlessReturnedByTwin(Tile* tile) const;
+
+ PictureLayerTiling* tiling_;
+ TreePriority tree_priority_;
+ EvictionCategory eviction_category_;
+
+ bool processing_soon_border_rect_;
+ bool skip_shared_high_priority_tiles_;
+ std::vector<Tile*> unoccluded_now_tiles_;
+ size_t unoccluded_now_tiles_index_;
+
+ Tile* current_tile_;
+
+ TilingData::Iterator visible_iterator_;
+ TilingData::ReverseSpiralDifferenceIterator spiral_iterator_;
};
~PictureLayerTiling();
@@ -322,10 +339,6 @@ class CC_EXPORT PictureLayerTiling {
const gfx::Rect& visible_rect_in_content_space)
const;
- void UpdateEvictionCacheIfNeeded(TreePriority tree_priority);
- const std::vector<Tile*>* GetEvictionTiles(TreePriority tree_priority,
- EvictionCategory category);
-
void Invalidate(const Region& layer_region);
void DoInvalidate(const Region& layer_region,
@@ -366,19 +379,6 @@ class CC_EXPORT PictureLayerTiling {
Occlusion current_occlusion_in_layer_space_;
- // TODO(reveman): Remove this in favour of an array of eviction_tiles_ when we
- // change all enums to have a consistent way of getting the count/last
- // element.
- std::vector<Tile*> eviction_tiles_now_;
- std::vector<Tile*> eviction_tiles_now_and_required_for_activation_;
- std::vector<Tile*> eviction_tiles_soon_;
- std::vector<Tile*> eviction_tiles_soon_and_required_for_activation_;
- std::vector<Tile*> eviction_tiles_eventually_;
- std::vector<Tile*> eviction_tiles_eventually_and_required_for_activation_;
-
- bool eviction_tiles_cache_valid_;
- TreePriority eviction_cache_tree_priority_;
-
private:
DISALLOW_ASSIGN(PictureLayerTiling);
« no previous file with comments | « cc/resources/eviction_tile_priority_queue.cc ('k') | cc/resources/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698