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 #include "cc/resources/picture_layer_tiling.h" | 5 #include "cc/resources/picture_layer_tiling.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <set> | 10 #include <set> |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 TileMapKey key(iter.index()); | 673 TileMapKey key(iter.index()); |
674 CreateTile(key.first, key.second, twin_tiling, recycled_twin); | 674 CreateTile(key.first, key.second, twin_tiling, recycled_twin); |
675 } | 675 } |
676 | 676 |
677 live_tiles_rect_ = new_live_tiles_rect; | 677 live_tiles_rect_ = new_live_tiles_rect; |
678 VerifyLiveTilesRect(false); | 678 VerifyLiveTilesRect(false); |
679 if (recycled_twin) { | 679 if (recycled_twin) { |
680 recycled_twin->live_tiles_rect_ = live_tiles_rect_; | 680 recycled_twin->live_tiles_rect_ = live_tiles_rect_; |
681 recycled_twin->VerifyLiveTilesRect(true); | 681 recycled_twin->VerifyLiveTilesRect(true); |
682 } | 682 } |
| 683 client_->TilingLiveRectChanged(); |
683 } | 684 } |
684 | 685 |
685 void PictureLayerTiling::VerifyLiveTilesRect(bool is_on_recycle_tree) const { | 686 void PictureLayerTiling::VerifyLiveTilesRect(bool is_on_recycle_tree) const { |
686 #if DCHECK_IS_ON() | 687 #if DCHECK_IS_ON() |
687 for (auto it = tiles_.begin(); it != tiles_.end(); ++it) { | 688 for (auto it = tiles_.begin(); it != tiles_.end(); ++it) { |
688 if (!it->second.get()) | 689 if (!it->second.get()) |
689 continue; | 690 continue; |
690 DCHECK(it->first.first < tiling_data_.num_tiles_x()) | 691 DCHECK(it->first.first < tiling_data_.num_tiles_x()) |
691 << this << " " << it->first.first << "," << it->first.second | 692 << this << " " << it->first.first << "," << it->first.second |
692 << " num_tiles_x " << tiling_data_.num_tiles_x() << " live_tiles_rect " | 693 << " num_tiles_x " << tiling_data_.num_tiles_x() << " live_tiles_rect " |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 break; | 1027 break; |
1027 } | 1028 } |
1028 | 1029 |
1029 gfx::Rect result(origin_x, origin_y, width, height); | 1030 gfx::Rect result(origin_x, origin_y, width, height); |
1030 if (cache) | 1031 if (cache) |
1031 cache->previous_result = result; | 1032 cache->previous_result = result; |
1032 return result; | 1033 return result; |
1033 } | 1034 } |
1034 | 1035 |
1035 } // namespace cc | 1036 } // namespace cc |
OLD | NEW |