diff options
author | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-13 16:55:42 +0000 |
---|---|---|
committer | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-13 16:55:42 +0000 |
commit | 42f14bfcf12a0f25a37805027f4a25d99ccff297 (patch) | |
tree | d7c97531cfc404842ea1f8c6945789a2022dcc2f /cc/test/fake_picture_layer_tiling_client.cc | |
parent | c7d7c12ffa6810ab1c1a063af244cef6d6c49f49 (diff) | |
download | chromium_src-42f14bfcf12a0f25a37805027f4a25d99ccff297.zip chromium_src-42f14bfcf12a0f25a37805027f4a25d99ccff297.tar.gz chromium_src-42f14bfcf12a0f25a37805027f4a25d99ccff297.tar.bz2 |
cc: Simplify picture layer tiling update tile priorities.
This patch simplifies the priority math calculation and moves it
into layers space. This makes the priority to be less correct,
since we're inverse transforming the viewport into layer space
instead of forward transforming tiles into screen space in all cases.
In particular, with perspective and rotated layers, we will be marking
more tiles as visible than before. This should be OK, since the amount
of those layers in practice is limited.
BUG=339142
Review URL: https://codereview.chromium.org/140513006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_picture_layer_tiling_client.cc')
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc index f891b9e..36d1eee 100644 --- a/cc/test/fake_picture_layer_tiling_client.cc +++ b/cc/test/fake_picture_layer_tiling_client.cc @@ -27,7 +27,10 @@ FakePictureLayerTilingClient::FakePictureLayerTilingClient() : tile_manager_(new FakeTileManager(&tile_manager_client_)), pile_(new FakeInfinitePicturePileImpl()), twin_tiling_(NULL), - allow_create_tile_(true) {} + allow_create_tile_(true), + max_tiles_for_interest_area_(10000), + skewport_target_time_in_seconds_(1.0f), + skewport_extrapolation_limit_in_content_pixels_(2000) {} FakePictureLayerTilingClient::FakePictureLayerTilingClient( ResourceProvider* resource_provider) @@ -35,7 +38,9 @@ FakePictureLayerTilingClient::FakePictureLayerTilingClient( new FakeTileManager(&tile_manager_client_, resource_provider)), pile_(new FakeInfinitePicturePileImpl()), twin_tiling_(NULL), - allow_create_tile_(true) {} + allow_create_tile_(true), + max_tiles_for_interest_area_(10000), + skewport_target_time_in_seconds_(1.0f) {} FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { } @@ -58,6 +63,19 @@ gfx::Size FakePictureLayerTilingClient::CalculateTileSize( return tile_size_; } +size_t FakePictureLayerTilingClient::GetMaxTilesForInterestArea() const { + return max_tiles_for_interest_area_; +} + +float FakePictureLayerTilingClient::GetSkewportTargetTimeInSeconds() const { + return skewport_target_time_in_seconds_; +} + +int FakePictureLayerTilingClient::GetSkewportExtrapolationLimitInContentPixels() + const { + return skewport_extrapolation_limit_in_content_pixels_; +} + const Region* FakePictureLayerTilingClient::GetInvalidation() { return &invalidation_; } |