diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-02 15:26:28 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-02 15:26:28 +0000 |
commit | 3edd52c800c72787ed7186369198084c1d6bdc4f (patch) | |
tree | 19d5bdf4ed8d211cbeb3acd336e8ac5aae474164 /cc/picture_layer_tiling_set.cc | |
parent | c08dc287eb773c691e4fb3ed963c2755b429aa1d (diff) | |
download | chromium_src-3edd52c800c72787ed7186369198084c1d6bdc4f.zip chromium_src-3edd52c800c72787ed7186369198084c1d6bdc4f.tar.gz chromium_src-3edd52c800c72787ed7186369198084c1d6bdc4f.tar.bz2 |
cc: Let impl-side painting use smaller tiles
To avoid wasting memory when there are lots of small layers (e.g. mobile
gmail), allow small layers to create smaller tiles. The heuristic is
similar to TiledLayer. If a layer is smaller than the max untiled size,
then just use that content bounds as the size. If a layer has one
larger dimension larger than the max untiled size then tile that
dimension at the max untiled size and clamp the other dimension at the
content size. If a layer is neither of these, then tile using the
default tile size.
NOTRY=true
R=danakj@chromium.org
BUG=172966
Review URL: https://chromiumcodereview.appspot.com/12087068
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/picture_layer_tiling_set.cc')
-rw-r--r-- | cc/picture_layer_tiling_set.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cc/picture_layer_tiling_set.cc b/cc/picture_layer_tiling_set.cc index 4025ac0..d181451 100644 --- a/cc/picture_layer_tiling_set.cc +++ b/cc/picture_layer_tiling_set.cc @@ -70,10 +70,8 @@ gfx::Size PictureLayerTilingSet::LayerBounds() const { return layer_bounds_; } -PictureLayerTiling* PictureLayerTilingSet::AddTiling( - float contents_scale, - gfx::Size tile_size) { - tilings_.push_back(PictureLayerTiling::Create(contents_scale, tile_size)); +PictureLayerTiling* PictureLayerTilingSet::AddTiling(float contents_scale) { + tilings_.push_back(PictureLayerTiling::Create(contents_scale)); PictureLayerTiling* appended = tilings_.back(); appended->SetClient(client_); appended->SetLayerBounds(layer_bounds_); |