| Index: cc/resources/picture_layer_tiling.cc
|
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
|
| index 862d4d8b46750864ef453049b26d21ad7fb193d5..359459df90f1af647da8e72eee93bfb6ea8a0cfe 100644
|
| --- a/cc/resources/picture_layer_tiling.cc
|
| +++ b/cc/resources/picture_layer_tiling.cc
|
| @@ -79,8 +79,7 @@ void PictureLayerTiling::CreateTile(int i, int j) {
|
| TileMapKey key(i, j);
|
| DCHECK(tiles_.find(key) == tiles_.end());
|
|
|
| - gfx::Rect paint_rect = tiling_data_.TileBoundsWithBorder(i, j);
|
| - gfx::Rect tile_rect = paint_rect;
|
| + gfx::Rect tile_rect = tiling_data_.TileBoundsWithBorder(i, j);
|
| tile_rect.set_size(tiling_data_.max_texture_size());
|
|
|
| // Check our twin for a valid tile.
|
| @@ -90,7 +89,7 @@ void PictureLayerTiling::CreateTile(int i, int j) {
|
| Tile* candidate_tile = twin->TileAt(i, j);
|
| if (candidate_tile) {
|
| gfx::Rect rect =
|
| - gfx::ToEnclosingRect(ScaleRect(paint_rect, 1.0f / contents_scale_));
|
| + gfx::ToEnclosingRect(ScaleRect(tile_rect, 1.0f / contents_scale_));
|
| if (!client_->GetInvalidation()->Intersects(rect)) {
|
| tiles_[key] = candidate_tile;
|
| return;
|
| @@ -295,10 +294,15 @@ void PictureLayerTiling::UpdateTilePriorities(
|
| double current_frame_time_in_seconds,
|
| bool store_screen_space_quads_on_tiles,
|
| size_t max_tiles_for_interest_area) {
|
| - if (ContentRect().IsEmpty())
|
| + if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds)) {
|
| + // This should never be zero for the purposes of has_ever_been_updated().
|
| + DCHECK_NE(current_frame_time_in_seconds, 0.0);
|
| return;
|
| - if (!NeedsUpdateForFrameAtTime(current_frame_time_in_seconds))
|
| + }
|
| + if (ContentRect().IsEmpty()) {
|
| + last_impl_frame_time_in_seconds_ = current_frame_time_in_seconds;
|
| return;
|
| + }
|
|
|
| gfx::Rect viewport_in_content_space =
|
| gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space,
|
|
|