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

Unified Diff: cc/resource_provider.h

Issue 11622008: cc: Defer texture allocation (to allow async allocations). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix remaining tests. 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
Index: cc/resource_provider.h
diff --git a/cc/resource_provider.h b/cc/resource_provider.h
index d90d2244340edfdc731913b8505f1dde6c5e4005..9b5b54b63475a413d3b65ca32d761f5cc6e856de 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -230,6 +230,10 @@ public:
void beginSetPixels(ResourceId id);
bool didSetPixelsComplete(ResourceId id);
+ // For tests only! This prevents detecting uninitialized reads.
+ // Use setPixels or lockForWrite to allocate implicitly.
+ void allocateForTesting(ResourceId id);
+
private:
struct Resource {
Resource();
@@ -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,7 @@ private:
bool transferResource(WebKit::WebGraphicsContext3D*, ResourceId, TransferableResource*);
void deleteResourceInternal(ResourceMap::iterator it);
+ void lazyAllocate(Resource*);
OutputSurface* m_outputSurface;
ResourceId m_nextId;

Powered by Google App Engine
This is Rietveld 408576698