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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); | 373 void AddCopyRequest(int node_id, std::unique_ptr<CopyOutputRequest> request); |
374 void PushCopyRequestsTo(EffectTree* other_tree); | 374 void PushCopyRequestsTo(EffectTree* other_tree); |
375 void TakeCopyRequestsAndTransformToSurface( | 375 void TakeCopyRequestsAndTransformToSurface( |
376 int node_id, | 376 int node_id, |
377 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); | 377 std::vector<std::unique_ptr<CopyOutputRequest>>* requests); |
378 bool HasCopyRequests() const; | 378 bool HasCopyRequests() const; |
379 void ClearCopyRequests(); | 379 void ClearCopyRequests(); |
380 | 380 |
381 int ClosestAncestorWithCopyRequest(int id) const; | 381 int ClosestAncestorWithCopyRequest(int id) const; |
382 | 382 |
| 383 // Given the ids of two effect nodes that have render surfaces, returns the |
| 384 // id of the lowest common ancestor effect node that also has a render |
| 385 // surface. |
| 386 int LowestCommonAncestorWithRenderSurface(int id_1, int id_2) const; |
| 387 |
383 void AddMaskLayerId(int id); | 388 void AddMaskLayerId(int id); |
384 const std::vector<int>& mask_layer_ids() const { return mask_layer_ids_; } | 389 const std::vector<int>& mask_layer_ids() const { return mask_layer_ids_; } |
385 | 390 |
386 RenderSurfaceImpl* GetRenderSurface(int id) { | 391 RenderSurfaceImpl* GetRenderSurface(int id) { |
387 return render_surfaces_[id].get(); | 392 return render_surfaces_[id].get(); |
388 } | 393 } |
389 | 394 |
390 const RenderSurfaceImpl* GetRenderSurface(int id) const { | 395 const RenderSurfaceImpl* GetRenderSurface(int id) const { |
391 return render_surfaces_[id].get(); | 396 return render_surfaces_[id].get(); |
392 } | 397 } |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; | 729 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; |
725 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, | 730 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, |
726 int effect_id) const; | 731 int effect_id) const; |
727 | 732 |
728 PropertyTreesCachedData cached_data_; | 733 PropertyTreesCachedData cached_data_; |
729 }; | 734 }; |
730 | 735 |
731 } // namespace cc | 736 } // namespace cc |
732 | 737 |
733 #endif // CC_TREES_PROPERTY_TREE_H_ | 738 #endif // CC_TREES_PROPERTY_TREE_H_ |
OLD | NEW |