diff options
author | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 00:40:40 +0000 |
---|---|---|
committer | reveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 00:40:40 +0000 |
commit | 7f243b1dd4c8d11d48901982c39c8745405997d7 (patch) | |
tree | f428fbcc87a35041d8cf48ed28cd0802c21cd88b /cc/resource_provider.h | |
parent | 82750aa55739c6fdf3dbed1c086fca2d0e171453 (diff) | |
download | chromium_src-7f243b1dd4c8d11d48901982c39c8745405997d7.zip chromium_src-7f243b1dd4c8d11d48901982c39c8745405997d7.tar.gz chromium_src-7f243b1dd4c8d11d48901982c39c8745405997d7.tar.bz2 |
cc: Add asynchronous setPixel interface.
Implements asynchronous texture uploads using
CHROMIUM_async_pixel_transfers extension.
BUG=155209
TEST=cc_unittests
Review URL: https://chromiumcodereview.appspot.com/11412043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resource_provider.h')
-rw-r--r-- | cc/resource_provider.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/resource_provider.h b/cc/resource_provider.h index 0bbcaf8..860c6ca 100644 --- a/cc/resource_provider.h +++ b/cc/resource_provider.h @@ -222,6 +222,10 @@ public: // Update pixels from acquired pixel buffer. void setPixelsFromBuffer(ResourceId id); + // Asynchronously update pixels from acquired pixel buffer. + void beginSetPixels(ResourceId id); + bool didSetPixelsComplete(ResourceId id); + private: struct Resource { Resource(); @@ -231,6 +235,8 @@ private: unsigned glId; // Pixel buffer used for set pixels without unnecessary copying. unsigned glPixelBufferId; + // Query used to determine when asynchronous set pixels complete. + unsigned glUploadQueryId; Mailbox mailbox; uint8_t* pixels; uint8_t* pixelBuffer; @@ -240,6 +246,7 @@ private: bool external; bool exported; bool markedForDeletion; + bool pendingSetPixels; gfx::Size size; GLenum format; // TODO(skyostil): Use a separate sampler object for filter state. |