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

Unified Diff: cc/trees/property_tree.cc

Issue 2758343002: cc: Use Element Id to Record Animation Changes (Closed)
Patch Set: fix for test Created 3 years, 9 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/trees/property_tree.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index da62e3e319d7d33972852715925288622cc85f37..5733ef658d32ac72a573af0a431e9ded2fb19653 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -178,6 +178,14 @@ bool TransformTree::ComputeTranslation(int source_id,
return true;
}
+TransformNode* TransformTree::FindNodeFromElementId(ElementId id) {
+ auto iterator = property_trees()->element_id_to_transform_node_index.find(id);
+ if (iterator == property_trees()->element_id_to_transform_node_index.end())
+ return nullptr;
+
+ return Node(iterator->second);
+}
+
void TransformTree::OnTransformAnimated(const gfx::Transform& transform,
int id,
LayerTreeImpl* layer_tree_impl) {
@@ -849,6 +857,14 @@ void EffectTree::UpdateSurfaceContentsScale(EffectNode* effect_node) {
transform_tree.ToScreen(transform_node->id), layer_scale_factor);
}
+EffectNode* EffectTree::FindNodeFromElementId(ElementId id) {
+ auto iterator = property_trees()->element_id_to_effect_node_index.find(id);
+ if (iterator == property_trees()->element_id_to_effect_node_index.end())
+ return nullptr;
+
+ return Node(iterator->second);
+}
+
void EffectTree::OnOpacityAnimated(float opacity,
int id,
LayerTreeImpl* layer_tree_impl) {
« no previous file with comments | « cc/trees/property_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698