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

Unified Diff: cc/picture_layer_tiling.cc

Issue 12225054: Generate fewer tiles when zooming in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Take 2 Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_tiling.cc
diff --git a/cc/picture_layer_tiling.cc b/cc/picture_layer_tiling.cc
index 214bcd37f7a14a5f3becc3085361713f636b2187..ae3afc39d0451f79f96449138fba168f8f90ae2a 100644
--- a/cc/picture_layer_tiling.cc
+++ b/cc/picture_layer_tiling.cc
@@ -373,11 +373,13 @@ void PictureLayerTiling::UpdateTilePriorities(
gfx::ToEnclosingRect(gfx::ScaleRect(viewport_in_layer_space,
contents_scale_));
gfx::Rect inflated_rect = viewport_in_content_space;
+ float adjusted_inset = TilePriority::kMaxDistanceInContentSpace /
+ std::max(contents_scale_, 1.f);
inflated_rect.Inset(
- -TilePriority::kMaxDistanceInContentSpace,
- -TilePriority::kMaxDistanceInContentSpace,
- -TilePriority::kMaxDistanceInContentSpace,
- -TilePriority::kMaxDistanceInContentSpace);
+ -adjusted_inset,
+ -adjusted_inset,
+ -adjusted_inset,
+ -adjusted_inset);
inflated_rect.Intersect(ContentRect());
// Iterate through all of the tiles that were live last frame but will
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698