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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
793 | 793 |
794 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect()); | 794 bool tile_is_visible = current_visible_rect_.Intersects(tile->content_rect()); |
795 if (!tile_is_visible) | 795 if (!tile_is_visible) |
796 return false; | 796 return false; |
797 | 797 |
798 if (IsTileOccludedOnCurrentTree(tile)) | 798 if (IsTileOccludedOnCurrentTree(tile)) |
799 return false; | 799 return false; |
800 return true; | 800 return true; |
801 } | 801 } |
802 | 802 |
803 bool PictureLayerTiling::RasterSourceCoversCurrentVisibleTiles() const { | |
brianderson
2015/05/19 02:40:35
Is this correct?
enne (OOO)
2015/05/19 22:53:41
Seems legit!
| |
804 gfx::Rect visible_rect_expanded_to_tile_bounds = | |
805 tiling_data_.ExpandRectToTileBounds(current_visible_rect_); | |
806 | |
807 return raster_source_->CoversRect(visible_rect_expanded_to_tile_bounds, | |
808 contents_scale_); | |
809 } | |
810 | |
803 void PictureLayerTiling::UpdateRequiredStatesOnTile(Tile* tile) const { | 811 void PictureLayerTiling::UpdateRequiredStatesOnTile(Tile* tile) const { |
804 DCHECK(tile); | 812 DCHECK(tile); |
805 tile->set_required_for_activation(IsTileRequiredForActivation(tile)); | 813 tile->set_required_for_activation(IsTileRequiredForActivation(tile)); |
806 tile->set_required_for_draw(IsTileRequiredForDraw(tile)); | 814 tile->set_required_for_draw(IsTileRequiredForDraw(tile)); |
807 } | 815 } |
808 | 816 |
809 PrioritizedTile PictureLayerTiling::MakePrioritizedTile( | 817 PrioritizedTile PictureLayerTiling::MakePrioritizedTile( |
810 Tile* tile, | 818 Tile* tile, |
811 PriorityRectType priority_rect_type) const { | 819 PriorityRectType priority_rect_type) const { |
812 DCHECK(tile); | 820 DCHECK(tile); |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1071 break; | 1079 break; |
1072 } | 1080 } |
1073 | 1081 |
1074 gfx::Rect result(origin_x, origin_y, width, height); | 1082 gfx::Rect result(origin_x, origin_y, width, height); |
1075 if (cache) | 1083 if (cache) |
1076 cache->previous_result = result; | 1084 cache->previous_result = result; |
1077 return result; | 1085 return result; |
1078 } | 1086 } |
1079 | 1087 |
1080 } // namespace cc | 1088 } // namespace cc |
OLD | NEW |