Chromium Code Reviews| Index: cc/resources/picture_layer_tiling.cc |
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc |
| index 33e9038d4a2f30bff6bd3bad17bd1ece0286074a..887c51e6201dfd1039b53c845fef130ed015a828 100644 |
| --- a/cc/resources/picture_layer_tiling.cc |
| +++ b/cc/resources/picture_layer_tiling.cc |
| @@ -467,7 +467,9 @@ void PictureLayerTiling::UpdateTilePriorities( |
| current_eventually_rect_ = eventually_rect; |
| eviction_tiles_cache_valid_ = false; |
| - TilePriority now_priority(resolution_, TilePriority::NOW, 0); |
| + TilePriority now_priority(resolution_, false, TilePriority::NOW, 0); |
| + TilePriority now_and_occluded_priority( |
| + resolution_, true, TilePriority::NOW, 0); |
| float content_to_screen_scale = |
| 1.0f / (contents_scale_ * layer_contents_scale); |
| @@ -482,9 +484,7 @@ void PictureLayerTiling::UpdateTilePriorities( |
| continue; |
| Tile* tile = find->second.get(); |
| - tile->SetPriority(tree, now_priority); |
| - |
| - // Set whether tile is occluded or not. |
| + // Determine whether tile is occluded or not. |
| bool is_occluded = false; |
| if (occlusion_tracker) { |
| gfx::Rect tile_query_rect = ScaleToEnclosingRect( |
| @@ -495,7 +495,12 @@ void PictureLayerTiling::UpdateTilePriorities( |
| is_occluded = occlusion_tracker->Occluded( |
| render_target, tile_query_rect, draw_transform); |
| } |
| - tile->set_is_occluded(is_occluded); |
| + |
| + if (is_occluded) { |
| + tile->SetPriority(tree, now_and_occluded_priority); |
| + } else { |
| + tile->SetPriority(tree, now_priority); |
| + } |
| } |
| // Assign soon priority to skewport tiles. |
| @@ -515,7 +520,8 @@ void PictureLayerTiling::UpdateTilePriorities( |
| visible_rect_in_content_space.ManhattanInternalDistance(tile_bounds) * |
| content_to_screen_scale; |
| - TilePriority priority(resolution_, TilePriority::SOON, distance_to_visible); |
| + TilePriority priority( |
| + resolution_, false, TilePriority::SOON, distance_to_visible); |
|
danakj
2014/06/19 19:19:59
can you use a temp var here to give the |false| li
jbedley
2014/06/19 20:51:20
Done.
|
| tile->SetPriority(tree, priority); |
| } |
| @@ -536,7 +542,7 @@ void PictureLayerTiling::UpdateTilePriorities( |
| visible_rect_in_content_space.ManhattanInternalDistance(tile_bounds) * |
| content_to_screen_scale; |
| TilePriority priority( |
| - resolution_, TilePriority::EVENTUALLY, distance_to_visible); |
| + resolution_, false, TilePriority::EVENTUALLY, distance_to_visible); |
|
danakj
2014/06/19 19:19:59
can you use a temp var here to give the |false| li
jbedley
2014/06/19 20:51:20
Done.
|
| tile->SetPriority(tree, priority); |
| } |
| @@ -554,6 +560,7 @@ void PictureLayerTiling::UpdateTilePriorities( |
| Tile* tile = find->second.get(); |
| TilePriority priority(resolution_, |
| + false, |
|
danakj
2014/06/19 19:19:59
can you use a temp var here to give the |false| li
jbedley
2014/06/19 20:51:20
Done.
|
| TilePriority::SOON, |
| tile->priority(tree).distance_to_visible); |
| tile->SetPriority(tree, priority); |