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 #include "cc/trees/draw_property_utils.h" | 5 #include "cc/trees/draw_property_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 // must combine clips. For each clip node, we save the clip rects in its | 796 // must combine clips. For each clip node, we save the clip rects in its |
797 // target space. So, we need to get the ancestor clip rect in the current | 797 // target space. So, we need to get the ancestor clip rect in the current |
798 // clip node's target space. | 798 // clip node's target space. |
799 gfx::RectF parent_combined_clip_in_target_space = | 799 gfx::RectF parent_combined_clip_in_target_space = |
800 parent_clip_node->combined_clip_in_target_space; | 800 parent_clip_node->combined_clip_in_target_space; |
801 gfx::RectF parent_clip_in_target_space = | 801 gfx::RectF parent_clip_in_target_space = |
802 parent_clip_node->clip_in_target_space; | 802 parent_clip_node->clip_in_target_space; |
803 if (parent_target_transform_node && | 803 if (parent_target_transform_node && |
804 parent_target_transform_node->id != clip_node->target_transform_id && | 804 parent_target_transform_node->id != clip_node->target_transform_id && |
805 non_root_surfaces_enabled) { | 805 non_root_surfaces_enabled) { |
806 success &= property_trees->ComputeTransformToTarget( | 806 success &= property_trees->ComputeTransformFromTarget( |
807 parent_target_transform_node->id, clip_node->target_effect_id, | 807 clip_node->target_transform_id, parent_clip_node->target_effect_id, |
808 &parent_to_current); | 808 &parent_to_current); |
809 // We don't have to apply surface contents scale when target is root. | 809 // We don't have to apply surface contents scale when target is root. |
810 if (clip_node->target_effect_id != EffectTree::kContentsRootNodeId) { | 810 if (clip_node->target_effect_id != EffectTree::kContentsRootNodeId) { |
811 const EffectNode* target_effect_node = | 811 const EffectNode* target_effect_node = |
812 effect_tree.Node(clip_node->target_effect_id); | 812 effect_tree.Node(clip_node->target_effect_id); |
813 PostConcatSurfaceContentsScale(target_effect_node, &parent_to_current); | 813 PostConcatSurfaceContentsScale(target_effect_node, &parent_to_current); |
814 #if DCHECK_IS_ON() | 814 #if DCHECK_IS_ON() |
815 VerifySurfaceContentsScalesMatch(clip_node->target_effect_id, | 815 VerifySurfaceContentsScalesMatch(clip_node->target_effect_id, |
816 clip_node->target_transform_id, | 816 clip_node->target_transform_id, |
817 effect_tree, transform_tree); | 817 effect_tree, transform_tree); |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1604 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
1605 const Layer* overscroll_elasticity_layer, | 1605 const Layer* overscroll_elasticity_layer, |
1606 const gfx::Vector2dF& elastic_overscroll) { | 1606 const gfx::Vector2dF& elastic_overscroll) { |
1607 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1607 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
1608 elastic_overscroll); | 1608 elastic_overscroll); |
1609 } | 1609 } |
1610 | 1610 |
1611 } // namespace draw_property_utils | 1611 } // namespace draw_property_utils |
1612 | 1612 |
1613 } // namespace cc | 1613 } // namespace cc |
OLD | NEW |