| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); | 371 void UpdateEffectChanged(EffectNode* node, EffectNode* parent_node); |
| 372 | 372 |
| 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; | |
| 382 | |
| 383 // Given the ids of two effect nodes that have render surfaces, returns the | 381 // 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 | 382 // id of the lowest common ancestor effect node that also has a render |
| 385 // surface. | 383 // surface. |
| 386 int LowestCommonAncestorWithRenderSurface(int id_1, int id_2) const; | 384 int LowestCommonAncestorWithRenderSurface(int id_1, int id_2) const; |
| 387 | 385 |
| 388 void AddMaskLayerId(int id); | 386 void AddMaskLayerId(int id); |
| 389 const std::vector<int>& mask_layer_ids() const { return mask_layer_ids_; } | 387 const std::vector<int>& mask_layer_ids() const { return mask_layer_ids_; } |
| 390 | 388 |
| 391 RenderSurfaceImpl* GetRenderSurface(int id) { | 389 RenderSurfaceImpl* GetRenderSurface(int id) { |
| 392 return render_surfaces_[id].get(); | 390 return render_surfaces_[id].get(); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 406 void TakeRenderSurfaces( | 404 void TakeRenderSurfaces( |
| 407 std::vector<std::unique_ptr<RenderSurfaceImpl>>* render_surfaces); | 405 std::vector<std::unique_ptr<RenderSurfaceImpl>>* render_surfaces); |
| 408 | 406 |
| 409 // Returns true if render surfaces changed (that is, if any render surfaces | 407 // Returns true if render surfaces changed (that is, if any render surfaces |
| 410 // were created or destroyed). | 408 // were created or destroyed). |
| 411 bool CreateOrReuseRenderSurfaces( | 409 bool CreateOrReuseRenderSurfaces( |
| 412 std::vector<std::unique_ptr<RenderSurfaceImpl>>* old_render_surfaces, | 410 std::vector<std::unique_ptr<RenderSurfaceImpl>>* old_render_surfaces, |
| 413 LayerTreeImpl* layer_tree_impl); | 411 LayerTreeImpl* layer_tree_impl); |
| 414 | 412 |
| 415 private: | 413 private: |
| 414 void UpdateClosestAncestorWithCopyRequestId(EffectNode* node, |
| 415 EffectNode* parent_node); |
| 416 void UpdateOpacities(EffectNode* node, EffectNode* parent_node); | 416 void UpdateOpacities(EffectNode* node, EffectNode* parent_node); |
| 417 void UpdateIsDrawn(EffectNode* node, EffectNode* parent_node); | 417 void UpdateIsDrawn(EffectNode* node, EffectNode* parent_node); |
| 418 void UpdateBackfaceVisibility(EffectNode* node, EffectNode* parent_node); | 418 void UpdateBackfaceVisibility(EffectNode* node, EffectNode* parent_node); |
| 419 | 419 |
| 420 // Stores copy requests, keyed by node id. | 420 // Stores copy requests, keyed by node id. |
| 421 std::unordered_multimap<int, std::unique_ptr<CopyOutputRequest>> | 421 std::unordered_multimap<int, std::unique_ptr<CopyOutputRequest>> |
| 422 copy_requests_; | 422 copy_requests_; |
| 423 | 423 |
| 424 // Unsorted list of all mask layer ids that effect nodes refer to. | 424 // Unsorted list of all mask layer ids that effect nodes refer to. |
| 425 std::vector<int> mask_layer_ids_; | 425 std::vector<int> mask_layer_ids_; |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; | 728 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; |
| 729 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, | 729 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, |
| 730 int effect_id) const; | 730 int effect_id) const; |
| 731 | 731 |
| 732 PropertyTreesCachedData cached_data_; | 732 PropertyTreesCachedData cached_data_; |
| 733 }; | 733 }; |
| 734 | 734 |
| 735 } // namespace cc | 735 } // namespace cc |
| 736 | 736 |
| 737 #endif // CC_TREES_PROPERTY_TREE_H_ | 737 #endif // CC_TREES_PROPERTY_TREE_H_ |
| OLD | NEW |