Index: cc/trees/layer_tree_host.h |
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h |
index 8a522d6008657323ffcc81ab6c04d90ad7b9bce4..4aa6f7c6a2497efd47a1209ffe9f98ee0eed1169 100644 |
--- a/cc/trees/layer_tree_host.h |
+++ b/cc/trees/layer_tree_host.h |
@@ -347,6 +347,8 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { |
} |
Layer* LayerById(int id) const; |
+ Layer* LayerForElementId(ElementId element_id) const; |
+ Layer* ScrollLayerForElementId(ElementId element_id) const; |
void AddLayerShouldPushProperties(Layer* layer); |
void RemoveLayerShouldPushProperties(Layer* layer); |
@@ -355,6 +357,9 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { |
void RegisterLayer(Layer* layer); |
void UnregisterLayer(Layer* layer); |
+ void RegisterLayerForElementId(Layer* layer); |
+ void UnregisterLayerForElementId(Layer* layer); |
+ |
// MutatorHostClient implementation. |
bool IsElementInList(ElementId element_id, |
ElementListType list_type) const override; |
@@ -579,6 +584,16 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient { |
using LayerIdMap = std::unordered_map<int, Layer*>; |
LayerIdMap layer_id_map_; |
+ |
+ struct ElementLayers { |
+ // Transform, filter and opacity mutations apply to this layer. |
+ Layer* main = nullptr; |
+ // Scroll mutations apply to this layer. |
+ Layer* scroll = nullptr; |
+ }; |
+ using ElementIdToLayerMap = std::unordered_map<ElementId, ElementLayers>; |
+ ElementIdToLayerMap element_id_to_layer_map_; |
+ |
// Set of layers that need to push properties. |
std::unordered_set<Layer*> layers_that_should_push_properties_; |