Skip to content

Commit

Permalink
cc: Restore the space of interest area padding to be ideal contents s…
Browse files Browse the repository at this point in the history
…pace.

This patch ensures that the interest area padding we use is specified in
ideal contents scale, not in screen scale. Effectively this means that
on devices with content scale > 1, we will have a smaller interest area.

This restores the behavior that was changed when the calculation was
moved to the tiling set.

R=ericrk, enne
BUG=614990
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review-Url: https://codereview.chromium.org/2022613002
Cr-Commit-Position: refs/heads/master@{#396602}
  • Loading branch information
vmpstr authored and Commit bot committed May 27, 2016
1 parent 04157e8 commit 55a6f3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cc/tiles/picture_layer_tiling_set.cc
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,9 @@ void PictureLayerTilingSet::UpdatePriorityRects(
// We keep things as floats in here.
if (!visible_rect_in_layer_space.IsEmpty()) {
gfx::RectF eventually_rectf(visible_rect_in_layer_space);
eventually_rectf.Inset(-tiling_interest_area_padding_,
-tiling_interest_area_padding_);
eventually_rectf.Inset(
-tiling_interest_area_padding_ / ideal_contents_scale,
-tiling_interest_area_padding_ / ideal_contents_scale);
if (eventually_rectf.Intersects(
gfx::RectF(gfx::SizeF(raster_source_->GetSize())))) {
visible_rect_in_layer_space_ = visible_rect_in_layer_space;
Expand Down
3 changes: 3 additions & 0 deletions cc/trees/layer_tree_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ LayerTreeSettings::LayerTreeSettings()
max_untiled_layer_size(gfx::Size(512, 512)),
minimum_occlusion_tracking_size(gfx::Size(160, 160)),
// 3000 pixels should give sufficient area for prepainting.
// Note this value is specified with an ideal contents scale in mind. That
// is, the ideal tiling would use this value as the padding.
// TODO(vmpstr): Figure out a better number that doesn't depend on scale.
tiling_interest_area_padding(3000),
skewport_target_time_in_seconds(1.0f),
skewport_extrapolation_limit_in_screen_pixels(2000),
Expand Down

0 comments on commit 55a6f3c

Please sign in to comment.