Index: cc/resource_provider.h |
diff --git a/cc/resource_provider.h b/cc/resource_provider.h |
index e75cda6e56807310ae874131492fed7a03a04519..60a7a21f4ad8057e6914c0db5d7cd91d8711015c 100644 |
--- a/cc/resource_provider.h |
+++ b/cc/resource_provider.h |
@@ -197,6 +197,16 @@ public: |
DISALLOW_COPY_AND_ASSIGN(ScopedWriteLockSoftware); |
}; |
+ // This set of functions can be used to asynchronously set pixel values |
+ // for a resource. |
+ void acquirePixelBuffer(ResourceId id); |
+ void releasePixelBuffer(ResourceId id); |
+ uint8_t* mapPixelBuffer(ResourceId id); |
+ void unmapPixelBuffer(ResourceId id); |
+ void beginSetPixels(ResourceId id); |
+ bool didSetPixelsComplete(ResourceId id); |
+ void abortSetPixels(ResourceId id); |
+ |
private: |
struct Resource { |
Resource(); |
@@ -204,8 +214,13 @@ private: |
Resource(uint8_t* pixels, int pool, const gfx::Size& size, GLenum format); |
unsigned glId; |
+ // Pixel buffer used for asynchronous set pixels. |
+ unsigned glPixelBufferId; |
+ // Query used to determine when asynchronous set pixels complete. |
+ unsigned glUploadQueryId; |
Mailbox mailbox; |
uint8_t* pixels; |
+ uint8_t* pixelBuffer; |
int pool; |
int lockForReadCount; |
bool lockedForWrite; |