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

Unified Diff: cc/layers/picture_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/picture_layer.h ('k') | cc/layers/solid_color_scrollbar_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer.cc
diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc
index befef49a7e0047c340973385aef1964cec94b665..7573471793aee200a35a853b880d15f5aa29b129 100644
--- a/cc/layers/picture_layer.cc
+++ b/cc/layers/picture_layer.cc
@@ -68,12 +68,11 @@ void PictureLayer::SetLayerTreeHost(LayerTreeHost* host) {
}
}
-void PictureLayer::SetNeedsDisplayRect(const gfx::RectF& layer_rect) {
- gfx::Rect rect = gfx::ToEnclosedRect(layer_rect);
- if (!rect.IsEmpty()) {
+void PictureLayer::SetNeedsDisplayRect(const gfx::Rect& layer_rect) {
+ if (!layer_rect.IsEmpty()) {
// Clamp invalidation to the layer bounds.
- rect.Intersect(gfx::Rect(bounds()));
- pending_invalidation_.Union(rect);
+ pending_invalidation_.Union(
+ gfx::IntersectRects(layer_rect, gfx::Rect(bounds())));
}
Layer::SetNeedsDisplayRect(layer_rect);
}
« no previous file with comments | « cc/layers/picture_layer.h ('k') | cc/layers/solid_color_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698