| Index: cc/resource_provider.h
|
| diff --git a/cc/resource_provider.h b/cc/resource_provider.h
|
| index d90d2244340edfdc731913b8505f1dde6c5e4005..af271eb702277502879f4cfa8397947d670c7777 100644
|
| --- a/cc/resource_provider.h
|
| +++ b/cc/resource_provider.h
|
| @@ -5,7 +5,12 @@
|
| #ifndef CC_RESOURCE_PROVIDER_H_
|
| #define CC_RESOURCE_PROVIDER_H_
|
|
|
| +#include <deque>
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| #include "base/basictypes.h"
|
| +#include "base/callback.h"
|
| #include "base/hash_tables.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/threading/thread_checker.h"
|
| @@ -17,8 +22,6 @@
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
| #include "third_party/skia/include/core/SkCanvas.h"
|
| #include "ui/gfx/size.h"
|
| -#include <deque>
|
| -#include <vector>
|
|
|
| namespace WebKit {
|
| class WebGraphicsContext3D;
|
| @@ -82,6 +85,9 @@ public:
|
| // Wraps an external texture into a GL resource.
|
| ResourceId createResourceFromExternalTexture(unsigned textureId);
|
|
|
| + // Wraps an external texture mailbox into a GL resource.
|
| + ResourceId createResourceFromTextureMailbox(const std::string& mailboxName, const base::Callback<void(unsigned)>& releaseCallback);
|
| +
|
| void deleteResource(ResourceId);
|
|
|
| // Update pixels from image, copying sourceRect (in image) into destRect (in the resource).
|
| @@ -233,6 +239,7 @@ public:
|
| private:
|
| struct Resource {
|
| Resource();
|
| + ~Resource();
|
| Resource(unsigned textureId, const gfx::Size& size, GLenum format, GLenum filter);
|
| Resource(uint8_t* pixels, const gfx::Size& size, GLenum format, GLenum filter);
|
|
|
| @@ -242,6 +249,7 @@ private:
|
| // Query used to determine when asynchronous set pixels complete.
|
| unsigned glUploadQueryId;
|
| Mailbox mailbox;
|
| + base::Callback<void(unsigned)> mailboxReleaseCallback;
|
| uint8_t* pixels;
|
| uint8_t* pixelBuffer;
|
| int lockForReadCount;
|
|
|