Index: cc/resource_provider.h |
diff --git a/cc/resource_provider.h b/cc/resource_provider.h |
index d90d2244340edfdc731913b8505f1dde6c5e4005..76e889bfaa57b56a6c056f77db9a0ee0aa630b55 100644 |
--- a/cc/resource_provider.h |
+++ b/cc/resource_provider.h |
@@ -75,6 +75,10 @@ public: |
// Creates a resource which is tagged as being managed for GPU memory accounting purposes. |
ResourceId createManagedResource(const gfx::Size&, GLenum format, TextureUsageHint); |
+ // For tests only! Otherwise, implicitly allocate via lockForWrite or setPixels variant. |
+ ResourceId createAllocatedResource(const gfx::Size&, GLenum format, TextureUsageHint); |
+ ResourceId createAllocatedManagedResource(const gfx::Size&, GLenum format, TextureUsageHint); |
piman
2012/12/18 22:41:38
How about one explicit allocateResourceForTest(Res
|
+ |
// You can also explicitly create a specific resource type. |
ResourceId createGLTexture(const gfx::Size&, GLenum format, GLenum texturePool, TextureUsageHint); |
@@ -250,6 +254,7 @@ private: |
bool exported; |
bool markedForDeletion; |
bool pendingSetPixels; |
+ bool allocated; |
gfx::Size size; |
GLenum format; |
// TODO(skyostil): Use a separate sampler object for filter state. |
@@ -277,6 +282,8 @@ private: |
bool transferResource(WebKit::WebGraphicsContext3D*, ResourceId, TransferableResource*); |
void deleteResourceInternal(ResourceMap::iterator it); |
+ void lazyAllocate(ResourceId); |
+ void lazyAllocate(Resource*); |
OutputSurface* m_outputSurface; |
ResourceId m_nextId; |