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

Unified Diff: cc/trees/element_id.h

Issue 2816063003: Replace layer id with Element id for tracking scrollbar animation controllers (Closed)
Patch Set: Update element_id comment, some cleanups per reviewer comments Created 3 years, 8 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/test/fake_painted_scrollbar_layer.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/element_id.h
diff --git a/cc/trees/element_id.h b/cc/trees/element_id.h
index 74de4c9995f9ea84733dcd2cf2520e3c17695c10..13077a3f7f6d6b57ed68ea3142d6a57145587bc0 100644
--- a/cc/trees/element_id.h
+++ b/cc/trees/element_id.h
@@ -24,16 +24,19 @@ class TracedValue;
namespace cc {
pdr. 2017/04/18 18:26:49 I've split out the update to this comment in https
-// An "element" is really an animation target. It retains the name element to be
-// symmetric with ElementAnimations and blink::ElementAnimations, but is not
-// in fact tied to the notion of a blink element. It is also not associated with
-// the notion of a Layer. Ultimately, these ids will be used to look up the
-// property tree node associated with the given animation.
+// Element ids are chosen by cc's clients and can be used as a stable identifier
+// across updates.
//
-// These ids are chosen by cc's clients to permit the destruction and
-// restoration of cc entities (when visuals are hidden and shown) but maintain
-// stable identifiers. There will be a single layer for an ElementId, but
-// not every layer will have an id.
+// Historically, the layer tree stored all compositing data but this has been
+// refactored over time into auxilliary structures such as property trees.
+//
+// For example, in composited scrolling, Layers directly reference scroll tree
+// nodes (Layer::scroll_tree_index) but scroll tree nodes are being refactored
+// to reference stable element ids instead of layers.
+//
+// The animation system (see: ElementAnimations and blink::ElementAnimations) is
+// another auxilliary structure to the layer tree and uses element ids as a
+// stable identifier for animation targets.
struct CC_EXPORT ElementId {
ElementId(int primaryId, int secondaryId)
: primaryId(primaryId), secondaryId(secondaryId) {}
« no previous file with comments | « cc/test/fake_painted_scrollbar_layer.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698