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

Unified Diff: ui/compositor/layer.h

Issue 15001027: [Aura] Added Support for rendering software compositor frames as cc::TextureLayers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passed(&foo) instead for Passed(foo.Pass()). Created 7 years, 6 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 | « ui/aura/window.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « ui/aura/window.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698