| 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_RESOURCES_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 6 #define CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 const TilingData& TilingDataForTesting() const { return tiling_data_; } | 162 const TilingData& TilingDataForTesting() const { return tiling_data_; } |
| 163 | 163 |
| 164 std::vector<Tile*> AllTilesForTesting() const { | 164 std::vector<Tile*> AllTilesForTesting() const { |
| 165 std::vector<Tile*> all_tiles; | 165 std::vector<Tile*> all_tiles; |
| 166 for (TileMap::const_iterator it = tiles_.begin(); | 166 for (TileMap::const_iterator it = tiles_.begin(); |
| 167 it != tiles_.end(); ++it) | 167 it != tiles_.end(); ++it) |
| 168 all_tiles.push_back(it->second.get()); | 168 all_tiles.push_back(it->second.get()); |
| 169 return all_tiles; | 169 return all_tiles; |
| 170 } | 170 } |
| 171 | 171 |
| 172 std::vector<scoped_refptr<Tile> > AllRefTilesForTesting() const { |
| 173 std::vector<scoped_refptr<Tile> > all_tiles; |
| 174 for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) |
| 175 all_tiles.push_back(it->second); |
| 176 return all_tiles; |
| 177 } |
| 178 |
| 172 const gfx::Rect& GetCurrentVisibleRectForTesting() const { | 179 const gfx::Rect& GetCurrentVisibleRectForTesting() const { |
| 173 return current_visible_rect_; | 180 return current_visible_rect_; |
| 174 } | 181 } |
| 175 | 182 |
| 176 // Iterate over all tiles to fill content_rect. Even if tiles are invalid | 183 // Iterate over all tiles to fill content_rect. Even if tiles are invalid |
| 177 // (i.e. no valid resource) this tiling should still iterate over them. | 184 // (i.e. no valid resource) this tiling should still iterate over them. |
| 178 // The union of all geometry_rect calls for each element iterated over should | 185 // The union of all geometry_rect calls for each element iterated over should |
| 179 // exactly equal content_rect and no two geometry_rects should intersect. | 186 // exactly equal content_rect and no two geometry_rects should intersect. |
| 180 class CC_EXPORT CoverageIterator { | 187 class CC_EXPORT CoverageIterator { |
| 181 public: | 188 public: |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 339 |
| 333 private: | 340 private: |
| 334 DISALLOW_ASSIGN(PictureLayerTiling); | 341 DISALLOW_ASSIGN(PictureLayerTiling); |
| 335 | 342 |
| 336 RectExpansionCache expansion_cache_; | 343 RectExpansionCache expansion_cache_; |
| 337 }; | 344 }; |
| 338 | 345 |
| 339 } // namespace cc | 346 } // namespace cc |
| 340 | 347 |
| 341 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 348 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |