summaryrefslogtreecommitdiffstats
path: root/cc/resources/tile_manager.h
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 17:32:54 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-13 17:32:54 +0000
commitcb563fc32f3cc084d4454f95b6e6ab9281af5ad2 (patch)
treeb04fec3ff9b98a84595d2eeeab4bb023ce452d9c /cc/resources/tile_manager.h
parent61a85f474124c99fefe4fcc87e19dc26e549dd12 (diff)
downloadchromium_src-cb563fc32f3cc084d4454f95b6e6ab9281af5ad2.zip
chromium_src-cb563fc32f3cc084d4454f95b6e6ab9281af5ad2.tar.gz
chromium_src-cb563fc32f3cc084d4454f95b6e6ab9281af5ad2.tar.bz2
cc: Fix memory leak in cc_perftests.
This patch fixes a memory leak in the cc_perftests. When we assign memory to tiles, if we use ManageTiles call then we also create raster tasks which causes a memory leak in resources acquired. BUG=317970, 317969 R=reveman@chromium.org, epenner@chromium.org Review URL: https://codereview.chromium.org/68173006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/tile_manager.h')
-rw-r--r--cc/resources/tile_manager.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h
index 2975f79..6b8b707 100644
--- a/cc/resources/tile_manager.h
+++ b/cc/resources/tile_manager.h
@@ -105,6 +105,18 @@ class CC_EXPORT TileManager : public RasterWorkerPoolClient,
return raster_worker_pool_.get();
}
+ void SetGlobalStateForTesting(
+ const GlobalStateThatImpactsTilePriority& state) {
+ if (state != global_state_) {
+ global_state_ = state;
+ prioritized_tiles_dirty_ = true;
+ resource_pool_->SetResourceUsageLimits(
+ global_state_.memory_limit_in_bytes,
+ global_state_.unused_memory_limit_in_bytes,
+ global_state_.num_resources_limit);
+ }
+ }
+
protected:
TileManager(TileManagerClient* client,
ResourceProvider* resource_provider,