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

Unified Diff: cc/resources/resource_pool.cc

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review comments Created 7 years, 3 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
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index afcc114a96342b73fe27b49c4f4a3e5f4f5325f1..262bac7604e64e70aa84c3ba807f639016f50697 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -10,13 +10,15 @@ namespace cc {
ResourcePool::Resource::Resource(cc::ResourceProvider* resource_provider,
gfx::Size size,
- GLenum format)
+ GLenum format,
epennerAtGoogle 2013/09/06 03:24:44 Again, I we should be able to have one Enum that f
+ cc::ResourceProvider::TextureType type)
: cc::Resource(resource_provider->CreateManagedResource(
size,
format,
ResourceProvider::TextureUsageAny),
size,
- format),
+ format,
+ type),
resource_provider_(resource_provider) {
DCHECK(id());
}
@@ -42,7 +44,7 @@ ResourcePool::~ResourcePool() {
}
scoped_ptr<ResourcePool::Resource> ResourcePool::AcquireResource(
- gfx::Size size, GLenum format) {
+ gfx::Size size, GLenum format, ResourceProvider::TextureType type) {
for (ResourceList::iterator it = unused_resources_.begin();
it != unused_resources_.end(); ++it) {
Resource* resource = *it;
@@ -60,7 +62,8 @@ scoped_ptr<ResourcePool::Resource> ResourcePool::AcquireResource(
}
// Create new resource.
- Resource* resource = new Resource(resource_provider_, size, format);
+ Resource* resource = new Resource(
+ resource_provider_, size, format, type);
// Extend all read locks on all resources until the resource is
// finished being used, such that we know when resources are

Powered by Google App Engine
This is Rietveld 408576698