Index: cc/texture_layer.h |
diff --git a/cc/texture_layer.h b/cc/texture_layer.h |
index 2e7921e4bd33ca6a315ed224c1f462eebb3e945a..381c9c51ac71864afdec29b655b409a65aad443e 100644 |
--- a/cc/texture_layer.h |
+++ b/cc/texture_layer.h |
@@ -5,6 +5,9 @@ |
#ifndef CC_TEXTURE_LAYER_H_ |
#define CC_TEXTURE_LAYER_H_ |
+#include <string> |
+ |
+#include "base/callback.h" |
#include "cc/cc_export.h" |
#include "cc/layer.h" |
@@ -24,6 +27,9 @@ public: |
// are driven by an external process. |
static scoped_refptr<TextureLayer> create(TextureLayerClient*); |
+ // Used when mailbox names are specified instead of texture id's |
danakj
2013/01/02 16:17:22
nit: "IDs"
|
+ static scoped_refptr<TextureLayer> createMailboxLayer(); |
danakj
2013/01/02 16:17:22
nit: createForMailbox? "MailboxLayer" sounds like
|
+ |
void clearClient() { m_client = 0; } |
virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERRIDE; |
@@ -48,6 +54,10 @@ public: |
// Code path for plugins which supply their own texture ID. |
void setTextureId(unsigned); |
+ // Code path for plugins which supply their own texture ID. |
+ void setTextureMailbox(const std::string&, |
+ const base::Callback<void(unsigned)>&); |
+ |
void willModifyTexture(); |
virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; |
@@ -59,11 +69,13 @@ public: |
virtual bool blocksPendingCommit() const OVERRIDE; |
protected: |
- explicit TextureLayer(TextureLayerClient*); |
+ TextureLayer(TextureLayerClient*, bool mailboxLayer); |
danakj
2013/01/02 16:17:22
nit: "usesMailbox"?
|
virtual ~TextureLayer(); |
private: |
TextureLayerClient* m_client; |
+ bool m_mailboxLayer; |
+ base::Callback<void(unsigned)> m_mailboxReleaseCallback; |
bool m_flipped; |
gfx::RectF m_uvRect; |
@@ -75,6 +87,7 @@ private: |
bool m_contentCommitted; |
unsigned m_textureId; |
+ std::string m_mailboxName; |
}; |
} |