summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_picture_pile_impl.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 00:54:41 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-05 00:54:41 +0000
commit56a6f9060826af89b1fc8362f2f930bc59588c7f (patch)
treed2f1aea295202683a40fa50d6df333219ef7c895 /cc/test/fake_picture_pile_impl.cc
parent4adfc3b9f3248205a61829893ef7a604bb89e38b (diff)
downloadchromium_src-56a6f9060826af89b1fc8362f2f930bc59588c7f.zip
chromium_src-56a6f9060826af89b1fc8362f2f930bc59588c7f.tar.gz
chromium_src-56a6f9060826af89b1fc8362f2f930bc59588c7f.tar.bz2
cc: Allow activating to something other than high-res
If the pending tree is only allowed to activate when it has all of its high res visible tiles ready to draw, then this can starve activation in cases where the pending tree could have activated earlier without a flash. The fix is that when the active tree has high res tiles that are not ready to draw or are shared with the pending tree, then the pending tree does not need those tiles to be ready before activating. To compensate for not needing high res tiles, the pending tree may need to require low res tiles if the active tree is drawing its low res tiles. This strategy allows faster activation during scrolling when both the active and pending tree may be checkerboarding or showing low res. Pending layers are still not allowed to activate with no content if the active layer does not exist or if the active layer has no tilings (i.e. didn't draw any content on previous frames). This prevents newly visible layers from activating without their content ready (which would cause the content to incrementally appear over several frames in a visually unappealing way). BUG=315180 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=237385 Review URL: https://codereview.chromium.org/75883002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238836 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_picture_pile_impl.cc')
-rw-r--r--cc/test/fake_picture_pile_impl.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc
index 989c4f9..88c7d38 100644
--- a/cc/test/fake_picture_pile_impl.cc
+++ b/cc/test/fake_picture_pile_impl.cc
@@ -42,6 +42,19 @@ scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreateEmptyPile(
return pile;
}
+scoped_refptr<FakePicturePileImpl>
+FakePicturePileImpl::CreatePileWithRecordedRegion(
+ gfx::Size tile_size,
+ gfx::Size layer_bounds,
+ const Region& recorded_region) {
+ scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
+ pile->tiling().SetTotalSize(layer_bounds);
+ pile->tiling().SetMaxTextureSize(tile_size);
+ pile->SetTileGridSize(ImplSidePaintingSettings().default_tile_size);
+ pile->SetRecordedRegionForTesting(recorded_region);
+ return pile;
+}
+
scoped_refptr<FakePicturePileImpl> FakePicturePileImpl::CreatePile() {
scoped_refptr<FakePicturePileImpl> pile(new FakePicturePileImpl());
gfx::Size size(std::numeric_limits<int>::max(),