OLD | NEW |
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 bool operator==(const TransformTree& other) const; | 167 bool operator==(const TransformTree& other) const; |
168 | 168 |
169 static const int kContentsRootNodeId = 1; | 169 static const int kContentsRootNodeId = 1; |
170 | 170 |
171 int Insert(const TransformNode& tree_node, int parent_id); | 171 int Insert(const TransformNode& tree_node, int parent_id); |
172 | 172 |
173 void clear(); | 173 void clear(); |
174 | 174 |
175 TransformNode* FindNodeFromElementId(ElementId id); | 175 TransformNode* FindNodeFromElementId(ElementId id); |
176 void OnTransformAnimated(const gfx::Transform& transform, | 176 void OnTransformAnimated(ElementId element_id, |
177 int id, | 177 const gfx::Transform& transform); |
178 LayerTreeImpl* layer_tree_impl); | |
179 // Computes the change of basis transform from node |source_id| to |dest_id|. | 178 // Computes the change of basis transform from node |source_id| to |dest_id|. |
180 // This is used by scroll children to compute transform from their scroll | 179 // This is used by scroll children to compute transform from their scroll |
181 // parent space (source) to their parent space (destination) and it can atmost | 180 // parent space (source) to their parent space (destination) and it can atmost |
182 // be a translation. This function assumes that the path from source to | 181 // be a translation. This function assumes that the path from source to |
183 // destination has only translations. So, it should not be called when there | 182 // destination has only translations. So, it should not be called when there |
184 // can be intermediate 3d transforms but the end result is a translation. | 183 // can be intermediate 3d transforms but the end result is a translation. |
185 bool ComputeTranslation(int source_id, | 184 bool ComputeTranslation(int source_id, |
186 int dest_id, | 185 int dest_id, |
187 gfx::Transform* transform) const; | 186 gfx::Transform* transform) const; |
188 | 187 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 | 335 |
337 int Insert(const EffectNode& tree_node, int parent_id); | 336 int Insert(const EffectNode& tree_node, int parent_id); |
338 | 337 |
339 void clear(); | 338 void clear(); |
340 | 339 |
341 float EffectiveOpacity(const EffectNode* node) const; | 340 float EffectiveOpacity(const EffectNode* node) const; |
342 | 341 |
343 void UpdateSurfaceContentsScale(EffectNode* node); | 342 void UpdateSurfaceContentsScale(EffectNode* node); |
344 | 343 |
345 EffectNode* FindNodeFromElementId(ElementId id); | 344 EffectNode* FindNodeFromElementId(ElementId id); |
346 void OnOpacityAnimated(float opacity, int id, LayerTreeImpl* layer_tree_impl); | 345 void OnOpacityAnimated(ElementId id, float opacity); |
347 void OnFilterAnimated(const FilterOperations& filters, | 346 void OnFilterAnimated(ElementId id, const FilterOperations& filters); |
348 int id, | |
349 LayerTreeImpl* layer_tree_impl); | |
350 | 347 |
351 void UpdateEffects(int id); | 348 void UpdateEffects(int id); |
352 | 349 |
353 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); | 350 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); |
354 | 351 |
355 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); | 352 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); |
356 void PushCopyRequestsTo(EffectTree* other_tree); | 353 void PushCopyRequestsTo(EffectTree* other_tree); |
357 void TakeCopyRequestsAndTransformToSurface( | 354 void TakeCopyRequestsAndTransformToSurface( |
358 int node_id, | 355 int node_id, |
359 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); | 356 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; | 688 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; |
692 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, | 689 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, |
693 int effect_id) const; | 690 int effect_id) const; |
694 | 691 |
695 PropertyTreesCachedData cached_data_; | 692 PropertyTreesCachedData cached_data_; |
696 }; | 693 }; |
697 | 694 |
698 } // namespace cc | 695 } // namespace cc |
699 | 696 |
700 #endif // CC_TREES_PROPERTY_TREE_H_ | 697 #endif // CC_TREES_PROPERTY_TREE_H_ |
OLD | NEW |