Chromium Code Reviews| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 void AdvanceToNextIterator(); | 80 void AdvanceToNextIterator(); |
| 81 bool IsCorrectType( | 81 bool IsCorrectType( |
| 82 PictureLayerTiling::TilingEvictionTileIterator* it) const; | 82 PictureLayerTiling::TilingEvictionTileIterator* it) const; |
| 83 void EnsureCurrentIteratorCreated(); | |
| 83 | 84 |
| 84 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; | 85 std::vector<PictureLayerTiling::TilingEvictionTileIterator> iterators_; |
|
reveman
2014/07/26 00:30:49
is there no compile time limit to the number of it
vmpstr
2014/07/28 15:06:16
I think it might make sense to limit this at some
reveman
2014/07/28 16:19:33
What if we passed that stage information to the Ti
vmpstr
2014/07/28 18:15:08
I feel that it's a bit of a misuse of the iterator
reveman
2014/07/28 19:06:14
I'm rather thinking of this as different collectio
| |
| 86 std::vector<PictureLayerTiling*> tilings_; | |
|
reveman
2014/07/26 00:30:49
do we really need this vector? is there some way w
vmpstr
2014/07/28 15:06:16
It's possible, but I think this is a simpler solut
reveman
2014/07/28 16:19:34
I don't like that we're building a reliance on vec
vmpstr
2014/07/28 18:15:08
The only real problem is that we don't know how ma
reveman
2014/07/28 19:06:14
The key as you mentioned is to have a TilingEvicti
vmpstr
2014/07/28 19:27:04
I just meant that if we have a PriorityBin passed
| |
| 85 size_t iterator_index_; | 87 size_t iterator_index_; |
| 86 TilePriority::PriorityBin iteration_stage_; | 88 TilePriority::PriorityBin iteration_stage_; |
| 87 bool required_for_activation_; | 89 bool required_for_activation_; |
| 88 | |
| 89 PictureLayerImpl* layer_; | 90 PictureLayerImpl* layer_; |
| 91 TreePriority tree_priority_; | |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { | 94 static scoped_ptr<PictureLayerImpl> Create(LayerTreeImpl* tree_impl, int id) { |
| 93 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); | 95 return make_scoped_ptr(new PictureLayerImpl(tree_impl, id)); |
| 94 } | 96 } |
| 95 virtual ~PictureLayerImpl(); | 97 virtual ~PictureLayerImpl(); |
| 96 | 98 |
| 97 // LayerImpl overrides. | 99 // LayerImpl overrides. |
| 98 virtual const char* LayerTypeAsString() const OVERRIDE; | 100 virtual const char* LayerTypeAsString() const OVERRIDE; |
| 99 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) | 101 virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 gfx::Size viewport_size_for_tile_priority_; | 219 gfx::Size viewport_size_for_tile_priority_; |
| 218 gfx::Transform screen_space_transform_for_tile_priority_; | 220 gfx::Transform screen_space_transform_for_tile_priority_; |
| 219 | 221 |
| 220 friend class PictureLayer; | 222 friend class PictureLayer; |
| 221 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); | 223 DISALLOW_COPY_AND_ASSIGN(PictureLayerImpl); |
| 222 }; | 224 }; |
| 223 | 225 |
| 224 } // namespace cc | 226 } // namespace cc |
| 225 | 227 |
| 226 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ | 228 #endif // CC_LAYERS_PICTURE_LAYER_IMPL_H_ |
| OLD | NEW |