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

Unified Diff: cc/trees/layer_tree_host.h

Issue 947033002: CC Animations: Establish AnimationHost, AnimationTimeline and AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix MSVC warning. Created 5 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 | « cc/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 1c867bec5ee852a7e5e7aa36e4950189d2a11b99..d18d7dabf57baeca514668bcbe72ab82c03d57b8 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -38,6 +38,7 @@
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_host_common.h"
#include "cc/trees/layer_tree_settings.h"
+#include "cc/trees/mutator_host_client.h"
#include "cc/trees/proxy.h"
#include "cc/trees/swap_promise_monitor.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -49,6 +50,7 @@ class GpuMemoryBufferManager;
namespace cc {
class AnimationRegistrar;
+class AnimationHost;
class BeginFrameSource;
class HeadsUpDisplayLayer;
class Layer;
@@ -68,7 +70,7 @@ struct PendingPageScaleAnimation;
struct RenderingStats;
struct ScrollAndScaleSet;
-class CC_EXPORT LayerTreeHost {
+class CC_EXPORT LayerTreeHost : public MutatorHostClient {
public:
// TODO(sad): InitParams should be a movable type so that it can be
// std::move()d to the Create* functions.
@@ -258,6 +260,7 @@ class CC_EXPORT LayerTreeHost {
AnimationRegistrar* animation_registrar() const {
return animation_registrar_.get();
}
+ AnimationHost* animation_host() const { return animation_host_.get(); }
bool in_paint_layer_contents() const { return in_paint_layer_contents_; }
@@ -318,6 +321,26 @@ class CC_EXPORT LayerTreeHost {
scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events);
+ Layer* LayerById(int id) const;
+ void RegisterLayer(Layer* layer);
+ void UnregisterLayer(Layer* layer);
+ // LayerTreeMutatorsClient implementation.
+ bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override;
+ void SetMutatorsNeedCommit() override;
+ void SetLayerFilterMutated(int layer_id,
+ LayerTreeType tree_type,
+ const FilterOperations& filters) override;
+ void SetLayerOpacityMutated(int layer_id,
+ LayerTreeType tree_type,
+ float opacity) override;
+ void SetLayerTransformMutated(int layer_id,
+ LayerTreeType tree_type,
+ const gfx::Transform& transform) override;
+ void SetLayerScrollOffsetMutated(
+ int layer_id,
+ LayerTreeType tree_type,
+ const gfx::ScrollOffset& scroll_offset) override;
+
protected:
explicit LayerTreeHost(InitParams* params);
void InitializeThreaded(
@@ -420,6 +443,7 @@ class CC_EXPORT LayerTreeHost {
bool has_transparent_background_;
scoped_ptr<AnimationRegistrar> animation_registrar_;
+ scoped_ptr<AnimationHost> animation_host_;
scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
@@ -448,6 +472,9 @@ class CC_EXPORT LayerTreeHost {
PropertyTrees property_trees_;
+ typedef base::hash_map<int, Layer*> LayerIdMap;
+ LayerIdMap layer_id_map_;
+
uint32_t surface_id_namespace_;
uint32_t next_surface_sequence_;
« no previous file with comments | « cc/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698