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

Side by Side Diff: cc/layers/picture_layer_impl.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
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 LayerEvictionTileIterator(PictureLayerImpl* layer, 70 LayerEvictionTileIterator(PictureLayerImpl* layer,
71 TreePriority tree_priority); 71 TreePriority tree_priority);
72 ~LayerEvictionTileIterator(); 72 ~LayerEvictionTileIterator();
73 73
74 Tile* operator*(); 74 Tile* operator*();
75 const Tile* operator*() const; 75 const Tile* operator*() const;
76 LayerEvictionTileIterator& operator++(); 76 LayerEvictionTileIterator& operator++();
77 operator bool() const; 77 operator bool() const;
78 78
79 private: 79 private:
80 enum IterationStage {
81 EVENTUALLY,
82 EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION,
83 SOON,
84 SOON_AND_REQUIRED_FOR_ACTIVATION,
85 NOW,
86 NOW_AND_REQUIRED_FOR_ACTIVATION
87 };
88
89 TilePriority::PriorityBin PriorityBinFromIterationStage(
90 IterationStage stage);
91 bool RequiredForActivationFromIterationStage(IterationStage stage);
92
93 PictureLayerTilingSet::TilingRange CurrentRange();
94 int CurrentTilingIndex();
95
80 void AdvanceToNextIterator(); 96 void AdvanceToNextIterator();
81 bool IsCorrectType( 97 bool AdvanceTiling();
82 PictureLayerTiling::TilingEvictionTileIterator* it) const; 98 bool AdvanceRange();
99 bool AdvanceStage();
reveman 2014/08/01 17:54:47 Please get these function names and variables name
vmpstr 2014/08/01 19:39:50 Done.
83 100
84 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; 101 PictureLayerTiling::TilingEvictionTileIterator iterator_;
85 size_t iterator_index_; 102 int current_range_offset_;
reveman 2014/08/01 17:54:47 size_t instead of int?
vmpstr 2014/08/01 19:39:50 Done.
86 TilePriority::PriorityBin iteration_stage_; 103 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_;
87 bool required_for_activation_; 104 IterationStage current_stage_;
reveman 2014/08/01 17:54:47 maybe current_iteration_stage_ instead to be perfe
vmpstr 2014/08/01 19:39:50 Done.
88 105
106 TreePriority tree_priority_;
89 PictureLayerImpl* layer_; 107 PictureLayerImpl* layer_;
90 }; 108 };
91 109
92 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { 110 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) {
93 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); 111 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id));
94 } 112 }
95 virtual ~PictureLayerImpl(); 113 virtual ~PictureLayerImpl();
96 114
97 // LayerImpl overrides. 115 // LayerImpl overrides.
98 virtual const char* LayerTypeAsString() const OVERRIDE; 116 virtual const char* LayerTypeAsString() const OVERRIDE;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 gfx::Rect viewport_rect_for_tile_priority_; 235 gfx::Rect viewport_rect_for_tile_priority_;
218 gfx::Transform screen_space_transform_for_tile_priority_; 236 gfx::Transform screen_space_transform_for_tile_priority_;
219 237
220 friend class PictureLayer; 238 friend class PictureLayer;
221 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); 239 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl);
222 }; 240 };
223 241
224 } // namespace cc 242 } // namespace cc
225 243
226 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ 244 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | cc/layers/picture_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698