Chromium Code Reviews| 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) {} |