From 40a32f78889dfe53f98b47fbaa9cc6ea41258419 Mon Sep 17 00:00:00 2001 From: "vmpstr@chromium.org" Date: Tue, 4 Jun 2013 07:39:51 +0000 Subject: cc: Remove memory state from tile management After the upload is moved into its own class, the tile can either have a resource or not. If it doesn't have a resource, but has a raster task, the memory is unreleasable. That makes all the memory states are implicit. Review URL: https://chromiumcodereview.appspot.com/15715031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203901 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/resources/resource_pool.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cc/resources/resource_pool.h') diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h index 651f1d4..0f3b2b8 100644 --- a/cc/resources/resource_pool.h +++ b/cc/resources/resource_pool.h @@ -46,6 +46,10 @@ class CC_EXPORT ResourcePool { size_t max_memory_usage_bytes, size_t max_unused_memory_usage_bytes); + size_t acquired_memory_usage_bytes() const { + return memory_usage_bytes_ - unused_memory_usage_bytes_; + } + protected: explicit ResourcePool(ResourceProvider* resource_provider); -- cgit v1.1