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

Side by Side Diff: cc/trees/property_tree.h

Issue 2762123004: cc: LayerTreeHostImpl uses element id to tick animations (Closed)
Patch Set: review 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 bool operator==(const TransformTree& other) const; 157 bool operator==(const TransformTree& other) const;
158 158
159 static const int kContentsRootNodeId = 1; 159 static const int kContentsRootNodeId = 1;
160 160
161 int Insert(const TransformNode& tree_node, int parent_id); 161 int Insert(const TransformNode& tree_node, int parent_id);
162 162
163 void clear(); 163 void clear();
164 164
165 TransformNode* FindNodeFromElementId(ElementId id); 165 TransformNode* FindNodeFromElementId(ElementId id);
166 void OnTransformAnimated(const gfx::Transform& transform, 166 bool OnTransformAnimated(ElementId element_id,
167 int id, 167 const gfx::Transform& transform);
168 LayerTreeImpl* layer_tree_impl);
169 // Computes the change of basis transform from node |source_id| to |dest_id|. 168 // Computes the change of basis transform from node |source_id| to |dest_id|.
170 // This is used by scroll children to compute transform from their scroll 169 // This is used by scroll children to compute transform from their scroll
171 // parent space (source) to their parent space (destination) and it can atmost 170 // parent space (source) to their parent space (destination) and it can atmost
172 // be a translation. This function assumes that the path from source to 171 // be a translation. This function assumes that the path from source to
173 // destination has only translations. So, it should not be called when there 172 // destination has only translations. So, it should not be called when there
174 // can be intermediate 3d transforms but the end result is a translation. 173 // can be intermediate 3d transforms but the end result is a translation.
175 bool ComputeTranslation(int source_id, 174 bool ComputeTranslation(int source_id,
176 int dest_id, 175 int dest_id,
177 gfx::Transform* transform) const; 176 gfx::Transform* transform) const;
178 177
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 353
355 int Insert(const EffectNode& tree_node, int parent_id); 354 int Insert(const EffectNode& tree_node, int parent_id);
356 355
357 void clear(); 356 void clear();
358 357
359 float EffectiveOpacity(const EffectNode* node) const; 358 float EffectiveOpacity(const EffectNode* node) const;
360 359
361 void UpdateSurfaceContentsScale(EffectNode* node); 360 void UpdateSurfaceContentsScale(EffectNode* node);
362 361
363 EffectNode* FindNodeFromElementId(ElementId id); 362 EffectNode* FindNodeFromElementId(ElementId id);
364 void OnOpacityAnimated(float opacity, int id, LayerTreeImpl* layer_tree_impl); 363 bool OnOpacityAnimated(ElementId id, float opacity);
365 void OnFilterAnimated(const FilterOperations& filters, 364 bool OnFilterAnimated(ElementId id, const FilterOperations& filters);
366 int id,
367 LayerTreeImpl* layer_tree_impl);
368 365
369 void UpdateEffects(int id); 366 void UpdateEffects(int id);
370 367
371 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); 368 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node);
372 369
373 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); 370 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request);
374 void PushCopyRequestsTo(EffectTree* other_tree); 371 void PushCopyRequestsTo(EffectTree* other_tree);
375 void TakeCopyRequestsAndTransformToSurface( 372 void TakeCopyRequestsAndTransformToSurface(
376 int node_id, 373 int node_id,
377 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); 374 std::vector<std::unique_ptr<CopyOutputRequest>>* requests);
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; 720 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const;
724 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, 721 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id,
725 int effect_id) const; 722 int effect_id) const;
726 723
727 PropertyTreesCachedData cached_data_; 724 PropertyTreesCachedData cached_data_;
728 }; 725 };
729 726
730 } // namespace cc 727 } // namespace cc
731 728
732 #endif // CC_TREES_PROPERTY_TREE_H_ 729 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698