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.h | |
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.h')
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h index 6383a22..5989bba 100644 --- a/cc/test/fake_picture_layer_tiling_client.h +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -26,6 +26,9 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { virtual void UpdatePile(Tile* tile) OVERRIDE {} virtual gfx::Size CalculateTileSize( const gfx::Size& content_bounds) const OVERRIDE; + virtual size_t GetMaxTilesForInterestArea() const OVERRIDE; + virtual float GetSkewportTargetTimeInSeconds() const OVERRIDE; + virtual int GetSkewportExtrapolationLimitInContentPixels() const OVERRIDE; void SetTileSize(const gfx::Size& tile_size); gfx::Size TileSize() const { return tile_size_; } @@ -40,6 +43,15 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { void set_text_rect(const gfx::Rect& rect) { text_rect_ = rect; } void set_allow_create_tile(bool allow) { allow_create_tile_ = allow; } void set_invalidation(const Region& region) { invalidation_ = region; } + void set_max_tiles_for_interest_area(size_t area) { + max_tiles_for_interest_area_ = area; + } + void set_skewport_target_time_in_seconds(float time) { + skewport_target_time_in_seconds_ = time; + } + void set_skewport_extrapolation_limit_in_content_pixels(int limit) { + skewport_extrapolation_limit_in_content_pixels_ = limit; + } TileManager* tile_manager() const { return tile_manager_.get(); @@ -54,6 +66,9 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { gfx::Rect text_rect_; bool allow_create_tile_; Region invalidation_; + size_t max_tiles_for_interest_area_; + float skewport_target_time_in_seconds_; + int skewport_extrapolation_limit_in_content_pixels_; }; } // namespace cc |