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

Unified Diff: cc/resources/picture_layer_tiling_set.cc

Issue 13895005: cc: Find a better prioritized rect when the viewport rect is huge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: early out restored Created 7 years, 8 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/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_set.cc
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc
index 1b26e56c2b26733fc6843b435445ae1f98654000..cc15047acf08f29bbd0f92e2ad2c2dc14e485175 100644
--- a/cc/resources/picture_layer_tiling_set.cc
+++ b/cc/resources/picture_layer_tiling_set.cc
@@ -279,6 +279,7 @@ void PictureLayerTilingSet::UpdateTilePriorities(
WhichTree tree,
gfx::Size device_viewport,
gfx::Rect viewport_in_content_space,
+ gfx::Rect visible_content_rect,
gfx::Size last_layer_bounds,
gfx::Size current_layer_bounds,
float last_layer_contents_scale,
@@ -290,15 +291,18 @@ void PictureLayerTilingSet::UpdateTilePriorities(
bool store_screen_space_quads_on_tiles,
size_t max_tiles_for_interest_area) {
gfx::RectF viewport_in_layer_space = gfx::ScaleRect(
- viewport_in_content_space,
- 1.f / current_layer_contents_scale,
- 1.f / current_layer_contents_scale);
+ viewport_in_content_space,
+ 1.f / current_layer_contents_scale);
+ gfx::RectF visible_layer_rect = gfx::ScaleRect(
+ visible_content_rect,
+ 1.f / current_layer_contents_scale);
for (size_t i = 0; i < tilings_.size(); ++i) {
tilings_[i]->UpdateTilePriorities(
tree,
device_viewport,
viewport_in_layer_space,
+ visible_layer_rect,
last_layer_bounds,
current_layer_bounds,
last_layer_contents_scale,
« no previous file with comments | « cc/resources/picture_layer_tiling_set.h ('k') | cc/resources/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698