OLD | NEW |
---|---|
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
900 } | 900 } |
901 | 901 |
902 return next_scroll_compensation_matrix; | 902 return next_scroll_compensation_matrix; |
903 } | 903 } |
904 | 904 |
905 template <typename LayerType> | 905 template <typename LayerType> |
906 static inline void CalculateContentsScale(LayerType* layer, | 906 static inline void CalculateContentsScale(LayerType* layer, |
907 float contents_scale, | 907 float contents_scale, |
908 float device_scale_factor, | 908 float device_scale_factor, |
909 float page_scale_factor, | 909 float page_scale_factor, |
910 float maximum_animation_scale_factor, | |
910 bool animating_transform_to_screen) { | 911 bool animating_transform_to_screen) { |
911 layer->CalculateContentsScale(contents_scale, | 912 layer->CalculateContentsScale(contents_scale, |
912 device_scale_factor, | 913 device_scale_factor, |
913 page_scale_factor, | 914 page_scale_factor, |
915 maximum_animation_scale_factor, | |
914 animating_transform_to_screen, | 916 animating_transform_to_screen, |
915 &layer->draw_properties().contents_scale_x, | 917 &layer->draw_properties().contents_scale_x, |
916 &layer->draw_properties().contents_scale_y, | 918 &layer->draw_properties().contents_scale_y, |
917 &layer->draw_properties().content_bounds); | 919 &layer->draw_properties().content_bounds); |
918 | 920 |
919 LayerType* mask_layer = layer->mask_layer(); | 921 LayerType* mask_layer = layer->mask_layer(); |
920 if (mask_layer) { | 922 if (mask_layer) { |
921 mask_layer->CalculateContentsScale( | 923 mask_layer->CalculateContentsScale( |
922 contents_scale, | 924 contents_scale, |
923 device_scale_factor, | 925 device_scale_factor, |
924 page_scale_factor, | 926 page_scale_factor, |
927 maximum_animation_scale_factor, | |
925 animating_transform_to_screen, | 928 animating_transform_to_screen, |
926 &mask_layer->draw_properties().contents_scale_x, | 929 &mask_layer->draw_properties().contents_scale_x, |
927 &mask_layer->draw_properties().contents_scale_y, | 930 &mask_layer->draw_properties().contents_scale_y, |
928 &mask_layer->draw_properties().content_bounds); | 931 &mask_layer->draw_properties().content_bounds); |
929 } | 932 } |
930 | 933 |
931 LayerType* replica_mask_layer = | 934 LayerType* replica_mask_layer = |
932 layer->replica_layer() ? layer->replica_layer()->mask_layer() : NULL; | 935 layer->replica_layer() ? layer->replica_layer()->mask_layer() : NULL; |
933 if (replica_mask_layer) { | 936 if (replica_mask_layer) { |
934 replica_mask_layer->CalculateContentsScale( | 937 replica_mask_layer->CalculateContentsScale( |
935 contents_scale, | 938 contents_scale, |
936 device_scale_factor, | 939 device_scale_factor, |
937 page_scale_factor, | 940 page_scale_factor, |
941 maximum_animation_scale_factor, | |
938 animating_transform_to_screen, | 942 animating_transform_to_screen, |
939 &replica_mask_layer->draw_properties().contents_scale_x, | 943 &replica_mask_layer->draw_properties().contents_scale_x, |
940 &replica_mask_layer->draw_properties().contents_scale_y, | 944 &replica_mask_layer->draw_properties().contents_scale_y, |
941 &replica_mask_layer->draw_properties().content_bounds); | 945 &replica_mask_layer->draw_properties().content_bounds); |
942 } | 946 } |
943 } | 947 } |
944 | 948 |
945 static inline void UpdateLayerContentsScale( | 949 static inline void UpdateLayerContentsScale( |
946 LayerImpl* layer, | 950 LayerImpl* layer, |
947 bool can_adjust_raster_scale, | 951 bool can_adjust_raster_scale, |
948 float ideal_contents_scale, | 952 float ideal_contents_scale, |
949 float device_scale_factor, | 953 float device_scale_factor, |
950 float page_scale_factor, | 954 float page_scale_factor, |
955 float maximum_animation_scale_factor, | |
951 bool animating_transform_to_screen) { | 956 bool animating_transform_to_screen) { |
952 CalculateContentsScale(layer, | 957 CalculateContentsScale(layer, |
953 ideal_contents_scale, | 958 ideal_contents_scale, |
954 device_scale_factor, | 959 device_scale_factor, |
955 page_scale_factor, | 960 page_scale_factor, |
961 maximum_animation_scale_factor, | |
956 animating_transform_to_screen); | 962 animating_transform_to_screen); |
957 } | 963 } |
958 | 964 |
959 static inline void UpdateLayerContentsScale( | 965 static inline void UpdateLayerContentsScale( |
960 Layer* layer, | 966 Layer* layer, |
961 bool can_adjust_raster_scale, | 967 bool can_adjust_raster_scale, |
962 float ideal_contents_scale, | 968 float ideal_contents_scale, |
963 float device_scale_factor, | 969 float device_scale_factor, |
964 float page_scale_factor, | 970 float page_scale_factor, |
971 float maximum_animation_scale_factor, | |
965 bool animating_transform_to_screen) { | 972 bool animating_transform_to_screen) { |
966 if (can_adjust_raster_scale) { | 973 if (can_adjust_raster_scale) { |
967 float ideal_raster_scale = | 974 float ideal_raster_scale = |
968 ideal_contents_scale / (device_scale_factor * page_scale_factor); | 975 ideal_contents_scale / (device_scale_factor * page_scale_factor); |
969 | 976 |
970 bool need_to_set_raster_scale = layer->raster_scale_is_unknown(); | 977 bool need_to_set_raster_scale = layer->raster_scale_is_unknown(); |
971 | 978 |
972 // If we've previously saved a raster_scale but the ideal changes, things | 979 // If we've previously saved a raster_scale but the ideal changes, things |
973 // are unpredictable and we should just use 1. | 980 // are unpredictable and we should just use 1. |
974 if (!need_to_set_raster_scale && layer->raster_scale() != 1.f && | 981 if (!need_to_set_raster_scale && layer->raster_scale() != 1.f && |
(...skipping 16 matching lines...) Expand all Loading... | |
991 | 998 |
992 gfx::Size old_content_bounds = layer->content_bounds(); | 999 gfx::Size old_content_bounds = layer->content_bounds(); |
993 float old_contents_scale_x = layer->contents_scale_x(); | 1000 float old_contents_scale_x = layer->contents_scale_x(); |
994 float old_contents_scale_y = layer->contents_scale_y(); | 1001 float old_contents_scale_y = layer->contents_scale_y(); |
995 | 1002 |
996 float contents_scale = raster_scale * device_scale_factor * page_scale_factor; | 1003 float contents_scale = raster_scale * device_scale_factor * page_scale_factor; |
997 CalculateContentsScale(layer, | 1004 CalculateContentsScale(layer, |
998 contents_scale, | 1005 contents_scale, |
999 device_scale_factor, | 1006 device_scale_factor, |
1000 page_scale_factor, | 1007 page_scale_factor, |
1008 maximum_animation_scale_factor, | |
1001 animating_transform_to_screen); | 1009 animating_transform_to_screen); |
1002 | 1010 |
1003 if (layer->content_bounds() != old_content_bounds || | 1011 if (layer->content_bounds() != old_content_bounds || |
1004 layer->contents_scale_x() != old_contents_scale_x || | 1012 layer->contents_scale_x() != old_contents_scale_x || |
1005 layer->contents_scale_y() != old_contents_scale_y) | 1013 layer->contents_scale_y() != old_contents_scale_y) |
1006 layer->SetNeedsPushProperties(); | 1014 layer->SetNeedsPushProperties(); |
1007 } | 1015 } |
1008 | 1016 |
1017 template <typename LayerType> | |
1018 static inline void CalculateAnimationScaleFactor( | |
enne (OOO)
2014/04/08 14:19:41
Can you template this to only do work for LayerImp
ajuma
2014/04/08 18:59:17
Done.
| |
1019 LayerType* layer, | |
1020 bool ancestor_is_animating_scale, | |
1021 float ancestor_maximum_animation_scale_factor, | |
1022 const gfx::Transform& combined_transform, | |
1023 bool* combined_is_animating_scale, | |
1024 float* combined_maximum_animation_scale_factor) { | |
1025 if (ancestor_maximum_animation_scale_factor == 0.f || | |
1026 !combined_transform.IsScaleOrTranslation()) { | |
1027 *combined_maximum_animation_scale_factor = 0.f; | |
1028 *combined_is_animating_scale = true; | |
1029 return; | |
1030 } | |
1031 | |
1032 bool layer_is_animating_scale = | |
1033 !layer->layer_animation_controller()->HasOnlyTranslationTransforms(); | |
1034 if (!layer_is_animating_scale) { | |
1035 *combined_is_animating_scale = ancestor_is_animating_scale; | |
1036 *combined_maximum_animation_scale_factor = | |
1037 ancestor_maximum_animation_scale_factor; | |
1038 return; | |
1039 } | |
1040 | |
1041 *combined_is_animating_scale = true; | |
1042 // We don't attempt to accumulate animation scale factors from multiple nodes, | |
1043 // because of the risk of significant overestimation. For example, one node | |
1044 // may be increasing scale from 1 to 10 at the same time as a descendant is | |
1045 // decreasing scale from 10 to 1. Naively combining these scales would produce | |
1046 // a scale of 100. | |
1047 if (ancestor_is_animating_scale) { | |
1048 *combined_maximum_animation_scale_factor = 0.f; | |
1049 return; | |
1050 } | |
1051 DCHECK(ancestor_maximum_animation_scale_factor == 1.f); | |
1052 | |
1053 float layer_maximum_animated_scale = 0.f; | |
1054 if (!layer->layer_animation_controller()->MaximumScale( | |
1055 &layer_maximum_animated_scale)) { | |
1056 *combined_maximum_animation_scale_factor = 0.f; | |
1057 return; | |
1058 } | |
1059 | |
1060 // Now that we know the maximum scale during the animation, we need to find | |
1061 // the layer's current scale to determine the factor by which the layer will | |
1062 // be further scaled up. | |
1063 gfx::Vector2dF layer_transform_scales = | |
1064 MathUtil::ComputeTransform2dScaleComponents(layer->transform(), 0.f); | |
1065 DCHECK(layer_transform_scales != gfx::Vector2dF()); | |
enne (OOO)
2014/04/08 14:19:41
Can you convince me this is legit? It seems like a
ajuma
2014/04/08 18:59:17
This code has now been removed, but the reason we
| |
1066 *combined_maximum_animation_scale_factor = | |
1067 layer_maximum_animated_scale / | |
1068 std::max(layer_transform_scales.x(), layer_transform_scales.y()); | |
enne (OOO)
2014/04/08 14:19:41
This scares me.
How do you prevent multiple tilin
ajuma
2014/04/08 18:59:17
I've removed the division-based approach. We no lo
| |
1069 } | |
1070 | |
1009 static inline RenderSurface* CreateOrReuseRenderSurface(Layer* layer) { | 1071 static inline RenderSurface* CreateOrReuseRenderSurface(Layer* layer) { |
1010 // The render surface should always be new on the main thread, as the | 1072 // The render surface should always be new on the main thread, as the |
1011 // RenderSurfaceLayerList should be a new empty list when given to | 1073 // RenderSurfaceLayerList should be a new empty list when given to |
1012 // CalculateDrawProperties. | 1074 // CalculateDrawProperties. |
1013 DCHECK(!layer->render_surface()); | 1075 DCHECK(!layer->render_surface()); |
1014 layer->CreateRenderSurface(); | 1076 layer->CreateRenderSurface(); |
1015 return layer->render_surface(); | 1077 return layer->render_surface(); |
1016 } | 1078 } |
1017 | 1079 |
1018 static inline RenderSurfaceImpl* CreateOrReuseRenderSurface(LayerImpl* layer) { | 1080 static inline RenderSurfaceImpl* CreateOrReuseRenderSurface(LayerImpl* layer) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1158 // When the layer's children want to compute their visible content rect, they | 1220 // When the layer's children want to compute their visible content rect, they |
1159 // want to know what their target surface's clip rect will be. BUT - they | 1221 // want to know what their target surface's clip rect will be. BUT - they |
1160 // want to know this clip rect represented in their own target space. This | 1222 // want to know this clip rect represented in their own target space. This |
1161 // requires inverse-projecting the surface's clip rect from the surface's | 1223 // requires inverse-projecting the surface's clip rect from the surface's |
1162 // render target space down to the surface's own space. Instead of computing | 1224 // render target space down to the surface's own space. Instead of computing |
1163 // this value redundantly for each child layer, it is computed only once | 1225 // this value redundantly for each child layer, it is computed only once |
1164 // while dealing with the parent layer, and then this precomputed value is | 1226 // while dealing with the parent layer, and then this precomputed value is |
1165 // passed down the recursion to the children that actually use it. | 1227 // passed down the recursion to the children that actually use it. |
1166 gfx::Rect clip_rect_of_target_surface_in_target_space; | 1228 gfx::Rect clip_rect_of_target_surface_in_target_space; |
1167 | 1229 |
1230 // The maximum factor by which currently running animations will be | |
1231 // scaling-up the layer during their lifetime. | |
1232 float maximum_animation_scale_factor; | |
1233 | |
1234 bool ancestor_is_animating_scale; | |
1168 bool ancestor_clips_subtree; | 1235 bool ancestor_clips_subtree; |
1169 typename LayerType::RenderSurfaceType* | 1236 typename LayerType::RenderSurfaceType* |
1170 nearest_occlusion_immune_ancestor_surface; | 1237 nearest_occlusion_immune_ancestor_surface; |
1171 bool in_subtree_of_page_scale_application_layer; | 1238 bool in_subtree_of_page_scale_application_layer; |
1172 bool subtree_can_use_lcd_text; | 1239 bool subtree_can_use_lcd_text; |
1173 bool subtree_is_visible_from_ancestor; | 1240 bool subtree_is_visible_from_ancestor; |
1174 }; | 1241 }; |
1175 | 1242 |
1176 template <typename LayerType> | 1243 template <typename LayerType> |
1177 static LayerType* GetChildContainingLayer(const LayerType& parent, | 1244 static LayerType* GetChildContainingLayer(const LayerType& parent, |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1539 effective_scroll_delta -= | 1606 effective_scroll_delta -= |
1540 gfx::ScaleVector2d(current_translation - previous_translation, | 1607 gfx::ScaleVector2d(current_translation - previous_translation, |
1541 1.f / parent_scales.x(), | 1608 1.f / parent_scales.x(), |
1542 1.f / parent_scales.y()); | 1609 1.f / parent_scales.y()); |
1543 } | 1610 } |
1544 | 1611 |
1545 // Apply adjustment from position constraints. | 1612 // Apply adjustment from position constraints. |
1546 ApplyPositionAdjustment(layer, data_from_ancestor.fixed_container, | 1613 ApplyPositionAdjustment(layer, data_from_ancestor.fixed_container, |
1547 data_from_ancestor.scroll_compensation_matrix, &combined_transform); | 1614 data_from_ancestor.scroll_compensation_matrix, &combined_transform); |
1548 | 1615 |
1616 bool combined_is_animating_scale = false; | |
1617 float combined_maximum_animation_scale_factor = 1.f; | |
1618 if (globals.can_adjust_raster_scales) { | |
1619 CalculateAnimationScaleFactor( | |
1620 layer, | |
1621 data_from_ancestor.ancestor_is_animating_scale, | |
1622 data_from_ancestor.maximum_animation_scale_factor, | |
1623 combined_transform, | |
1624 &combined_is_animating_scale, | |
1625 &combined_maximum_animation_scale_factor); | |
1626 } | |
1627 data_for_children.ancestor_is_animating_scale = combined_is_animating_scale; | |
1628 data_for_children.maximum_animation_scale_factor = | |
1629 combined_maximum_animation_scale_factor; | |
1630 | |
1549 // Compute the 2d scale components of the transform hierarchy up to the target | 1631 // Compute the 2d scale components of the transform hierarchy up to the target |
1550 // surface. From there, we can decide on a contents scale for the layer. | 1632 // surface. From there, we can decide on a contents scale for the layer. |
1551 float layer_scale_factors = globals.device_scale_factor; | 1633 float layer_scale_factors = globals.device_scale_factor; |
1552 if (data_from_ancestor.in_subtree_of_page_scale_application_layer) | 1634 if (data_from_ancestor.in_subtree_of_page_scale_application_layer) |
1553 layer_scale_factors *= globals.page_scale_factor; | 1635 layer_scale_factors *= globals.page_scale_factor; |
1554 gfx::Vector2dF combined_transform_scales = | 1636 gfx::Vector2dF combined_transform_scales = |
1555 MathUtil::ComputeTransform2dScaleComponents( | 1637 MathUtil::ComputeTransform2dScaleComponents( |
1556 combined_transform, | 1638 combined_transform, |
1557 layer_scale_factors); | 1639 layer_scale_factors); |
1558 | 1640 |
1559 float ideal_contents_scale = | 1641 float ideal_contents_scale = |
1560 globals.can_adjust_raster_scales | 1642 globals.can_adjust_raster_scales |
1561 ? std::max(combined_transform_scales.x(), | 1643 ? std::max(combined_transform_scales.x(), |
1562 combined_transform_scales.y()) | 1644 combined_transform_scales.y()) |
1563 : layer_scale_factors; | 1645 : layer_scale_factors; |
1564 UpdateLayerContentsScale( | 1646 UpdateLayerContentsScale( |
1565 layer, | 1647 layer, |
1566 globals.can_adjust_raster_scales, | 1648 globals.can_adjust_raster_scales, |
1567 ideal_contents_scale, | 1649 ideal_contents_scale, |
1568 globals.device_scale_factor, | 1650 globals.device_scale_factor, |
1569 data_from_ancestor.in_subtree_of_page_scale_application_layer ? | 1651 data_from_ancestor.in_subtree_of_page_scale_application_layer |
1570 globals.page_scale_factor : 1.f, | 1652 ? globals.page_scale_factor |
1653 : 1.f, | |
1654 combined_maximum_animation_scale_factor, | |
1571 animating_transform_to_screen); | 1655 animating_transform_to_screen); |
1572 | 1656 |
1573 // The draw_transform that gets computed below is effectively the layer's | 1657 // The draw_transform that gets computed below is effectively the layer's |
1574 // draw_transform, unless the layer itself creates a render_surface. In that | 1658 // draw_transform, unless the layer itself creates a render_surface. In that |
1575 // case, the render_surface re-parents the transforms. | 1659 // case, the render_surface re-parents the transforms. |
1576 layer_draw_properties.target_space_transform = combined_transform; | 1660 layer_draw_properties.target_space_transform = combined_transform; |
1577 // M[draw] = M[parent] * LT * S[layer2content] | 1661 // M[draw] = M[parent] * LT * S[layer2content] |
1578 layer_draw_properties.target_space_transform.Scale( | 1662 layer_draw_properties.target_space_transform.Scale( |
1579 SK_MScalar1 / layer->contents_scale_x(), | 1663 SK_MScalar1 / layer->contents_scale_x(), |
1580 SK_MScalar1 / layer->contents_scale_y()); | 1664 SK_MScalar1 / layer->contents_scale_y()); |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2148 globals.can_adjust_raster_scales = inputs->can_adjust_raster_scales; | 2232 globals.can_adjust_raster_scales = inputs->can_adjust_raster_scales; |
2149 | 2233 |
2150 DataForRecursion<Layer> data_for_recursion; | 2234 DataForRecursion<Layer> data_for_recursion; |
2151 data_for_recursion.parent_matrix = scaled_device_transform; | 2235 data_for_recursion.parent_matrix = scaled_device_transform; |
2152 data_for_recursion.full_hierarchy_matrix = identity_matrix; | 2236 data_for_recursion.full_hierarchy_matrix = identity_matrix; |
2153 data_for_recursion.scroll_compensation_matrix = identity_matrix; | 2237 data_for_recursion.scroll_compensation_matrix = identity_matrix; |
2154 data_for_recursion.fixed_container = inputs->root_layer; | 2238 data_for_recursion.fixed_container = inputs->root_layer; |
2155 data_for_recursion.clip_rect_in_target_space = device_viewport_rect; | 2239 data_for_recursion.clip_rect_in_target_space = device_viewport_rect; |
2156 data_for_recursion.clip_rect_of_target_surface_in_target_space = | 2240 data_for_recursion.clip_rect_of_target_surface_in_target_space = |
2157 device_viewport_rect; | 2241 device_viewport_rect; |
2242 data_for_recursion.maximum_animation_scale_factor = 1.f; | |
2243 data_for_recursion.ancestor_is_animating_scale = false; | |
2158 data_for_recursion.ancestor_clips_subtree = true; | 2244 data_for_recursion.ancestor_clips_subtree = true; |
2159 data_for_recursion.nearest_occlusion_immune_ancestor_surface = NULL; | 2245 data_for_recursion.nearest_occlusion_immune_ancestor_surface = NULL; |
2160 data_for_recursion.in_subtree_of_page_scale_application_layer = false; | 2246 data_for_recursion.in_subtree_of_page_scale_application_layer = false; |
2161 data_for_recursion.subtree_can_use_lcd_text = inputs->can_use_lcd_text; | 2247 data_for_recursion.subtree_can_use_lcd_text = inputs->can_use_lcd_text; |
2162 data_for_recursion.subtree_is_visible_from_ancestor = true; | 2248 data_for_recursion.subtree_is_visible_from_ancestor = true; |
2163 | 2249 |
2164 PreCalculateMetaInformationRecursiveData recursive_data; | 2250 PreCalculateMetaInformationRecursiveData recursive_data; |
2165 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); | 2251 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); |
2166 std::vector<AccumulatedSurfaceState<Layer> > accumulated_surface_state; | 2252 std::vector<AccumulatedSurfaceState<Layer> > accumulated_surface_state; |
2167 CalculateDrawPropertiesInternal<Layer>(inputs->root_layer, | 2253 CalculateDrawPropertiesInternal<Layer>(inputs->root_layer, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2206 globals.can_adjust_raster_scales = inputs->can_adjust_raster_scales; | 2292 globals.can_adjust_raster_scales = inputs->can_adjust_raster_scales; |
2207 | 2293 |
2208 DataForRecursion<LayerImpl> data_for_recursion; | 2294 DataForRecursion<LayerImpl> data_for_recursion; |
2209 data_for_recursion.parent_matrix = scaled_device_transform; | 2295 data_for_recursion.parent_matrix = scaled_device_transform; |
2210 data_for_recursion.full_hierarchy_matrix = identity_matrix; | 2296 data_for_recursion.full_hierarchy_matrix = identity_matrix; |
2211 data_for_recursion.scroll_compensation_matrix = identity_matrix; | 2297 data_for_recursion.scroll_compensation_matrix = identity_matrix; |
2212 data_for_recursion.fixed_container = inputs->root_layer; | 2298 data_for_recursion.fixed_container = inputs->root_layer; |
2213 data_for_recursion.clip_rect_in_target_space = device_viewport_rect; | 2299 data_for_recursion.clip_rect_in_target_space = device_viewport_rect; |
2214 data_for_recursion.clip_rect_of_target_surface_in_target_space = | 2300 data_for_recursion.clip_rect_of_target_surface_in_target_space = |
2215 device_viewport_rect; | 2301 device_viewport_rect; |
2302 data_for_recursion.maximum_animation_scale_factor = 1.f; | |
2303 data_for_recursion.ancestor_is_animating_scale = false; | |
2216 data_for_recursion.ancestor_clips_subtree = true; | 2304 data_for_recursion.ancestor_clips_subtree = true; |
2217 data_for_recursion.nearest_occlusion_immune_ancestor_surface = NULL; | 2305 data_for_recursion.nearest_occlusion_immune_ancestor_surface = NULL; |
2218 data_for_recursion.in_subtree_of_page_scale_application_layer = false; | 2306 data_for_recursion.in_subtree_of_page_scale_application_layer = false; |
2219 data_for_recursion.subtree_can_use_lcd_text = inputs->can_use_lcd_text; | 2307 data_for_recursion.subtree_can_use_lcd_text = inputs->can_use_lcd_text; |
2220 data_for_recursion.subtree_is_visible_from_ancestor = true; | 2308 data_for_recursion.subtree_is_visible_from_ancestor = true; |
2221 | 2309 |
2222 PreCalculateMetaInformationRecursiveData recursive_data; | 2310 PreCalculateMetaInformationRecursiveData recursive_data; |
2223 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); | 2311 PreCalculateMetaInformation(inputs->root_layer, &recursive_data); |
2224 std::vector<AccumulatedSurfaceState<LayerImpl> > | 2312 std::vector<AccumulatedSurfaceState<LayerImpl> > |
2225 accumulated_surface_state; | 2313 accumulated_surface_state; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2406 // At this point, we think the point does hit the touch event handler region | 2494 // At this point, we think the point does hit the touch event handler region |
2407 // on the layer, but we need to walk up the parents to ensure that the layer | 2495 // on the layer, but we need to walk up the parents to ensure that the layer |
2408 // was not clipped in such a way that the hit point actually should not hit | 2496 // was not clipped in such a way that the hit point actually should not hit |
2409 // the layer. | 2497 // the layer. |
2410 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) | 2498 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) |
2411 return false; | 2499 return false; |
2412 | 2500 |
2413 return true; | 2501 return true; |
2414 } | 2502 } |
2415 } // namespace cc | 2503 } // namespace cc |
OLD | NEW |