summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_picture_layer_tiling_client.h
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-06 00:01:50 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-06 00:01:50 +0000
commit24835e9056711da23091ce0116e7ca41d1bdf279 (patch)
tree10908bd30fb36949baeb93802a7a7dace28cbd32 /cc/test/fake_picture_layer_tiling_client.h
parent858a2037f49d48d512c2c952f2246b4159af2a9e (diff)
downloadchromium_src-24835e9056711da23091ce0116e7ca41d1bdf279.zip
chromium_src-24835e9056711da23091ce0116e7ca41d1bdf279.tar.gz
chromium_src-24835e9056711da23091ce0116e7ca41d1bdf279.tar.bz2
cc: Added tile bundles
This patch adds TileBundles to cc. Currently, in impl side painting we work with Tiles. A PictureLayerTiling creates enough tiles to cover its rect (and registers them with the tile manager), then it updates the priorities of each of the tile, and finally informs TileManager to do its work. TileManager sorts and assigns memory to tiles, and begins rasterization. With TileBundles, the tiling creates TileBundles (initially 2x2 tiles) to contain tiles. Update tile priorities now only happens on a per bundle basis. In the initial patch, TileManager still pulls out each individual tile for processing. **** Note to Perf Sheriffs **** This patch affects performance of several of cc_perftests: - PictureLayerTilingPerfTest.Invalidate This test is expected to regress slightly, but not too much. - PictureLayerTilingPerfTest.UpdateTilePriorities This test's performance should improve greatly. - TileManagerPerfTest.ManageTiles This test _should_ remain roughly the same, but there might be some up or down as the result of the patch. Review URL: https://codereview.chromium.org/62283012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239074 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.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h
index 4b092e8..bd4f443 100644
--- a/cc/test/fake_picture_layer_tiling_client.h
+++ b/cc/test/fake_picture_layer_tiling_client.h
@@ -16,13 +16,16 @@ namespace cc {
class FakePictureLayerTilingClient : public PictureLayerTilingClient {
public:
- FakePictureLayerTilingClient();
- explicit FakePictureLayerTilingClient(ResourceProvider* resource_provider);
+ explicit FakePictureLayerTilingClient(TileManager* tile_manager);
virtual ~FakePictureLayerTilingClient();
// PictureLayerTilingClient implementation.
virtual scoped_refptr<Tile> CreateTile(
PictureLayerTiling* tiling, gfx::Rect rect) OVERRIDE;
+ virtual scoped_refptr<TileBundle> CreateTileBundle(int offset_x,
+ int offset_y,
+ int width,
+ int height) OVERRIDE;
virtual void UpdatePile(Tile* tile) OVERRIDE {}
virtual gfx::Size CalculateTileSize(
gfx::Size content_bounds) const OVERRIDE;
@@ -42,18 +45,19 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient {
void set_invalidation(const Region& region) { invalidation_ = region; }
TileManager* tile_manager() const {
- return tile_manager_.get();
+ return tile_manager_;
}
protected:
- FakeTileManagerClient tile_manager_client_;
- scoped_ptr<TileManager> tile_manager_;
+ TileManager* tile_manager_;
scoped_refptr<PicturePileImpl> pile_;
gfx::Size tile_size_;
PictureLayerTiling* twin_tiling_;
gfx::Rect text_rect_;
bool allow_create_tile_;
Region invalidation_;
+ bool is_active_;
+ bool is_pending_;
};
} // namespace cc