| Index: cc/resources/picture_pile.cc
|
| diff --git a/cc/resources/picture_pile.cc b/cc/resources/picture_pile.cc
|
| index ab138cab658f1766bce72e33a1aea7edc136f439..4daa2c3ce4f04c1766635e9a79dd6f133d01f2a5 100644
|
| --- a/cc/resources/picture_pile.cc
|
| +++ b/cc/resources/picture_pile.cc
|
| @@ -193,6 +193,7 @@ bool PicturePile::UpdateAndExpandInvalidation(
|
| SkColor background_color,
|
| bool contents_opaque,
|
| bool contents_fill_bounds_completely,
|
| + bool can_use_lcd_text,
|
| const gfx::Size& layer_size,
|
| const gfx::Rect& visible_layer_rect,
|
| int frame_number,
|
| @@ -200,15 +201,25 @@ bool PicturePile::UpdateAndExpandInvalidation(
|
| background_color_ = background_color;
|
| contents_opaque_ = contents_opaque;
|
| contents_fill_bounds_completely_ = contents_fill_bounds_completely;
|
| + bool can_use_lcd_text_changed = can_use_lcd_text_ != can_use_lcd_text;
|
| + can_use_lcd_text_ = can_use_lcd_text;
|
|
|
| bool updated = false;
|
|
|
| - Region resize_invalidation;
|
| + Region synthetic_invalidation;
|
| gfx::Size old_tiling_size = GetSize();
|
| if (old_tiling_size != layer_size) {
|
| tiling_.SetTilingSize(layer_size);
|
| updated = true;
|
| }
|
| + if (can_use_lcd_text_changed) {
|
| + // When LCD text is enabled/disabled, we must drop any raster tiles for
|
| + // the pile, so they can be recreated in a manner consistent with the new
|
| + // setting. We do this with |synthetic_invalidation| since we don't need to
|
| + // do a new recording, just invalidate rastered content.
|
| + synthetic_invalidation.Union(gfx::Rect(GetSize()));
|
| + updated = true;
|
| + }
|
|
|
| gfx::Rect interest_rect = visible_layer_rect;
|
| interest_rect.Inset(-pixel_record_distance_, -pixel_record_distance_);
|
| @@ -372,11 +383,11 @@ bool PicturePile::UpdateAndExpandInvalidation(
|
| exposed_top,
|
| exposed_left_until - exposed_left,
|
| exposed_bottom - exposed_top);
|
| - resize_invalidation.Union(left_rect);
|
| - resize_invalidation.Union(right_rect);
|
| - resize_invalidation.Union(top_rect);
|
| - resize_invalidation.Union(bottom_rect);
|
| - resize_invalidation.Union(exposed_rect);
|
| + synthetic_invalidation.Union(left_rect);
|
| + synthetic_invalidation.Union(right_rect);
|
| + synthetic_invalidation.Union(top_rect);
|
| + synthetic_invalidation.Union(bottom_rect);
|
| + synthetic_invalidation.Union(exposed_rect);
|
| }
|
| if (min_toss_y < tiling_.num_tiles_y()) {
|
| // The same thing occurs here as in the case above, but the invalidation
|
| @@ -408,11 +419,11 @@ bool PicturePile::UpdateAndExpandInvalidation(
|
| exposed_top,
|
| exposed_right - exposed_left,
|
| exposed_top_until - exposed_top);
|
| - resize_invalidation.Union(left_rect);
|
| - resize_invalidation.Union(right_rect);
|
| - resize_invalidation.Union(top_rect);
|
| - resize_invalidation.Union(bottom_rect);
|
| - resize_invalidation.Union(exposed_rect);
|
| + synthetic_invalidation.Union(left_rect);
|
| + synthetic_invalidation.Union(right_rect);
|
| + synthetic_invalidation.Union(top_rect);
|
| + synthetic_invalidation.Union(bottom_rect);
|
| + synthetic_invalidation.Union(exposed_rect);
|
| }
|
| }
|
|
|
| @@ -474,7 +485,7 @@ bool PicturePile::UpdateAndExpandInvalidation(
|
| invalidation->Union(invalidation_expanded_to_full_tiles);
|
| }
|
|
|
| - invalidation->Union(resize_invalidation);
|
| + invalidation->Union(synthetic_invalidation);
|
|
|
| // Make a list of all invalid tiles; we will attempt to
|
| // cluster these into multiple invalidation regions.
|
|
|