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

Side by Side Diff: cc/layers/picture_layer_impl.h

Issue 644313002: cc: Use reverse spiral iterator in tiling eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/resources/picture_layer_tiling.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LAYERS_PICTURE_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_ 6 #define CC_LAYERS_PICTURE_LAYER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 size_t current_stage_; 63 size_t current_stage_;
64 64
65 // One low res stage, and three high res stages. 65 // One low res stage, and three high res stages.
66 IterationStage stages_[4]; 66 IterationStage stages_[4];
67 PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS]; 67 PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS];
68 }; 68 };
69 69
70 class CC_EXPORT LayerEvictionTileIterator { 70 class CC_EXPORT LayerEvictionTileIterator {
71 public: 71 public:
72 LayerEvictionTileIterator(); 72 LayerEvictionTileIterator();
73 LayerEvictionTileIterator(PictureLayerImpl* layer, 73 explicit LayerEvictionTileIterator(PictureLayerImpl* layer);
74 TreePriority tree_priority);
75 ~LayerEvictionTileIterator(); 74 ~LayerEvictionTileIterator();
76 75
77 Tile* operator*(); 76 Tile* operator*();
78 const Tile* operator*() const; 77 const Tile* operator*() const;
79 LayerEvictionTileIterator& operator++(); 78 LayerEvictionTileIterator& operator++();
80 operator bool() const; 79 operator bool() const;
81 80
82 private: 81 private:
83 bool AdvanceToNextCategory(); 82 bool AdvanceToNextCategory();
84 bool AdvanceToNextTilingRangeType(); 83 bool AdvanceToNextTilingRangeType();
85 bool AdvanceToNextTiling(); 84 bool AdvanceToNextTiling();
86 85
87 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; 86 PictureLayerTilingSet::TilingRange CurrentTilingRange() const;
88 size_t CurrentTilingIndex() const; 87 size_t CurrentTilingIndex() const;
89 88
90 PictureLayerImpl* layer_; 89 PictureLayerImpl* layer_;
91 TreePriority tree_priority_;
92 90
93 PictureLayerTiling::EvictionCategory current_category_; 91 PictureLayerTiling::EvictionCategory current_category_;
94 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; 92 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_;
95 size_t current_tiling_; 93 size_t current_tiling_;
96 PictureLayerTiling::TilingEvictionTileIterator current_iterator_; 94 PictureLayerTiling::TilingEvictionTileIterator current_iterator_;
97 }; 95 };
98 96
99 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { 97 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
100 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); 98 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id));
101 } 99 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // frame that has a valid viewport for prioritizing tiles. 228 // frame that has a valid viewport for prioritizing tiles.
231 gfx::Rect visible_rect_for_tile_priority_; 229 gfx::Rect visible_rect_for_tile_priority_;
232 230
233 friend class PictureLayer; 231 friend class PictureLayer;
234 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 232 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
235 }; 233 };
236 234
237 } // namespace cc 235 } // namespace cc
238 236
239 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 237 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/resources/picture_layer_tiling.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698