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

Unified Diff: ui/compositor/layer.h

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Fix code review issues. Created 5 years, 8 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
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index bb8b1af6de89c7dd944136a3df2c4b080d88b62b..17cfb7500e78cb6239e65a569dd991a20b5b3d74 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -89,6 +89,8 @@ 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 SetCompositorRootCCLayer(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(
@@ -416,6 +420,10 @@ class COMPOSITOR_EXPORT Layer
// Creates a corresponding composited layer for |type_|.
void CreateCcLayer();
+ // Attach/Detach CC Layer animation event observers.
+ void AttachAnimationObservers();
+ void DetachAnimationObservers();
+
// Recomputes and sets to |cc_layer_|.
void RecomputeDrawsContentAndUVRect();
void RecomputePosition();
« no previous file with comments | « ui/compositor/dip_util.cc ('k') | ui/compositor/layer.cc » ('j') | ui/compositor/layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698