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

Unified Diff: cc/texture_layer.h

Issue 11638028: Mailbox support for texture layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 7 years, 11 months 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 | « cc/resource_provider.cc ('k') | cc/texture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer.h
diff --git a/cc/texture_layer.h b/cc/texture_layer.h
index 2e7921e4bd33ca6a315ed224c1f462eebb3e945a..4fea928d964eaf449eb6f552336df6e6fa48a216 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"
@@ -19,11 +22,16 @@ class TextureLayerClient;
// A Layer containing a the rendered output of a plugin instance.
class CC_EXPORT TextureLayer : public Layer {
public:
+ typedef base::Callback<void(unsigned)> MailboxCallback;
+
// If this texture layer requires special preparation logic for each frame driven by
// the compositor, pass in a non-nil client. Pass in a nil client pointer if texture updates
// are driven by an external process.
static scoped_refptr<TextureLayer> create(TextureLayerClient*);
+ // Used when mailbox names are specified instead of texture IDs.
+ static scoped_refptr<TextureLayer> createForMailbox();
+
void clearClient() { m_client = 0; }
virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl* treeImpl) OVERRIDE;
@@ -48,6 +56,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&, const MailboxCallback&);
+
void willModifyTexture();
virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE;
@@ -59,11 +70,13 @@ public:
virtual bool blocksPendingCommit() const OVERRIDE;
protected:
- explicit TextureLayer(TextureLayerClient*);
+ TextureLayer(TextureLayerClient*, bool usesMailbox);
virtual ~TextureLayer();
private:
TextureLayerClient* m_client;
+ bool m_usesMailbox;
+ MailboxCallback m_mailboxReleaseCallback;
bool m_flipped;
gfx::RectF m_uvRect;
@@ -75,6 +88,7 @@ private:
bool m_contentCommitted;
unsigned m_textureId;
+ std::string m_mailboxName;
};
}
« no previous file with comments | « cc/resource_provider.cc ('k') | cc/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698