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

Unified Diff: cc/trees/layer_tree_impl.h

Issue 1975623002: cc : Add LayerToPropertyTreeIndices map to PropertyTrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index bf4ccf59c2880bcc76e0b38a0dd95d3f89eda686..b456d54712be62bfac789091fa1e5b51cd0a8563 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -168,11 +168,23 @@ class CC_EXPORT LayerTreeImpl {
LayerImpl* scroll = nullptr;
};
+ struct CC_EXPORT PropertyTreeIndices {
+ int transform_tree_index = -1;
+ int effect_tree_index = -1;
+ int clip_tree_index = -1;
+ int scroll_tree_index = -1;
+ };
+
void AddToElementMap(LayerImpl* layer);
void RemoveFromElementMap(LayerImpl* layer);
void AddToOpacityAnimationsMap(int id, float opacity);
+ void UpdateLayerToPropertyTreeIndicesMap(int id,
+ int tree_index,
+ PropertyTrees::Types tree_type);
+ void RemoveFromLayerToPropertyTreeIndicesMap(int id);
+
ElementLayers GetMutableLayers(uint64_t element_id);
int source_frame_number() const { return source_frame_number_; }
void set_source_frame_number(int frame_number) {
@@ -486,7 +498,7 @@ class CC_EXPORT LayerTreeImpl {
event_properties;
}
- void ResetAllChangeTracking(PropertyTrees::ResetFlags flag);
+ void ResetAllChangeTracking(PropertyTrees::Types type);
protected:
explicit LayerTreeImpl(
@@ -539,6 +551,9 @@ class CC_EXPORT LayerTreeImpl {
std::unordered_map<int, float> opacity_animations_map_;
+ std::unordered_map<int, PropertyTreeIndices>
+ layer_to_property_tree_indices_map_;
+
// Maps from clip layer ids to scroll layer ids. Note that this only includes
// the subset of clip layers that act as scrolling containers. (This is
// derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.)

Powered by Google App Engine
This is Rietveld 408576698