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

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: Clean up. 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 3dbd1733b0b2982eacc194383e25f1dcc12a441e..ee279c7150942e8a8a33ddbae1b5fb53e44da13e 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -88,6 +88,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 SetCompositorRootLayer(scoped_refptr<cc::Layer> root_layer);
ajuma 2015/04/24 16:02:16 SetCompositorRootCCLayer maybe? (so the difference
loyso (OOO) 2015/04/27 06:34:08 Done.
+ void ResetCompositor();
LayerDelegate* delegate() { return delegate_; }
void set_delegate(LayerDelegate* delegate) { delegate_ = delegate; }
@@ -140,6 +142,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;
@@ -347,7 +351,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(
@@ -413,6 +417,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