diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 03:07:16 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-12 03:07:16 +0000 |
commit | eece11eddc1249a156226a464c734b2ba2c73f1f (patch) | |
tree | f3b095e40c75659f4699689e1446dc788b1c60b9 /cc/test | |
parent | 282c71a2664f121895c9963556958faa67119708 (diff) | |
download | chromium_src-eece11eddc1249a156226a464c734b2ba2c73f1f.zip chromium_src-eece11eddc1249a156226a464c734b2ba2c73f1f.tar.gz chromium_src-eece11eddc1249a156226a464c734b2ba2c73f1f.tar.bz2 |
cc: Move ResourcePool ownership to LTHI.
Provides a significant amount of cleanup by removing the
requirement to plumb resource format and texture target through
the Rasterizer interface.
BUG=269841
Review URL: https://codereview.chromium.org/228183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.cc | 6 | ||||
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.h | 1 | ||||
-rw-r--r-- | cc/test/fake_tile_manager.cc | 18 | ||||
-rw-r--r-- | cc/test/fake_tile_manager.h | 7 |
4 files changed, 14 insertions, 18 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc index 4289b9d4..0c0fce6 100644 --- a/cc/test/fake_picture_layer_tiling_client.cc +++ b/cc/test/fake_picture_layer_tiling_client.cc @@ -22,8 +22,10 @@ FakePictureLayerTilingClient::FakePictureLayerTilingClient() FakePictureLayerTilingClient::FakePictureLayerTilingClient( ResourceProvider* resource_provider) - : tile_manager_( - new FakeTileManager(&tile_manager_client_, resource_provider)), + : resource_pool_( + ResourcePool::Create(resource_provider, GL_TEXTURE_2D, RGBA_8888)), + tile_manager_( + new FakeTileManager(&tile_manager_client_, resource_pool_.get())), pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), twin_tiling_(NULL), allow_create_tile_(true), diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h index 5989bba..7440ea7 100644 --- a/cc/test/fake_picture_layer_tiling_client.h +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -59,6 +59,7 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient { protected: FakeTileManagerClient tile_manager_client_; + scoped_ptr<ResourcePool> resource_pool_; scoped_ptr<TileManager> tile_manager_; scoped_refptr<PicturePileImpl> pile_; gfx::Size tile_size_; diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc index 4cb690f..4fbf704 100644 --- a/cc/test/fake_tile_manager.cc +++ b/cc/test/fake_tile_manager.cc @@ -48,12 +48,6 @@ class FakeRasterizerImpl : public Rasterizer, } completed_tasks_.clear(); } - virtual GLenum GetResourceTarget() const OVERRIDE { - return GL_TEXTURE_2D; - } - virtual ResourceFormat GetResourceFormat() const OVERRIDE { - return RGBA_8888; - } // Overridden from internal::RasterizerTaskClient: virtual SkCanvas* AcquireCanvasForRaster(internal::RasterTask* task) @@ -80,9 +74,9 @@ FakeTileManager::FakeTileManager(TileManagerClient* client) NULL) {} FakeTileManager::FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider) + ResourcePool* resource_pool) : TileManager(client, - resource_provider, + resource_pool, g_fake_rasterizer.Pointer(), g_fake_rasterizer.Pointer(), std::numeric_limits<unsigned>::max(), @@ -90,10 +84,10 @@ FakeTileManager::FakeTileManager(TileManagerClient* client, NULL) {} FakeTileManager::FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider, + ResourcePool* resource_pool, bool allow_on_demand_raster) : TileManager(client, - resource_provider, + resource_pool, g_fake_rasterizer.Pointer(), g_fake_rasterizer.Pointer(), std::numeric_limits<unsigned>::max(), @@ -101,10 +95,10 @@ FakeTileManager::FakeTileManager(TileManagerClient* client, NULL) {} FakeTileManager::FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider, + ResourcePool* resource_pool, size_t raster_task_limit_bytes) : TileManager(client, - resource_provider, + resource_pool, g_fake_rasterizer.Pointer(), g_fake_rasterizer.Pointer(), raster_task_limit_bytes, diff --git a/cc/test/fake_tile_manager.h b/cc/test/fake_tile_manager.h index 0399984..162aebe 100644 --- a/cc/test/fake_tile_manager.h +++ b/cc/test/fake_tile_manager.h @@ -15,13 +15,12 @@ namespace cc { class FakeTileManager : public TileManager { public: explicit FakeTileManager(TileManagerClient* client); + FakeTileManager(TileManagerClient* client, ResourcePool* resource_pool); FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider); - FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider, + ResourcePool* resource_pool, bool allow_on_demand_raster); FakeTileManager(TileManagerClient* client, - ResourceProvider* resource_provider, + ResourcePool* resource_pool, size_t raster_task_limit_bytes); virtual ~FakeTileManager(); |