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

Unified Diff: cc/resource_provider.h

Issue 11412043: cc: Add asynchronous setPixel interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « no previous file | 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 0bbcaf87d60d75d8e1b56dca6e463cdb24d0f081..860c6ca3a544b4cfd6cfe699083c57fb3460f3a7 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.
« no previous file with comments | « no previous file | cc/resource_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698