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

Unified Diff: cc/layers/tiled_layer.cc

Issue 647253002: cc: Stop converting update rect from int to float to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: displayrectint: ccperftests Created 6 years, 2 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/tiled_layer.h ('k') | cc/layers/video_layer_impl.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 d6f4116749dd9c2cd9a452957f9952391d7da145..e4d5f7cc201ed2958ca6185e1ccb13220f931596 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
« no previous file with comments | « cc/layers/tiled_layer.h ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698