From 71003cd425276c7abbf81cd9e9f07eeb20fc20f5 Mon Sep 17 00:00:00 2001 From: "enne@chromium.org" Date: Fri, 1 Feb 2013 18:42:02 +0000 Subject: 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 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=179764 Review URL: https://chromiumcodereview.appspot.com/12087068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180162 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/test/fake_picture_layer_tiling_client.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cc/test/fake_picture_layer_tiling_client.h') diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h index 78603cc..5935ae3 100644 --- a/cc/test/fake_picture_layer_tiling_client.h +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -23,6 +23,9 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { virtual scoped_refptr CreateTile( PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE; virtual void UpdatePile(Tile* tile) OVERRIDE {} + virtual gfx::Size CalculateTileSize( + gfx::Size current_tile_size, + gfx::Size content_bounds) OVERRIDE; void SetTileSize(gfx::Size tile_size); gfx::Size TileSize() const { return tile_size_; } -- cgit v1.1