diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 15:43:34 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 15:43:34 +0000 |
commit | bffd19e70a5263084d69b1e894757e207d55cd40 (patch) | |
tree | 24ceca4b8c384fc309710ea65d44bb7811582fea /cc/resources/picture_layer_tiling_set.h | |
parent | fc3ab0c74d43b93ac2378b2f629c85bd9ad1e6e5 (diff) | |
download | chromium_src-bffd19e70a5263084d69b1e894757e207d55cd40.zip chromium_src-bffd19e70a5263084d69b1e894757e207d55cd40.tar.gz chromium_src-bffd19e70a5263084d69b1e894757e207d55cd40.tar.bz2 |
cc: Find a better prioritized rect when the viewport rect is huge.
When a part of the layer is visible, then it has a visible_content_rect which
is the best place to expand the prioritized rect from.
If no part of the layer is visible, we use the viewport rect in content space.
However, when the layer clips the viewport, this rect becomes enormous.
Currently the ExpandRectEquallyToAreaBoundedBy function "expands" the viewport
to cover the target area, but if the viewport is huge, it shrinks it instead.
When it shrinks to a rect far away from the layer, the layer is considered too
far from the viewport for prioritization.
Instead, we should only grow the viewport in content space, then intersect with
the tiling's content bounds (as before) to find an appropriate starting rect.
Tests:
PictureLayerTilingIteratorTest.TilesExistGiantViewport
PictureLayerTilingIteratorTest.TilesExistOutsideViewport
PictureLayerTilingIteratorTest.TilesExistLargeViewportAndLayerWithSmallVisibleArea
PictureLayerTilingIteratorTest.TilesExistLargeViewportAndLayerWithLargeVisibleArea
BUG=231521
Review URL: https://codereview.chromium.org/13895005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194596 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture_layer_tiling_set.h')
-rw-r--r-- | cc/resources/picture_layer_tiling_set.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cc/resources/picture_layer_tiling_set.h b/cc/resources/picture_layer_tiling_set.h index f88d1ef1..31f7e93 100644 --- a/cc/resources/picture_layer_tiling_set.h +++ b/cc/resources/picture_layer_tiling_set.h @@ -55,6 +55,7 @@ class CC_EXPORT PictureLayerTilingSet { 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, |