Index: cc/trees/layer_tree_host.h |
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h |
index bd53413faf9676bc158b369e10651f5ebd232aab..23aa6a394333fc81558b2e1f48095ad1443e00f5 100644 |
--- a/cc/trees/layer_tree_host.h |
+++ b/cc/trees/layer_tree_host.h |
@@ -36,6 +36,7 @@ |
#include "cc/surfaces/surface_sequence.h" |
#include "cc/trees/layer_tree_host_client.h" |
#include "cc/trees/layer_tree_host_common.h" |
+#include "cc/trees/layer_tree_mutators_client.h" |
#include "cc/trees/layer_tree_settings.h" |
#include "cc/trees/proxy.h" |
#include "cc/trees/swap_promise_monitor.h" |
@@ -48,6 +49,7 @@ class GpuMemoryBufferManager; |
namespace cc { |
class AnimationRegistrar; |
+class AnimationHost; |
class BeginFrameSource; |
class HeadsUpDisplayLayer; |
class Layer; |
@@ -70,7 +72,7 @@ struct RenderingStats; |
struct ScrollAndScaleSet; |
enum class GpuRasterizationStatus; |
-class CC_EXPORT LayerTreeHost { |
+class CC_EXPORT LayerTreeHost : public LayerTreeMutatorsClient { |
public: |
// The SharedBitmapManager will be used on the compositor thread. |
static scoped_ptr<LayerTreeHost> CreateThreaded( |
@@ -257,6 +259,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_; } |
@@ -310,6 +313,27 @@ class CC_EXPORT LayerTreeHost { |
PropertyTrees* property_trees() { return &property_trees_; } |
+ Layer* LayerById(int id) const; |
+ void RegisterLayer(Layer* layer); |
+ void UnregisterLayer(Layer* layer); |
+ // LayerTreeMutatorsClient implementation. |
+ bool IsLayerInActiveTree(int layer_id) const override; |
+ bool IsLayerInPendingTree(int layer_id) const override; |
+ void SetMutatorsNeedCommit() override; |
+ void SetLayerFilterMutated(int layer_id, |
+ bool active_tree, |
+ const FilterOperations& filters) override; |
+ void SetLayerOpacityMutated(int layer_id, |
+ bool active_tree, |
+ float opacity) override; |
+ void SetLayerTransformMutated(int layer_id, |
+ bool active_tree, |
+ const gfx::Transform& transform) override; |
+ void SetLayerScrollOffsetMutated( |
+ int layer_id, |
+ bool active_tree, |
+ const gfx::ScrollOffset& scroll_offset) override; |
+ |
protected: |
LayerTreeHost(LayerTreeHostClient* client, |
SharedBitmapManager* shared_bitmap_manager, |
@@ -426,6 +450,7 @@ class CC_EXPORT LayerTreeHost { |
size_t partial_texture_update_requests_; |
scoped_ptr<AnimationRegistrar> animation_registrar_; |
+ scoped_ptr<AnimationHost> animation_host_; |
scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
@@ -454,6 +479,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_; |