-
danakj@chromium.org authored
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
bffd19e7