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

Unified Diff: cc/trees/layer_tree_host.h

Issue 1973083002: Use element id's for animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get element id's from scroll node data directly. Created 4 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/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 99e3137de40b19941a20e34fd578eb4709513574..0fef1ad7d25082e8dc04b2fdca82eea6840af21c 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -350,6 +350,10 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
Layer* LayerById(int id) const;
+ Layer* LayerByElementId(ElementId element_id) const;
+ void AddToElementMap(Layer* layer);
+ void RemoveFromElementMap(Layer* layer);
+
void AddLayerShouldPushProperties(Layer* layer);
void RemoveLayerShouldPushProperties(Layer* layer);
std::unordered_set<Layer*>& LayersThatShouldPushProperties();
@@ -423,6 +427,8 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
bool IsRemoteClient() const;
void BuildPropertyTreesForTesting();
+ void SetElementIdsForTesting();
+
ImageSerializationProcessor* image_serialization_processor() const {
return image_serialization_processor_;
}
@@ -593,6 +599,10 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
using LayerIdMap = std::unordered_map<int, Layer*>;
LayerIdMap layer_id_map_;
+
+ using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
+ ElementLayersMap element_layers_map_;
+
// Set of layers that need to push properties.
std::unordered_set<Layer*> layers_that_should_push_properties_;

Powered by Google App Engine
This is Rietveld 408576698