| 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_TILES_PICTURE_LAYER_TILING_H_ | 5 #ifndef CC_TILES_PICTURE_LAYER_TILING_H_ |
| 6 #define CC_TILES_PICTURE_LAYER_TILING_H_ | 6 #define CC_TILES_PICTURE_LAYER_TILING_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 return iter == tiles_.end() ? nullptr : iter->second.get(); | 128 return iter == tiles_.end() ? nullptr : iter->second.get(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 bool has_tiles() const { return !tiles_.empty(); } | 131 bool has_tiles() const { return !tiles_.empty(); } |
| 132 // all_tiles_done() can return false negatives. | 132 // all_tiles_done() can return false negatives. |
| 133 bool all_tiles_done() const { return all_tiles_done_; } | 133 bool all_tiles_done() const { return all_tiles_done_; } |
| 134 void set_all_tiles_done(bool all_tiles_done) { | 134 void set_all_tiles_done(bool all_tiles_done) { |
| 135 all_tiles_done_ = all_tiles_done; | 135 all_tiles_done_ = all_tiles_done; |
| 136 } | 136 } |
| 137 | 137 |
| 138 WhichTree tree() const { return tree_; } |
| 139 |
| 138 void VerifyNoTileNeedsRaster() const { | 140 void VerifyNoTileNeedsRaster() const { |
| 139 #if DCHECK_IS_ON() | 141 #if DCHECK_IS_ON() |
| 140 for (const auto& tile_pair : tiles_) { | 142 for (const auto& tile_pair : tiles_) { |
| 141 DCHECK(!tile_pair.second->draw_info().NeedsRaster() || | 143 DCHECK(!tile_pair.second->draw_info().NeedsRaster() || |
| 142 IsTileOccluded(tile_pair.second.get())); | 144 IsTileOccluded(tile_pair.second.get())); |
| 143 } | 145 } |
| 144 #endif // DCHECK_IS_ON() | 146 #endif // DCHECK_IS_ON() |
| 145 } | 147 } |
| 146 | 148 |
| 147 // For testing functionality. | 149 // For testing functionality. |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 bool has_eventually_rect_tiles_ = false; | 363 bool has_eventually_rect_tiles_ = false; |
| 362 bool all_tiles_done_ = true; | 364 bool all_tiles_done_ = true; |
| 363 | 365 |
| 364 private: | 366 private: |
| 365 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); | 367 DISALLOW_COPY_AND_ASSIGN(PictureLayerTiling); |
| 366 }; | 368 }; |
| 367 | 369 |
| 368 } // namespace cc | 370 } // namespace cc |
| 369 | 371 |
| 370 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ | 372 #endif // CC_TILES_PICTURE_LAYER_TILING_H_ |
| OLD | NEW |