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

Unified Diff: cc/layers/layer.h

Issue 1101823002: CC Animations: Make LayerAnimationController creation optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb LayerSettings parameter for cc::Layer construction. 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
Index: cc/layers/layer.h
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 6f10725b08ff536bc30d8b4c5bb05a8198b85856..82e3a24de798c0acb6ee063fbbf0ed7d7513b224 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -58,9 +58,11 @@ class CopyOutputRequest;
class LayerAnimationEventObserver;
class LayerClient;
class LayerImpl;
+class LayerSettings;
class LayerTreeHost;
class LayerTreeHostCommon;
class LayerTreeImpl;
+class LayerTreeSettings;
class PriorityCalculator;
class RenderingStatsInstrumentation;
class ResourceUpdateQueue;
@@ -84,7 +86,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
INVALID_ID = -1,
};
- static scoped_refptr<Layer> Create();
+ static scoped_refptr<Layer> Create(const LayerSettings& settings);
int id() const { return layer_id_; }
@@ -424,10 +426,12 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
scoped_refptr<LayerAnimationController> controller);
void set_layer_animation_delegate(AnimationDelegate* delegate) {
+ DCHECK(layer_animation_controller_);
layer_animation_controller_->set_layer_animation_delegate(delegate);
}
bool HasActiveAnimation() const;
+ void RegisterForAnimations(AnimationRegistrar* registrar);
void AddLayerAnimationEventObserver(
LayerAnimationEventObserver* animation_observer);
@@ -558,7 +562,7 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
friend class TreeSynchronizer;
~Layer() override;
- Layer();
+ explicit Layer(const LayerSettings& settings);
// These SetNeeds functions are in order of severity of update:
//

Powered by Google App Engine
This is Rietveld 408576698