diff options
author | danakj <danakj@chromium.org> | 2014-10-10 20:24:42 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-11 03:24:59 +0000 |
commit | 19f0c9e018cc431eb60fa49615192dd091622fef (patch) | |
tree | 486462476d75939d5ca7b2e6d44c1e5badd21711 /cc/layers/tiled_layer.cc | |
parent | e22bac1a138a221ce4ba4d121f69827cc65b9a87 (diff) | |
download | chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.zip chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.tar.gz chromium_src-19f0c9e018cc431eb60fa49615192dd091622fef.tar.bz2 |
cc: Stop converting update rect from int to float to int.
Layer::SetNeedsDisplay() would turn the int bounds() into a float RectF
just for PictureLayer to turn it back into an int Rect. This is silly.
If PictureLayer is just going to use ints, we might as well use ints
throughout. So convert update_rect_ from a RectF to a Rect.
R=enne
BUG=342848
Review URL: https://codereview.chromium.org/647253002
Cr-Commit-Position: refs/heads/master@{#299233}
Diffstat (limited to 'cc/layers/tiled_layer.cc')
-rw-r--r-- | cc/layers/tiled_layer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc index d6f4116..e4d5f7c 100644 --- a/cc/layers/tiled_layer.cc +++ b/cc/layers/tiled_layer.cc @@ -288,7 +288,7 @@ UpdatableTile* TiledLayer::CreateTile(int i, int j) { return added_tile; } -void TiledLayer::SetNeedsDisplayRect(const gfx::RectF& dirty_rect) { +void TiledLayer::SetNeedsDisplayRect(const gfx::Rect& dirty_rect) { InvalidateContentRect(LayerRectToContentRect(dirty_rect)); ContentsScalingLayer::SetNeedsDisplayRect(dirty_rect); } @@ -464,7 +464,8 @@ void TiledLayer::UpdateTileTextures(const gfx::Rect& update_rect, // paint_rect from content space to layer space. float width_scale = 1 / draw_properties().contents_scale_x; float height_scale = 1 / draw_properties().contents_scale_y; - update_rect_ = gfx::ScaleRect(update_rect, width_scale, height_scale); + update_rect_ = + gfx::ScaleToEnclosingRect(update_rect, width_scale, height_scale); // Calling PrepareToUpdate() calls into WebKit to paint, which may have the // side effect of disabling compositing, which causes our reference to the |