From bffd19e70a5263084d69b1e894757e207d55cd40 Mon Sep 17 00:00:00 2001 From: "danakj@chromium.org" Date: Wed, 17 Apr 2013 15:43:34 +0000 Subject: 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 --- cc/resources/picture_layer_tiling_set.h | 1 + 1 file changed, 1 insertion(+) (limited to 'cc/resources/picture_layer_tiling_set.h') 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, -- cgit v1.1