Index: ui/compositor/layer.h |
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h |
index a5afd6b86c853ce6becb25b56f65fd90b5c09a66..1159d0b485e83d97e8bc814dd146dd2b713ef249 100644 |
--- a/ui/compositor/layer.h |
+++ b/ui/compositor/layer.h |
@@ -17,6 +17,7 @@ |
#include "cc/base/scoped_ptr_vector.h" |
#include "cc/layers/content_layer_client.h" |
#include "cc/layers/texture_layer_client.h" |
+#include "cc/resources/texture_mailbox.h" |
#include "third_party/skia/include/core/SkColor.h" |
#include "third_party/skia/include/core/SkRegion.h" |
#include "ui/compositor/compositor.h" |
@@ -250,6 +251,11 @@ class COMPOSITOR_EXPORT Layer |
void SetExternalTexture(ui::Texture* texture); |
ui::Texture* external_texture() { return texture_.get(); } |
+ // Set new TextureMailbox for this layer. Note that |mailbox| may hold a |
+ // shared memory resource or an actual mailbox for a texture. |
+ void SetTextureMailbox(const cc::TextureMailbox& mailbox, float scale_factor); |
+ cc::TextureMailbox GetTextureMailbox(float* scale_factor); |
+ |
// Sets a delegated frame, coming from a child compositor. |
void SetDelegatedFrame(scoped_ptr<cc::DelegatedFrameData> frame, |
gfx::Size frame_size_in_dip); |
@@ -465,6 +471,12 @@ class COMPOSITOR_EXPORT Layer |
// A cached copy of |Compositor::device_scale_factor()|. |
float device_scale_factor_; |
+ // A cached copy of the TextureMailbox given texture_layer_. |
+ cc::TextureMailbox mailbox_; |
+ |
+ // Device scale factor in which mailbox_ was rendered in. |
+ float mailbox_scale_factor_; |
+ |
// The size of the delegated frame in DIP, set when SetDelegatedFrame was |
// called. |
gfx::Size delegated_frame_size_in_dip_; |