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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 UpdateScrollTree(&property_trees->scroll_tree, layer_tree_host); | 892 UpdateScrollTree(&property_trees->scroll_tree, layer_tree_host); |
893 ComputeTransforms(&property_trees->transform_tree); | 893 ComputeTransforms(&property_trees->transform_tree); |
894 ComputeEffects(&property_trees->effect_tree); | 894 ComputeEffects(&property_trees->effect_tree); |
895 // Computation of clips uses ToScreen which is updated while computing | 895 // Computation of clips uses ToScreen which is updated while computing |
896 // transforms. So, ComputeTransforms should be before ComputeClips. | 896 // transforms. So, ComputeTransforms should be before ComputeClips. |
897 ComputeClips(property_trees); | 897 ComputeClips(property_trees); |
898 } | 898 } |
899 | 899 |
900 void UpdatePropertyTreesAndRenderSurfaces(LayerImpl* root_layer, | 900 void UpdatePropertyTreesAndRenderSurfaces(LayerImpl* root_layer, |
901 PropertyTrees* property_trees, | 901 PropertyTrees* property_trees, |
902 bool can_render_to_separate_surface) { | 902 bool can_render_to_separate_surface, |
| 903 bool can_adjust_raster_scales) { |
903 bool render_surfaces_need_update = false; | 904 bool render_surfaces_need_update = false; |
904 if (property_trees->non_root_surfaces_enabled != | 905 if (property_trees->non_root_surfaces_enabled != |
905 can_render_to_separate_surface) { | 906 can_render_to_separate_surface) { |
906 property_trees->non_root_surfaces_enabled = can_render_to_separate_surface; | 907 property_trees->non_root_surfaces_enabled = can_render_to_separate_surface; |
907 property_trees->transform_tree.set_needs_update(true); | 908 property_trees->transform_tree.set_needs_update(true); |
908 render_surfaces_need_update = true; | 909 render_surfaces_need_update = true; |
909 } | 910 } |
| 911 if (property_trees->can_adjust_raster_scales != can_adjust_raster_scales) { |
| 912 property_trees->can_adjust_raster_scales = can_adjust_raster_scales; |
| 913 property_trees->transform_tree.set_needs_update(true); |
| 914 render_surfaces_need_update = true; |
| 915 } |
910 if (property_trees->transform_tree.needs_update()) { | 916 if (property_trees->transform_tree.needs_update()) { |
911 property_trees->clip_tree.set_needs_update(true); | 917 property_trees->clip_tree.set_needs_update(true); |
912 property_trees->effect_tree.set_needs_update(true); | 918 property_trees->effect_tree.set_needs_update(true); |
913 } | 919 } |
914 if (render_surfaces_need_update) { | 920 if (render_surfaces_need_update) { |
915 property_trees->effect_tree.UpdateRenderSurfaces( | 921 property_trees->effect_tree.UpdateRenderSurfaces( |
916 root_layer->layer_tree_impl(), | 922 root_layer->layer_tree_impl(), |
917 property_trees->non_root_surfaces_enabled); | 923 property_trees->non_root_surfaces_enabled); |
918 } | 924 } |
919 UpdateRenderTarget(&property_trees->effect_tree, | 925 UpdateRenderTarget(&property_trees->effect_tree, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 void UpdateElasticOverscroll(PropertyTrees* property_trees, | 1089 void UpdateElasticOverscroll(PropertyTrees* property_trees, |
1084 const Layer* overscroll_elasticity_layer, | 1090 const Layer* overscroll_elasticity_layer, |
1085 const gfx::Vector2dF& elastic_overscroll) { | 1091 const gfx::Vector2dF& elastic_overscroll) { |
1086 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, | 1092 UpdateElasticOverscrollInternal(property_trees, overscroll_elasticity_layer, |
1087 elastic_overscroll); | 1093 elastic_overscroll); |
1088 } | 1094 } |
1089 | 1095 |
1090 } // namespace draw_property_utils | 1096 } // namespace draw_property_utils |
1091 | 1097 |
1092 } // namespace cc | 1098 } // namespace cc |
OLD | NEW |