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(); | |
684 } | 683 } |
685 | 684 |
686 void PictureLayerTiling::VerifyLiveTilesRect(bool is_on_recycle_tree) const { | 685 void PictureLayerTiling::VerifyLiveTilesRect(bool is_on_recycle_tree) const { |
687 #if DCHECK_IS_ON() | 686 #if DCHECK_IS_ON() |
688 for (auto it = tiles_.begin(); it != tiles_.end(); ++it) { | 687 for (auto it = tiles_.begin(); it != tiles_.end(); ++it) { |
689 if (!it->second.get()) | 688 if (!it->second.get()) |
690 continue; | 689 continue; |
691 DCHECK(it->first.first < tiling_data_.num_tiles_x()) | 690 DCHECK(it->first.first < tiling_data_.num_tiles_x()) |
692 << this << " " << it->first.first << "," << it->first.second | 691 << this << " " << it->first.first << "," << it->first.second |
693 << " num_tiles_x " << tiling_data_.num_tiles_x() << " live_tiles_rect " | 692 << " num_tiles_x " << tiling_data_.num_tiles_x() << " live_tiles_rect " |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 break; | 1026 break; |
1028 } | 1027 } |
1029 | 1028 |
1030 gfx::Rect result(origin_x, origin_y, width, height); | 1029 gfx::Rect result(origin_x, origin_y, width, height); |
1031 if (cache) | 1030 if (cache) |
1032 cache->previous_result = result; | 1031 cache->previous_result = result; |
1033 return result; | 1032 return result; |
1034 } | 1033 } |
1035 | 1034 |
1036 } // namespace cc | 1035 } // namespace cc |
OLD | NEW |