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

Unified Diff: cc/resource_provider.h

Issue 11578019: Remove the pools from the ResourceProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against HEAD Created 8 years 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/resource_pool.cc ('k') | cc/resource_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resource_provider.h
diff --git a/cc/resource_provider.h b/cc/resource_provider.h
index 730d9b44a1584f04dd8e5050e2d762b6d33ece97..6d951dfab17c85d750c7238f8e3990da59eb935b 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -40,7 +40,10 @@ public:
typedef unsigned ResourceId;
typedef std::vector<ResourceId> ResourceIdArray;
typedef base::hash_map<ResourceId, ResourceId> ResourceIdMap;
- enum TextureUsageHint { TextureUsageAny, TextureUsageFramebuffer };
+ enum TextureUsageHint {
+ TextureUsageAny,
+ TextureUsageFramebuffer,
+ };
enum ResourceType {
GLTexture = 1,
Bitmap,
@@ -67,19 +70,16 @@ public:
ResourceType resourceType(ResourceId);
// Creates a resource of the default resource type.
- ResourceId createResource(int pool, const gfx::Size&, GLenum format, TextureUsageHint);
+ ResourceId createResource(const gfx::Size&, GLenum format, TextureUsageHint);
// You can also explicitly create a specific resource type.
- ResourceId createGLTexture(int pool, const gfx::Size&, GLenum format, TextureUsageHint);
- ResourceId createBitmap(int pool, const gfx::Size&);
+ ResourceId createGLTexture(const gfx::Size&, GLenum format, TextureUsageHint);
+ ResourceId createBitmap(const gfx::Size&);
// Wraps an external texture into a GL resource.
ResourceId createResourceFromExternalTexture(unsigned textureId);
void deleteResource(ResourceId);
- // Deletes all resources owned by a given pool.
- void deleteOwnedResources(int pool);
-
// Update pixels from image, copying sourceRect (in image) into destRect (in the resource).
void setPixels(ResourceId, const uint8_t* image, const gfx::Rect& imageRect, const gfx::Rect& sourceRect, const gfx::Vector2d& destOffset);
@@ -97,11 +97,10 @@ public:
// Returns true if the shallow flush occurred, false otherwise.
bool shallowFlushIfSupported();
- // Creates accounting for a child, and associate it with a pool. Resources
- // transfered from that child will go to that pool. Returns a child ID.
- int createChild(int pool);
+ // Creates accounting for a child. Returns a child ID.
+ int createChild();
- // Destroys accounting for the child, deleting all resources from that pool.
+ // Destroys accounting for the child, deleting all accounted resources.
void destroyChild(int child);
// Gets the child->parent resource ID map.
@@ -230,8 +229,8 @@ public:
private:
struct Resource {
Resource();
- Resource(unsigned textureId, int pool, const gfx::Size& size, GLenum format, GLenum filter);
- Resource(uint8_t* pixels, int pool, const gfx::Size& size, GLenum format, GLenum filter);
+ Resource(unsigned textureId, const gfx::Size& size, GLenum format, GLenum filter);
+ Resource(uint8_t* pixels, const gfx::Size& size, GLenum format, GLenum filter);
unsigned glId;
// Pixel buffer used for set pixels without unnecessary copying.
@@ -241,7 +240,6 @@ private:
Mailbox mailbox;
uint8_t* pixels;
uint8_t* pixelBuffer;
- int pool;
int lockForReadCount;
bool lockedForWrite;
bool external;
@@ -259,7 +257,6 @@ private:
Child();
~Child();
- int pool;
ResourceIdMap childToParentMap;
ResourceIdMap parentToChildMap;
};
« no previous file with comments | « cc/resource_pool.cc ('k') | cc/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698