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

Unified Diff: cc/texture_layer.h

Issue 12720022: cc: add layer usage hint to texture layer Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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 | « no previous file | 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 f85edb6138e199e4be9c596caa0e6c3c7891063e..5ccca15215141975a12876e4792c12adc01aef2a 100644
--- a/cc/texture_layer.h
+++ b/cc/texture_layer.h
@@ -24,7 +24,7 @@ class CC_EXPORT TextureLayer : public Layer {
// 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* client);
+ static scoped_refptr<TextureLayer> Create(TextureLayerClient* client, bool single_buffer = false);
// Used when mailbox names are specified instead of texture IDs.
static scoped_refptr<TextureLayer> CreateForMailbox();
@@ -78,7 +78,7 @@ class CC_EXPORT TextureLayer : public Layer {
virtual bool CanClipSelf() const OVERRIDE;
protected:
- TextureLayer(TextureLayerClient* client, bool uses_mailbox);
+ TextureLayer(TextureLayerClient* client, bool uses_mailbox, bool single_buffer);
virtual ~TextureLayer();
private:
@@ -99,6 +99,9 @@ class CC_EXPORT TextureLayer : public Layer {
TextureMailbox texture_mailbox_;
bool own_mailbox_;
+ // indicate the layer usage, it's a const after set in constructor
+ bool single_buffer_;
+
DISALLOW_COPY_AND_ASSIGN(TextureLayer);
};
« no previous file with comments | « no previous file | cc/texture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698