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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
890 if (clip_node->target_effect_id != EffectTree::kContentsRootNodeId) { | 890 if (clip_node->target_effect_id != EffectTree::kContentsRootNodeId) { |
891 const EffectNode* target_effect_node = | 891 const EffectNode* target_effect_node = |
892 effect_tree.Node(clip_node->target_effect_id); | 892 effect_tree.Node(clip_node->target_effect_id); |
893 PostConcatSurfaceContentsScale(target_effect_node, &source_to_target); | 893 PostConcatSurfaceContentsScale(target_effect_node, &source_to_target); |
894 #if DCHECK_IS_ON() | 894 #if DCHECK_IS_ON() |
895 VerifySurfaceContentsScalesMatch(clip_node->target_effect_id, | 895 VerifySurfaceContentsScalesMatch(clip_node->target_effect_id, |
896 clip_node->target_transform_id, | 896 clip_node->target_transform_id, |
897 effect_tree, transform_tree); | 897 effect_tree, transform_tree); |
898 #endif | 898 #endif |
899 } | 899 } |
900 // source_to_target computation should be successful as target is an | |
901 // ancestor of the transform node. | |
902 DCHECK(success); | |
ajuma
2016/09/07 14:51:23
In which cases is this DCHECK now failing?
sunxd
2016/09/07 15:20:02
It only fails when the target's surface content sc
| |
903 } | 900 } |
904 | 901 |
905 gfx::RectF source_clip_in_target_space = | 902 gfx::RectF source_clip_in_target_space = |
906 MathUtil::MapClippedRect(source_to_target, clip_node->clip); | 903 MathUtil::MapClippedRect(source_to_target, clip_node->clip); |
907 | 904 |
908 // With surfaces disabled, the only case where we use only the local clip | 905 // With surfaces disabled, the only case where we use only the local clip |
909 // for layer clipping is the case where no non-viewport ancestor node | 906 // for layer clipping is the case where no non-viewport ancestor node |
910 // applies a local clip. | 907 // applies a local clip. |
911 bool layer_clipping_uses_only_local_clip = | 908 bool layer_clipping_uses_only_local_clip = |
912 non_root_surfaces_enabled | 909 non_root_surfaces_enabled |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1591 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1588 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
1592 const Layer* overscroll_elasticity_layer, | 1589 const Layer* overscroll_elasticity_layer, |
1593 const gfx::Vector2dF& elastic_overscroll) { | 1590 const gfx::Vector2dF& elastic_overscroll) { |
1594 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1591 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
1595 elastic_overscroll); | 1592 elastic_overscroll); |
1596 } | 1593 } |
1597 | 1594 |
1598 } // namespace draw_property_utils | 1595 } // namespace draw_property_utils |
1599 | 1596 |
1600 } // namespace cc | 1597 } // namespace cc |
OLD | NEW |