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 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 | 799 |
800 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect()); | 800 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect()); |
801 if (!tile_is_visible) | 801 if (!tile_is_visible) |
802 return false; | 802 return false; |
803 | 803 |
804 if (IsTileOccludedOnCurrentTree(tile)) | 804 if (IsTileOccludedOnCurrentTree(tile)) |
805 return false; | 805 return false; |
806 return true; | 806 return true; |
807 } | 807 } |
808 | 808 |
809 void PictureLayerTiling::UpdateTileAndTwinPriority(Tile* tile) const { | 809 void PictureLayerTiling::UpdateTilePriority(Tile* tile) const { |
810 tile->set_priority(ComputePriorityForTile(tile)); | 810 tile->set_priority(ComputePriorityForTile(tile)); |
811 tile->set_is_occluded(IsTileOccluded(tile)); | 811 tile->set_is_occluded(IsTileOccluded(tile)); |
812 tile->set_required_for_activation(IsTileRequiredForActivation(tile)); | 812 tile->set_required_for_activation(IsTileRequiredForActivation(tile)); |
813 tile->set_required_for_draw(IsTileRequiredForDraw(tile)); | 813 tile->set_required_for_draw(IsTileRequiredForDraw(tile)); |
814 } | 814 } |
815 | 815 |
816 void PictureLayerTiling::VerifyAllTilesHaveCurrentRasterSource() const { | 816 void PictureLayerTiling::VerifyAllTilesHaveCurrentRasterSource() const { |
817 #if DCHECK_IS_ON() | 817 #if DCHECK_IS_ON() |
818 for (const auto& tile_pair : tiles_) | 818 for (const auto& tile_pair : tiles_) |
819 DCHECK_EQ(raster_source_.get(), tile_pair.second->raster_source()); | 819 DCHECK_EQ(raster_source_.get(), tile_pair.second->raster_source()); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 break; | 1031 break; |
1032 } | 1032 } |
1033 | 1033 |
1034 gfx::Rect result(origin_x, origin_y, width, height); | 1034 gfx::Rect result(origin_x, origin_y, width, height); |
1035 if (cache) | 1035 if (cache) |
1036 cache->previous_result = result; | 1036 cache->previous_result = result; |
1037 return result; | 1037 return result; |
1038 } | 1038 } |
1039 | 1039 |
1040 } // namespace cc | 1040 } // namespace cc |
OLD | NEW |