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

Unified Diff: cc/texture_layer_impl.h

Issue 11638028: Mailbox support for texture layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting 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
Index: cc/texture_layer_impl.h
diff --git a/cc/texture_layer_impl.h b/cc/texture_layer_impl.h
index 47e9ca5686364fc635dbf8125c93cac023ff29b5..a3eb4147ef3fcb8a2f3ccfd338f95ac892850e0c 100644
--- a/cc/texture_layer_impl.h
+++ b/cc/texture_layer_impl.h
@@ -5,6 +5,8 @@
#ifndef CC_TEXTURE_LAYER_IMPL_H_
#define CC_TEXTURE_LAYER_IMPL_H_
+#include <string>
danakj 2013/01/02 16:17:22 nit: space below <> headers
+#include "base/callback.h"
#include "cc/cc_export.h"
#include "cc/layer_impl.h"
@@ -12,9 +14,9 @@ namespace cc {
class CC_EXPORT TextureLayerImpl : public LayerImpl {
public:
- static scoped_ptr<TextureLayerImpl> create(LayerTreeImpl* treeImpl, int id)
+ static scoped_ptr<TextureLayerImpl> create(LayerTreeImpl* treeImpl, int id, bool mailboxLayer = false)
danakj 2013/01/02 16:17:22 no default values for parameters in chromium style
{
- return make_scoped_ptr(new TextureLayerImpl(treeImpl, id));
+ return make_scoped_ptr(new TextureLayerImpl(treeImpl, id, mailboxLayer));
}
virtual ~TextureLayerImpl();
@@ -37,17 +39,27 @@ public:
// 0--3
void setVertexOpacity(const float vertexOpacity[4]);
+ void setTextureMailbox(const std::string& mailboxName,
danakj 2013/01/02 16:17:22 nit: don't line split (old style here still), or p
alexst (slow to review) 2013/01/02 19:31:35 Done.
+ const base::Callback<void(unsigned)>& releaseCallback);
+
private:
- TextureLayerImpl(LayerTreeImpl* treeImpl, int id);
+ TextureLayerImpl(LayerTreeImpl* treeImpl, int id, bool mailboxLayer);
virtual const char* layerTypeAsString() const OVERRIDE;
+ void handleMailboxResources(ResourceProvider*);
+
unsigned m_textureId;
ResourceProvider::ResourceId m_externalTextureResource;
bool m_premultipliedAlpha;
bool m_flipped;
gfx::RectF m_uvRect;
float m_vertexOpacity[4];
+
+ bool m_newMailboxPending;
+ std::string m_mailboxName;
+ bool m_mailboxLayer;
+ base::Callback<void(unsigned)> m_mailboxReleaseCallback;
};
}

Powered by Google App Engine
This is Rietveld 408576698