| Index: cc/trees/layer_tree_host.h
|
| diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
|
| index 63208b4e578c46ffa5a38107a9c5cfdb7cb290a3..eee99a01c05ee947a930199514602636070f668a 100644
|
| --- a/cc/trees/layer_tree_host.h
|
| +++ b/cc/trees/layer_tree_host.h
|
| @@ -349,6 +349,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);
|
| @@ -357,6 +359,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;
|
| @@ -581,6 +586,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_;
|
|
|
|
|