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

Side by Side Diff: cc/resources/picture_layer_tiling.h

Issue 428533008: cc: Remove vectors from tiling eviction tile iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 Tile* current_tile_; 95 Tile* current_tile_;
96 TilingData::Iterator visible_iterator_; 96 TilingData::Iterator visible_iterator_;
97 TilingData::SpiralDifferenceIterator spiral_iterator_; 97 TilingData::SpiralDifferenceIterator spiral_iterator_;
98 }; 98 };
99 99
100 class CC_EXPORT TilingEvictionTileIterator { 100 class CC_EXPORT TilingEvictionTileIterator {
101 public: 101 public:
102 TilingEvictionTileIterator(); 102 TilingEvictionTileIterator();
103 TilingEvictionTileIterator(PictureLayerTiling* tiling, 103 TilingEvictionTileIterator(PictureLayerTiling* tiling,
104 TreePriority tree_priority); 104 TreePriority tree_priority,
105 TilePriority::PriorityBin type,
106 bool required_for_activation);
105 ~TilingEvictionTileIterator(); 107 ~TilingEvictionTileIterator();
106 108
107 operator bool() const; 109 operator bool() const;
108 const Tile* operator*() const; 110 const Tile* operator*() const;
109 Tile* operator*(); 111 Tile* operator*();
110 TilingEvictionTileIterator& operator++(); 112 TilingEvictionTileIterator& operator++();
111 TilePriority::PriorityBin get_type() {
112 DCHECK(*this);
113 const TilePriority& priority =
114 (*tile_iterator_)->priority_for_tree_priority(tree_priority_);
115 return priority.priority_bin;
116 }
117 113
118 private: 114 private:
119 PictureLayerTiling* tiling_; 115 PictureLayerTiling* tiling_;
120 TreePriority tree_priority_; 116 TreePriority tree_priority_;
121 std::vector<Tile*>::iterator tile_iterator_; 117 std::vector<Tile*>::iterator tile_iterator_;
118 std::vector<Tile*>* eviction_tiles_;
122 }; 119 };
123 120
124 ~PictureLayerTiling(); 121 ~PictureLayerTiling();
125 122
126 // Create a tiling with no tiles. CreateTiles must be called to add some. 123 // Create a tiling with no tiles. CreateTiles must be called to add some.
127 static scoped_ptr<PictureLayerTiling> Create( 124 static scoped_ptr<PictureLayerTiling> Create(
128 float contents_scale, 125 float contents_scale,
129 const gfx::Size& layer_bounds, 126 const gfx::Size& layer_bounds,
130 PictureLayerTilingClient* client); 127 PictureLayerTilingClient* client);
131 gfx::Size layer_bounds() const { return layer_bounds_; } 128 gfx::Size layer_bounds() const { return layer_bounds_; }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 gfx::Rect current_visible_rect_; 309 gfx::Rect current_visible_rect_;
313 gfx::Rect current_skewport_rect_; 310 gfx::Rect current_skewport_rect_;
314 gfx::Rect current_soon_border_rect_; 311 gfx::Rect current_soon_border_rect_;
315 gfx::Rect current_eventually_rect_; 312 gfx::Rect current_eventually_rect_;
316 313
317 bool has_visible_rect_tiles_; 314 bool has_visible_rect_tiles_;
318 bool has_skewport_rect_tiles_; 315 bool has_skewport_rect_tiles_;
319 bool has_soon_border_rect_tiles_; 316 bool has_soon_border_rect_tiles_;
320 bool has_eventually_rect_tiles_; 317 bool has_eventually_rect_tiles_;
321 318
322 std::vector<Tile*> eviction_tiles_cache_; 319 std::vector<Tile*> eventually_eviction_tiles_;
320 std::vector<Tile*> soon_eviction_tiles_;
321 std::vector<Tile*> now_required_for_activation_eviction_tiles_;
322 std::vector<Tile*> now_not_required_for_activation_eviction_tiles_;
323 bool eviction_tiles_cache_valid_; 323 bool eviction_tiles_cache_valid_;
324 TreePriority eviction_cache_tree_priority_; 324 TreePriority eviction_cache_tree_priority_;
325 325
326 private: 326 private:
327 DISALLOW_ASSIGN(PictureLayerTiling); 327 DISALLOW_ASSIGN(PictureLayerTiling);
328 328
329 RectExpansionCache expansion_cache_; 329 RectExpansionCache expansion_cache_;
330 }; 330 };
331 331
332 } // namespace cc 332 } // namespace cc
333 333
334 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ 334 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698