Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: cc/resources/resource_pool.h

Issue 12502016: cc: Add command line switch to control resource usage for impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/base/switches.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool.h
diff --git a/cc/resources/resource_pool.h b/cc/resources/resource_pool.h
index f8f52ac701e30f34b6634329df7cbf46909d87af..a73207a3c9f4bcb40e2180a9a1cbf42dd26674df 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -42,15 +42,21 @@ class CC_EXPORT ResourcePool {
const gfx::Size&, GLenum format);
void ReleaseResource(scoped_ptr<ResourcePool::Resource>);
- void SetMaxMemoryUsageBytes(size_t max_memory_usage_bytes);
+ void SetMaxMemoryUsageBytes(
+ size_t max_memory_usage_bytes,
+ size_t max_unused_memory_usage_bytes);
protected:
explicit ResourcePool(ResourceProvider* resource_provider);
+ bool MemoryUsageTooHigh();
+
private:
ResourceProvider* resource_provider_;
size_t max_memory_usage_bytes_;
+ size_t max_unused_memory_usage_bytes_;
size_t memory_usage_bytes_;
+ size_t unused_memory_usage_bytes_;
typedef std::list<Resource*> ResourceList;
ResourceList resources_;
« no previous file with comments | « cc/base/switches.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698