| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 LayerEvictionTileIterator(PictureLayerImpl* layer, |
| 74 const PictureLayerImpl* twin_layer, |
| 74 TreePriority tree_priority); | 75 TreePriority tree_priority); |
| 75 ~LayerEvictionTileIterator(); | 76 ~LayerEvictionTileIterator(); |
| 76 | 77 |
| 77 Tile* operator*(); | 78 Tile* operator*(); |
| 78 const Tile* operator*() const; | 79 const Tile* operator*() const; |
| 79 LayerEvictionTileIterator& operator++(); | 80 LayerEvictionTileIterator& operator++(); |
| 80 operator bool() const; | 81 operator bool() const; |
| 81 | 82 |
| 82 private: | 83 private: |
| 83 bool AdvanceToNextCategory(); | 84 bool AdvanceToNextCategory(); |
| 84 bool AdvanceToNextTilingRangeType(); | 85 bool AdvanceToNextTilingRangeType(); |
| 85 bool AdvanceToNextTiling(); | 86 bool AdvanceToNextTiling(); |
| 86 | 87 |
| 87 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; | 88 PictureLayerTilingSet::TilingRange CurrentTilingRange() const; |
| 88 size_t CurrentTilingIndex() const; | 89 size_t CurrentTilingIndex() const; |
| 89 | 90 |
| 90 PictureLayerImpl* layer_; | 91 PictureLayerImpl* layer_; |
| 91 TreePriority tree_priority_; | 92 TreePriority tree_priority_; |
| 93 bool use_tile_priority_rects_; |
| 94 bool use_twin_tile_priority_rects_; |
| 92 | 95 |
| 93 PictureLayerTiling::EvictionCategory current_category_; | 96 PictureLayerTiling::EvictionCategory current_category_; |
| 94 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; | 97 PictureLayerTilingSet::TilingRangeType current_tiling_range_type_; |
| 95 size_t current_tiling_; | 98 size_t current_tiling_; |
| 96 PictureLayerTiling::TilingEvictionTileIterator current_iterator_; | 99 PictureLayerTiling::TilingEvictionTileIterator current_iterator_; |
| 97 }; | 100 }; |
| 98 | 101 |
| 99 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 102 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
| 100 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); | 103 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); |
| 101 } | 104 } |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 // frame that has a valid viewport for prioritizing tiles. | 226 // frame that has a valid viewport for prioritizing tiles. |
| 224 gfx::Rect visible_rect_for_tile_priority_; | 227 gfx::Rect visible_rect_for_tile_priority_; |
| 225 | 228 |
| 226 friend class PictureLayer; | 229 friend class PictureLayer; |
| 227 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 230 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 228 }; | 231 }; |
| 229 | 232 |
| 230 } // namespace cc | 233 } // namespace cc |
| 231 | 234 |
| 232 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 235 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |