Index: cc/texture_layer.h |
diff --git a/cc/texture_layer.h b/cc/texture_layer.h |
index 2e7921e4bd33ca6a315ed224c1f462eebb3e945a..617eaf407d493a62e6c7ded266b01013314155b9 100644 |
--- a/cc/texture_layer.h |
+++ b/cc/texture_layer.h |
@@ -5,6 +5,8 @@ |
#ifndef CC_TEXTURE_LAYER_H_ |
#define CC_TEXTURE_LAYER_H_ |
+#include <string> |
+ |
#include "cc/cc_export.h" |
#include "cc/layer.h" |
@@ -15,6 +17,7 @@ class WebGraphicsContext3D; |
namespace cc { |
class TextureLayerClient; |
+class MailboxReleaseClient; |
// A Layer containing a the rendered output of a plugin instance. |
class CC_EXPORT TextureLayer : public Layer { |
@@ -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 |
+ static scoped_refptr<TextureLayer> createWithMailboxClient(MailboxReleaseClient*); |
danakj
2012/12/20 02:16:19
Instead of using a client, can we use a base::bind
alexst (slow to review)
2012/12/21 14:15:21
I was thinking of trying this approach myself. New
|
+ |
void clearClient() { m_client = 0; } |
virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERRIDE; |
@@ -48,6 +54,9 @@ 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&); |
+ |
void willModifyTexture(); |
virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; |
@@ -59,11 +68,12 @@ public: |
virtual bool blocksPendingCommit() const OVERRIDE; |
protected: |
- explicit TextureLayer(TextureLayerClient*); |
+ TextureLayer(TextureLayerClient*, MailboxReleaseClient*); |
virtual ~TextureLayer(); |
private: |
TextureLayerClient* m_client; |
+ MailboxReleaseClient* m_mailboxClient; |
bool m_flipped; |
gfx::RectF m_uvRect; |
@@ -75,6 +85,7 @@ private: |
bool m_contentCommitted; |
unsigned m_textureId; |
+ std::string m_mailboxName; |
}; |
} |