| OLD | NEW |
| 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 Loading... |
| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 // frame that has a valid viewport for prioritizing tiles. | 220 // frame that has a valid viewport for prioritizing tiles. |
| 223 gfx::Rect visible_rect_for_tile_priority_; | 221 gfx::Rect visible_rect_for_tile_priority_; |
| 224 | 222 |
| 225 friend class PictureLayer; | 223 friend class PictureLayer; |
| 226 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 224 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 227 }; | 225 }; |
| 228 | 226 |
| 229 } // namespace cc | 227 } // namespace cc |
| 230 | 228 |
| 231 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 229 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |