summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 02:15:54 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 02:15:54 +0000
commit08b6be83631442f356e64b465d864d3ea9a9b0e3 (patch)
treebe070b9d20b8272d59f5bd8102d8afb5cc986ccd /cc
parent42210ec24d3de50b9b9a80833d2730be461242f2 (diff)
downloadchromium_src-08b6be83631442f356e64b465d864d3ea9a9b0e3.zip
chromium_src-08b6be83631442f356e64b465d864d3ea9a9b0e3.tar.gz
chromium_src-08b6be83631442f356e64b465d864d3ea9a9b0e3.tar.bz2
cc: Use a rectf manhattan distance for update tile priorities
In order to not regress performance when switching to an int version of manhattan distance, we should use rectf version. BUG=326991 R=enne Review URL: https://codereview.chromium.org/107713005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239961 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/resources/picture_layer_tiling.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 59ebd5d..9ec9293 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -555,8 +555,8 @@ void PictureLayerTiling::UpdateTilePriorities(
gfx::ScaleRect(bundle_bounds, last_scale, last_scale) +
last_offset;
- float distance_to_visible_in_pixels = view_rect.ManhattanInternalDistance(
- gfx::ToEnclosingRect(current_screen_rect));
+ float distance_to_visible_in_pixels =
+ current_screen_rect.ManhattanInternalDistance(view_rect);
float time_to_visible_in_seconds =
TilePriority::TimeForBoundsToIntersect(
@@ -638,8 +638,8 @@ void PictureLayerTiling::UpdateTilePriorities(
last_bundle_origin + last_horizontal + last_vertical,
last_bundle_origin + last_vertical).BoundingBox();
- float distance_to_visible_in_pixels = view_rect.ManhattanInternalDistance(
- gfx::ToEnclosingRect(current_screen_rect));
+ float distance_to_visible_in_pixels =
+ current_screen_rect.ManhattanInternalDistance(view_rect);
float time_to_visible_in_seconds =
TilePriority::TimeForBoundsToIntersect(
@@ -675,8 +675,8 @@ void PictureLayerTiling::UpdateTilePriorities(
gfx::RectF last_screen_rect = MathUtil::MapClippedRect(
last_screen_transform, last_layer_content_rect);
- float distance_to_visible_in_pixels = view_rect.ManhattanInternalDistance(
- gfx::ToEnclosingRect(current_screen_rect));
+ float distance_to_visible_in_pixels =
+ current_screen_rect.ManhattanInternalDistance(view_rect);
float time_to_visible_in_seconds =
TilePriority::TimeForBoundsToIntersect(