| Index: cc/layers/tiled_layer.cc
|
| diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
|
| index 5607496b79e028e449bb534ab2523eeb7944099e..56df6f716ac25c61551ddd6da75437c9a9bece23 100644
|
| --- a/cc/layers/tiled_layer.cc
|
| +++ b/cc/layers/tiled_layer.cc
|
| @@ -142,18 +142,17 @@ void TiledLayer::UpdateTileSizeAndTilingOption() {
|
| }
|
|
|
| void TiledLayer::UpdateBounds() {
|
| - gfx::Size old_bounds = tiler_->bounds();
|
| - gfx::Size new_bounds = content_bounds();
|
| - if (old_bounds == new_bounds)
|
| + gfx::Rect old_tiling_rect = tiler_->tiling_rect();
|
| + gfx::Rect new_tiling_rect = gfx::Rect(content_bounds());
|
| + if (old_tiling_rect == new_tiling_rect)
|
| return;
|
| - tiler_->SetBounds(new_bounds);
|
| + tiler_->SetTilingRect(new_tiling_rect);
|
|
|
| // Invalidate any areas that the new bounds exposes.
|
| - Region old_region = gfx::Rect(old_bounds);
|
| - Region new_region = gfx::Rect(new_bounds);
|
| - new_region.Subtract(old_region);
|
| - for (Region::Iterator new_rects(new_region);
|
| - new_rects.has_rect();
|
| + Region old_region = old_tiling_rect;
|
| + Region new_region = new_tiling_rect;
|
| + new_tiling_rect.Subtract(old_tiling_rect);
|
| + for (Region::Iterator new_rects(new_tiling_rect); new_rects.has_rect();
|
| new_rects.next())
|
| InvalidateContentRect(new_rects.rect());
|
| }
|
|
|