| 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_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ | 5 #ifndef CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ |
| 6 #define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ | 6 #define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/containers/stack_container.h" | 10 #include "base/containers/stack_container.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 OnePriorityRectIterator( | 37 OnePriorityRectIterator( |
| 38 PictureLayerTiling* tiling, | 38 PictureLayerTiling* tiling, |
| 39 TilingData* tiling_data, | 39 TilingData* tiling_data, |
| 40 PictureLayerTiling::PriorityRectType priority_rect_type); | 40 PictureLayerTiling::PriorityRectType priority_rect_type); |
| 41 | 41 |
| 42 bool done() const { return !current_tile_.tile(); } | 42 bool done() const { return !current_tile_.tile(); } |
| 43 const PrioritizedTile& operator*() const { return current_tile_; } | 43 const PrioritizedTile& operator*() const { return current_tile_; } |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 ~OnePriorityRectIterator() = default; | 46 ~OnePriorityRectIterator() = default; |
| 47 bool TileNeedsRaster(const Tile* tile) const { | |
| 48 return tile->draw_info().NeedsRaster() && !tiling_->IsTileOccluded(tile); | |
| 49 } | |
| 50 | 47 |
| 51 template <typename TilingIteratorType> | 48 template <typename TilingIteratorType> |
| 52 void AdvanceToNextTile(TilingIteratorType* iterator); | 49 void AdvanceToNextTile(TilingIteratorType* iterator); |
| 53 template <typename TilingIteratorType> | 50 template <typename TilingIteratorType> |
| 54 bool GetFirstTileAndCheckIfValid(TilingIteratorType* iterator); | 51 bool GetFirstTileAndCheckIfValid(TilingIteratorType* iterator); |
| 55 bool IsTileValid(const Tile* tile) const; | 52 bool IsTileValid(const Tile* tile) const; |
| 56 | 53 |
| 57 PrioritizedTile current_tile_; | 54 PrioritizedTile current_tile_; |
| 58 PictureLayerTiling* tiling_; | 55 PictureLayerTiling* tiling_; |
| 59 TilingData* tiling_data_; | 56 TilingData* tiling_data_; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // ideal pending high res. | 190 // ideal pending high res. |
| 194 base::StackVector<IterationStage, 6> stages_; | 191 base::StackVector<IterationStage, 6> stages_; |
| 195 TilingIterator iterators_[NUM_ITERATORS]; | 192 TilingIterator iterators_[NUM_ITERATORS]; |
| 196 | 193 |
| 197 DISALLOW_COPY_AND_ASSIGN(TilingSetRasterQueueAll); | 194 DISALLOW_COPY_AND_ASSIGN(TilingSetRasterQueueAll); |
| 198 }; | 195 }; |
| 199 | 196 |
| 200 } // namespace cc | 197 } // namespace cc |
| 201 | 198 |
| 202 #endif // CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ | 199 #endif // CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ |
| OLD | NEW |