| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TILING_SET_RASTER_QUEUE_REQUIRED_H_ | 5 #ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ |
| 6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ | 6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ |
| 7 | 7 |
| 8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
| 9 #include "cc/resources/picture_layer_tiling_set.h" | 9 #include "cc/resources/picture_layer_tiling_set.h" |
| 10 #include "cc/resources/raster_tile_priority_queue.h" | 10 #include "cc/resources/raster_tile_priority_queue.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 bool IsEmpty() const; | 27 bool IsEmpty() const; |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 // This iterator will return all tiles that are in the NOW bin on the given | 30 // This iterator will return all tiles that are in the NOW bin on the given |
| 31 // tiling. The queue can then use these tiles and further filter them based on | 31 // tiling. The queue can then use these tiles and further filter them based on |
| 32 // whether they are required or not. | 32 // whether they are required or not. |
| 33 class TilingIterator { | 33 class TilingIterator { |
| 34 public: | 34 public: |
| 35 TilingIterator(); | 35 TilingIterator(); |
| 36 explicit TilingIterator(PictureLayerTiling* tiling, | 36 explicit TilingIterator(PictureLayerTiling* tiling, |
| 37 TilingData* tiling_data, | 37 TilingData* tiling_data); |
| 38 const gfx::Rect& rect); | |
| 39 ~TilingIterator(); | 38 ~TilingIterator(); |
| 40 | 39 |
| 41 bool done() const { return current_tile_ == nullptr; } | 40 bool done() const { return current_tile_ == nullptr; } |
| 42 const Tile* operator*() const { return current_tile_; } | 41 const Tile* operator*() const { return current_tile_; } |
| 43 Tile* operator*() { return current_tile_; } | 42 Tile* operator*() { return current_tile_; } |
| 44 TilingIterator& operator++(); | 43 TilingIterator& operator++(); |
| 45 | 44 |
| 46 private: | 45 private: |
| 47 PictureLayerTiling* tiling_; | 46 PictureLayerTiling* tiling_; |
| 48 TilingData* tiling_data_; | 47 TilingData* tiling_data_; |
| 49 | 48 |
| 50 Tile* current_tile_; | 49 Tile* current_tile_; |
| 51 TilingData::Iterator visible_iterator_; | 50 TilingData::Iterator visible_iterator_; |
| 52 }; | 51 }; |
| 53 | 52 |
| 54 bool IsTileRequired(const Tile* tile) const; | 53 bool IsTileRequired(const Tile* tile) const; |
| 55 | 54 |
| 56 TilingIterator iterator_; | 55 TilingIterator iterator_; |
| 57 RasterTilePriorityQueue::Type type_; | 56 RasterTilePriorityQueue::Type type_; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace cc | 59 } // namespace cc |
| 61 | 60 |
| 62 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ | 61 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ |
| OLD | NEW |