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

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: Rebase. Rebase test fixes. Created 7 years, 11 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
« no previous file with comments | « cc/layer_tree_host_impl_unittest.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 af271eb702277502879f4cfa8397947d670c7777..56c0f8d71819a1cbc3d74638f6f542aa5b87178f 100644
--- a/cc/resource_provider.h
+++ b/cc/resource_provider.h
@@ -236,6 +236,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();
@@ -258,6 +262,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.
@@ -285,6 +290,7 @@ private:
bool transferResource(WebKit::WebGraphicsContext3D*, ResourceId, TransferableResource*);
void deleteResourceInternal(ResourceMap::iterator it);
+ void lazyAllocate(Resource*);
OutputSurface* m_outputSurface;
ResourceId m_nextId;
« no previous file with comments | « cc/layer_tree_host_impl_unittest.cc ('k') | cc/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698