| 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 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const gfx::Point3F& transform_origin, | 69 const gfx::Point3F& transform_origin, |
| 70 const gfx::PointF& position, | 70 const gfx::PointF& position, |
| 71 const gfx::Size& bounds, | 71 const gfx::Size& bounds, |
| 72 bool flatten_transform, | 72 bool flatten_transform, |
| 73 bool is_3d_sorted, | 73 bool is_3d_sorted, |
| 74 bool create_render_surface); | 74 bool create_render_surface); |
| 75 | 75 |
| 76 void ExecuteCalculateDrawProperties(Layer* root_layer, | 76 void ExecuteCalculateDrawProperties(Layer* root_layer, |
| 77 float device_scale_factor, | 77 float device_scale_factor, |
| 78 float page_scale_factor, | 78 float page_scale_factor, |
| 79 Layer* page_scale_application_layer, | 79 Layer* page_scale_application_layer); |
| 80 bool can_use_lcd_text, | |
| 81 bool layers_always_allowed_lcd_text); | |
| 82 | 80 |
| 83 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, | 81 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, |
| 84 float device_scale_factor, | 82 float device_scale_factor, |
| 85 float page_scale_factor, | 83 float page_scale_factor, |
| 86 LayerImpl* page_scale_application_layer, | 84 LayerImpl* page_scale_application_layer); |
| 87 bool can_use_lcd_text, | |
| 88 bool layers_always_allowed_lcd_text); | |
| 89 | 85 |
| 90 template <class LayerType> | 86 template <class LayerType> |
| 91 void ExecuteCalculateDrawProperties(LayerType* root_layer) { | 87 void ExecuteCalculateDrawProperties(LayerType* root_layer) { |
| 92 LayerType* page_scale_application_layer = NULL; | 88 LayerType* page_scale_application_layer = NULL; |
| 93 ExecuteCalculateDrawProperties(root_layer, 1.f, 1.f, | 89 ExecuteCalculateDrawProperties(root_layer, 1.f, 1.f, |
| 94 page_scale_application_layer, false, false); | 90 page_scale_application_layer); |
| 95 } | 91 } |
| 96 | 92 |
| 97 template <class LayerType> | 93 template <class LayerType> |
| 98 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 94 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 99 float device_scale_factor) { | 95 float device_scale_factor) { |
| 100 LayerType* page_scale_application_layer = NULL; | 96 LayerType* page_scale_application_layer = NULL; |
| 101 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, 1.f, | 97 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, 1.f, |
| 102 page_scale_application_layer, false, false); | 98 page_scale_application_layer); |
| 103 } | |
| 104 | |
| 105 template <class LayerType> | |
| 106 void ExecuteCalculateDrawProperties(LayerType* root_layer, | |
| 107 float device_scale_factor, | |
| 108 float page_scale_factor, | |
| 109 LayerType* page_scale_application_layer) { | |
| 110 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, | |
| 111 page_scale_factor, | |
| 112 page_scale_application_layer, false, false); | |
| 113 } | 99 } |
| 114 | 100 |
| 115 void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer); | 101 void ExecuteCalculateDrawPropertiesWithPropertyTrees(Layer* layer); |
| 116 void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer); | 102 void ExecuteCalculateDrawPropertiesWithPropertyTrees(LayerImpl* layer); |
| 117 | 103 |
| 118 void ExecuteCalculateDrawPropertiesWithoutSeparateSurfaces( | 104 void ExecuteCalculateDrawPropertiesWithoutSeparateSurfaces( |
| 119 LayerImpl* root_layer); | 105 LayerImpl* root_layer); |
| 120 | 106 |
| 121 LayerImplList* render_surface_layer_list_impl() const { | 107 LayerImplList* render_surface_layer_list_impl() const { |
| 122 return render_surface_layer_list_impl_.get(); | 108 return render_surface_layer_list_impl_.get(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), | 140 ->scroll_tree.SetScrollOffsetDeltaForTesting(layer_impl->id(), |
| 155 delta)) | 141 delta)) |
| 156 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( | 142 layer_impl->layer_tree_impl()->DidUpdateScrollOffset( |
| 157 layer_impl->id(), layer_impl->transform_tree_index()); | 143 layer_impl->id(), layer_impl->transform_tree_index()); |
| 158 } | 144 } |
| 159 }; | 145 }; |
| 160 | 146 |
| 161 } // namespace cc | 147 } // namespace cc |
| 162 | 148 |
| 163 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 149 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |