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

Unified Diff: cc/tiles/picture_layer_tiling.cc

Issue 1196553009: Revert "cc: Make tiling interest rect calc based on viewport." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert extra bools. Created 5 years, 6 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/tiles/picture_layer_tiling.h ('k') | cc/tiles/picture_layer_tiling_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/picture_layer_tiling.cc
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 0697c240b28b6efa1bd157739eaae37dfa92ea5f..ef31f58256b1dc3e3bba06a7a2ad7fa80ef2ddce 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -38,12 +38,12 @@ scoped_ptr<PictureLayerTiling> PictureLayerTiling::Create(
float contents_scale,
scoped_refptr<RasterSource> raster_source,
PictureLayerTilingClient* client,
- float tiling_interest_area_viewport_multiplier,
+ size_t max_tiles_for_interest_area,
float skewport_target_time_in_seconds,
int skewport_extrapolation_limit_in_content_pixels) {
return make_scoped_ptr(new PictureLayerTiling(
- tree, contents_scale, raster_source, client,
- tiling_interest_area_viewport_multiplier, skewport_target_time_in_seconds,
+ tree, contents_scale, raster_source, client, max_tiles_for_interest_area,
+ skewport_target_time_in_seconds,
skewport_extrapolation_limit_in_content_pixels));
}
@@ -52,11 +52,10 @@ PictureLayerTiling::PictureLayerTiling(
float contents_scale,
scoped_refptr<RasterSource> raster_source,
PictureLayerTilingClient* client,
- float tiling_interest_area_viewport_multiplier,
+ size_t max_tiles_for_interest_area,
float skewport_target_time_in_seconds,
int skewport_extrapolation_limit_in_content_pixels)
- : tiling_interest_area_viewport_multiplier_(
- tiling_interest_area_viewport_multiplier),
+ : max_tiles_for_interest_area_(max_tiles_for_interest_area),
skewport_target_time_in_seconds_(skewport_target_time_in_seconds),
skewport_extrapolation_limit_in_content_pixels_(
skewport_extrapolation_limit_in_content_pixels),
@@ -626,9 +625,9 @@ bool PictureLayerTiling::ComputeTilePriorityRects(
DCHECK(skewport.Contains(visible_rect_in_content_space));
// Calculate the eventually/live tiles rect.
- int64 eventually_rect_area = tiling_interest_area_viewport_multiplier_ *
- visible_rect_in_content_space.width() *
- visible_rect_in_content_space.height();
+ gfx::Size tile_size = tiling_data_.max_texture_size();
+ int64 eventually_rect_area =
+ max_tiles_for_interest_area_ * tile_size.width() * tile_size.height();
gfx::Rect eventually_rect =
ExpandRectEquallyToAreaBoundedBy(visible_rect_in_content_space,
« no previous file with comments | « cc/tiles/picture_layer_tiling.h ('k') | cc/tiles/picture_layer_tiling_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698