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

Unified Diff: ui/compositor/layer.h

Issue 1159633002: Clean up ui<->cc layers interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/compositor/dip_util.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 bb8b1af6de89c7dd944136a3df2c4b080d88b62b..2fe660c5b71d1e1e052584126776a8a4447a7cc8 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -88,7 +88,9 @@ class COMPOSITOR_EXPORT Layer
// Called by the compositor when the Layer is set as its root Layer. This can
// only ever be called on the root layer.
- void SetCompositor(Compositor* compositor);
+ void SetCompositor(Compositor* compositor,
+ scoped_refptr<cc::Layer> root_layer);
+ void ResetCompositor();
LayerDelegate* delegate() { return delegate_; }
void set_delegate(LayerDelegate* delegate) { delegate_ = delegate; }
@@ -141,6 +143,8 @@ class COMPOSITOR_EXPORT Layer
void SetTransform(const gfx::Transform& transform);
gfx::Transform transform() const;
+ gfx::PointF position() const { return cc_layer_->position(); }
+
// Return the target transform if animator is running, or the current
// transform otherwise.
gfx::Transform GetTargetTransform() const;
@@ -350,7 +354,7 @@ class COMPOSITOR_EXPORT Layer
ContentLayerClient::PaintingControlSetting painting_control) override;
bool FillsBoundsCompletely() const override;
- cc::Layer* cc_layer() { return cc_layer_; }
+ cc::Layer* cc_layer_for_testing() { return cc_layer_; }
// TextureLayerClient
bool PrepareTextureMailbox(
« no previous file with comments | « ui/compositor/dip_util.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698