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/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 (recursive_data->num_layer_or_descendants_with_copy_request != 0); | 1352 (recursive_data->num_layer_or_descendants_with_copy_request != 0); |
1353 layer->draw_properties().layer_or_descendant_has_input_handler = | 1353 layer->draw_properties().layer_or_descendant_has_input_handler = |
1354 (recursive_data->num_layer_or_descendants_with_input_handler != 0); | 1354 (recursive_data->num_layer_or_descendants_with_input_handler != 0); |
1355 } | 1355 } |
1356 | 1356 |
1357 void LayerTreeHostCommon::PreCalculateMetaInformation(Layer* root_layer) { | 1357 void LayerTreeHostCommon::PreCalculateMetaInformation(Layer* root_layer) { |
1358 PreCalculateMetaInformationRecursiveData recursive_data; | 1358 PreCalculateMetaInformationRecursiveData recursive_data; |
1359 PreCalculateMetaInformationInternal(root_layer, &recursive_data); | 1359 PreCalculateMetaInformationInternal(root_layer, &recursive_data); |
1360 } | 1360 } |
1361 | 1361 |
| 1362 void LayerTreeHostCommon::PreCalculateMetaInformationForTesting( |
| 1363 LayerImpl* root_layer) { |
| 1364 PreCalculateMetaInformationRecursiveData recursive_data; |
| 1365 PreCalculateMetaInformationInternal(root_layer, &recursive_data); |
| 1366 } |
| 1367 |
1362 template <typename LayerType> | 1368 template <typename LayerType> |
1363 struct SubtreeGlobals { | 1369 struct SubtreeGlobals { |
1364 int max_texture_size; | 1370 int max_texture_size; |
1365 float device_scale_factor; | 1371 float device_scale_factor; |
1366 float page_scale_factor; | 1372 float page_scale_factor; |
1367 const LayerType* page_scale_application_layer; | 1373 const LayerType* page_scale_application_layer; |
1368 gfx::Vector2dF elastic_overscroll; | 1374 gfx::Vector2dF elastic_overscroll; |
1369 const LayerType* elastic_overscroll_application_layer; | 1375 const LayerType* elastic_overscroll_application_layer; |
1370 bool can_adjust_raster_scales; | 1376 bool can_adjust_raster_scales; |
1371 bool can_render_to_separate_surface; | 1377 bool can_render_to_separate_surface; |
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2751 PropertyTrees* trees_from_inputs) { | 2757 PropertyTrees* trees_from_inputs) { |
2752 return layer->layer_tree_host()->property_trees(); | 2758 return layer->layer_tree_host()->property_trees(); |
2753 } | 2759 } |
2754 | 2760 |
2755 PropertyTrees* GetPropertyTrees(LayerImpl* layer, | 2761 PropertyTrees* GetPropertyTrees(LayerImpl* layer, |
2756 PropertyTrees* trees_from_inputs) { | 2762 PropertyTrees* trees_from_inputs) { |
2757 return trees_from_inputs; | 2763 return trees_from_inputs; |
2758 } | 2764 } |
2759 | 2765 |
2760 } // namespace cc | 2766 } // namespace cc |
OLD | NEW |