Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2600)

Unified Diff: cc/layers/tiled_layer.cc

Issue 235753002: cc: Give TilingData a Rect instead of a Size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Git cl format Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/layers/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « cc/layers/picture_layer_unittest.cc ('k') | cc/layers/tiled_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698