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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 }; | 44 }; |
45 | 45 |
46 class CC_EXPORT PictureLayerTiling { | 46 class CC_EXPORT PictureLayerTiling { |
47 public: | 47 public: |
48 class CC_EXPORT TilingRasterTileIterator { | 48 class CC_EXPORT TilingRasterTileIterator { |
49 public: | 49 public: |
50 TilingRasterTileIterator(); | 50 TilingRasterTileIterator(); |
51 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); | 51 TilingRasterTileIterator(PictureLayerTiling* tiling, WhichTree tree); |
52 ~TilingRasterTileIterator(); | 52 ~TilingRasterTileIterator(); |
53 | 53 |
54 operator bool() const { | 54 operator bool() const { return !!current_tile_; } |
55 return current_tile_ && TileNeedsRaster(current_tile_); | |
56 } | |
57 Tile* operator*() { return current_tile_; } | 55 Tile* operator*() { return current_tile_; } |
58 TilePriority::PriorityBin get_type() const { return type_; } | 56 TilePriority::PriorityBin get_type() const { return type_; } |
59 | 57 |
60 TilingRasterTileIterator& operator++(); | 58 TilingRasterTileIterator& operator++(); |
61 | 59 |
62 gfx::Rect TileBounds() const { | 60 gfx::Rect TileBounds() const { |
63 DCHECK(*this); | 61 DCHECK(*this); |
64 if (type_ == TilePriority::NOW) { | 62 if (type_ == TilePriority::NOW) { |
65 return tiling_->tiling_data_.TileBounds(visible_iterator_.index_x(), | 63 return tiling_->tiling_data_.TileBounds(visible_iterator_.index_x(), |
66 visible_iterator_.index_y()); | 64 visible_iterator_.index_y()); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 | 305 |
308 private: | 306 private: |
309 DISALLOW_ASSIGN(PictureLayerTiling); | 307 DISALLOW_ASSIGN(PictureLayerTiling); |
310 | 308 |
311 RectExpansionCache expansion_cache_; | 309 RectExpansionCache expansion_cache_; |
312 }; | 310 }; |
313 | 311 |
314 } // namespace cc | 312 } // namespace cc |
315 | 313 |
316 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ | 314 #endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ |
OLD | NEW |