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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 // covered by acceptable tiles at other scales. | 929 // covered by acceptable tiles at other scales. |
930 if (!missing_region.Intersects(iter.geometry_rect())) | 930 if (!missing_region.Intersects(iter.geometry_rect())) |
931 continue; | 931 continue; |
932 | 932 |
933 // If the twin tile doesn't exist (i.e. missing recording or so far away | 933 // If the twin tile doesn't exist (i.e. missing recording or so far away |
934 // that it is outside the visible tile rect) or this tile is shared between | 934 // that it is outside the visible tile rect) or this tile is shared between |
935 // with the twin, then this tile isn't required to prevent flashing. | 935 // with the twin, then this tile isn't required to prevent flashing. |
936 if (optional_twin_tiling) { | 936 if (optional_twin_tiling) { |
937 Tile* twin_tile = optional_twin_tiling->TileAt(iter.i(), iter.j()); | 937 Tile* twin_tile = optional_twin_tiling->TileAt(iter.i(), iter.j()); |
938 if (!twin_tile || twin_tile == tile) { | 938 if (!twin_tile || twin_tile == tile) { |
939 twin_had_missing_tile = true; | 939 // However if the shared tile is being used on the active tree, then |
| 940 // there's no missing content in this place, and low res is not needed. |
| 941 if (!twin_tile || !twin_tile->IsReadyToDraw()) |
| 942 twin_had_missing_tile = true; |
940 continue; | 943 continue; |
941 } | 944 } |
942 } | 945 } |
943 | 946 |
944 tile->MarkRequiredForActivation(); | 947 tile->MarkRequiredForActivation(); |
945 } | 948 } |
946 return twin_had_missing_tile; | 949 return twin_had_missing_tile; |
947 } | 950 } |
948 | 951 |
949 void PictureLayerImpl::DoPostCommitInitialization() { | 952 void PictureLayerImpl::DoPostCommitInitialization() { |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1772 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
1770 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1773 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
1771 return tiling_range.end - 1 - current_tiling_range_offset; | 1774 return tiling_range.end - 1 - current_tiling_range_offset; |
1772 } | 1775 } |
1773 } | 1776 } |
1774 NOTREACHED(); | 1777 NOTREACHED(); |
1775 return 0; | 1778 return 0; |
1776 } | 1779 } |
1777 | 1780 |
1778 } // namespace cc | 1781 } // namespace cc |
OLD | NEW |