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

Unified Diff: cc/resources/resource_pool.h

Issue 83883002: cc: Allow TEXTURE_RECTANGLE_ARB to be used for tile textures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review feedback Created 7 years, 1 month 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/resources/raster_worker_pool_unittest.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 de63d97517d35651c4ccce696747e950ba3449db..74175ed2f37ed5f8b2566fcc26bedce6b5f25bf8 100644
--- a/cc/resources/resource_pool.h
+++ b/cc/resources/resource_pool.h
@@ -21,6 +21,7 @@ class CC_EXPORT ResourcePool {
public:
Resource(ResourceProvider* resource_provider,
gfx::Size size,
+ GLenum target,
ResourceFormat format);
~Resource();
@@ -30,14 +31,17 @@ class CC_EXPORT ResourcePool {
DISALLOW_COPY_AND_ASSIGN(Resource);
};
- static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider) {
- return make_scoped_ptr(new ResourcePool(resource_provider));
+ static scoped_ptr<ResourcePool> Create(ResourceProvider* resource_provider,
+ GLenum target,
+ ResourceFormat format) {
+ return make_scoped_ptr(new ResourcePool(resource_provider,
+ target,
+ format));
}
virtual ~ResourcePool();
- scoped_ptr<ResourcePool::Resource> AcquireResource(
- gfx::Size size, ResourceFormat format);
+ scoped_ptr<ResourcePool::Resource> AcquireResource(gfx::Size size);
void ReleaseResource(scoped_ptr<ResourcePool::Resource>);
void SetResourceUsageLimits(size_t max_memory_usage_bytes,
@@ -58,7 +62,9 @@ class CC_EXPORT ResourcePool {
}
protected:
- explicit ResourcePool(ResourceProvider* resource_provider);
+ ResourcePool(ResourceProvider* resource_provider,
+ GLenum target,
+ ResourceFormat format);
bool ResourceUsageTooHigh();
@@ -66,6 +72,8 @@ class CC_EXPORT ResourcePool {
void DidFinishUsingResource(ResourcePool::Resource* resource);
ResourceProvider* resource_provider_;
+ const GLenum target_;
+ const ResourceFormat format_;
size_t max_memory_usage_bytes_;
size_t max_unused_memory_usage_bytes_;
size_t max_resource_count_;
« no previous file with comments | « cc/resources/raster_worker_pool_unittest.cc ('k') | cc/resources/resource_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698