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

Unified Diff: cc/resources/resource_pool.h

Issue 817133006: Support different formats in the same resource pool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ResourceFormatUsage Created 5 years, 11 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 | « no previous file | cc/resources/resource_pool.cc » ('j') | cc/resources/resource_pool.cc » ('J')
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 e1ee35aa72c6039c01a6ae8e71eb3f4832ffe524..1dd871ebb71fc6a00465789ca564bb81300268d8 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -20,12 +20,16 @@ class CC_EXPORT ResourcePool {
public:
static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider,
GLenum target,
- ResourceFormat format) {
- return make_scoped_ptr(new ResourcePool(resource_provider, target, format));
+ bool use_memory_efficient_format) {
+ return make_scoped_ptr(new ResourcePool(resource_provider,
+ target,
+ use_memory_efficient_format));
}
virtual ~ResourcePool();
+ scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size,
+ ResourceFormat format);
scoped_ptr<ScopedResource> AcquireResource(const gfx::Size& size);
reveman 2015/01/15 16:33:11 I'd rather not have 2 of these functions. I'd pref
peterp 2015/01/16 12:10:11 Fair enough, it's been removed.
void ReleaseResource(scoped_ptr<ScopedResource>);
@@ -49,12 +53,12 @@ class CC_EXPORT ResourcePool {
}
size_t busy_resource_count() const { return busy_resources_.size(); }
- ResourceFormat resource_format() const { return format_; }
+ ResourceFormat resource_format() const;
protected:
ResourcePool(ResourceProvider* resource_provider,
GLenum target,
- ResourceFormat format);
+ bool use_memory_efficient_format);
bool ResourceUsageTooHigh();
@@ -63,7 +67,7 @@ class CC_EXPORT ResourcePool {
ResourceProvider* resource_provider_;
const GLenum target_;
- const ResourceFormat format_;
+ bool use_memory_efficient_format_;
size_t max_memory_usage_bytes_;
size_t max_unused_memory_usage_bytes_;
size_t max_resource_count_;
« no previous file with comments | « no previous file | cc/resources/resource_pool.cc » ('j') | cc/resources/resource_pool.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698