| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const gfx::Point3F& transform_origin, | 61 const gfx::Point3F& transform_origin, |
| 62 const gfx::PointF& position, | 62 const gfx::PointF& position, |
| 63 const gfx::Size& bounds, | 63 const gfx::Size& bounds, |
| 64 bool flatten_transform, | 64 bool flatten_transform, |
| 65 bool is_3d_sorted); | 65 bool is_3d_sorted); |
| 66 | 66 |
| 67 void ExecuteCalculateDrawProperties(Layer* root_layer, | 67 void ExecuteCalculateDrawProperties(Layer* root_layer, |
| 68 float device_scale_factor, | 68 float device_scale_factor, |
| 69 float page_scale_factor, | 69 float page_scale_factor, |
| 70 Layer* page_scale_application_layer, | 70 Layer* page_scale_application_layer, |
| 71 bool can_use_lcd_text, | 71 bool can_use_lcd_text); |
| 72 bool layers_always_allowed_lcd_text); | |
| 73 | 72 |
| 74 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, | 73 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, |
| 75 float device_scale_factor, | 74 float device_scale_factor, |
| 76 float page_scale_factor, | 75 float page_scale_factor, |
| 77 LayerImpl* page_scale_application_layer, | 76 LayerImpl* page_scale_application_layer, |
| 78 bool can_use_lcd_text, | 77 bool can_use_lcd_text); |
| 79 bool layers_always_allowed_lcd_text); | |
| 80 | 78 |
| 81 template <class LayerType> | 79 template <class LayerType> |
| 82 void ExecuteCalculateDrawProperties(LayerType* root_layer) { | 80 void ExecuteCalculateDrawProperties(LayerType* root_layer) { |
| 83 LayerType* page_scale_application_layer = NULL; | 81 LayerType* page_scale_application_layer = NULL; |
| 84 ExecuteCalculateDrawProperties(root_layer, 1.f, 1.f, | 82 ExecuteCalculateDrawProperties( |
| 85 page_scale_application_layer, false, false); | 83 root_layer, 1.f, 1.f, page_scale_application_layer, false); |
| 86 } | 84 } |
| 87 | 85 |
| 88 template <class LayerType> | 86 template <class LayerType> |
| 89 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 87 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 90 float device_scale_factor) { | 88 float device_scale_factor) { |
| 91 LayerType* page_scale_application_layer = NULL; | 89 LayerType* page_scale_application_layer = NULL; |
| 92 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, 1.f, | 90 ExecuteCalculateDrawProperties(root_layer, |
| 93 page_scale_application_layer, false, false); | 91 device_scale_factor, |
| 92 1.f, |
| 93 page_scale_application_layer, |
| 94 false); |
| 94 } | 95 } |
| 95 | 96 |
| 96 template <class LayerType> | 97 template <class LayerType> |
| 97 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 98 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 98 float device_scale_factor, | 99 float device_scale_factor, |
| 99 float page_scale_factor, | 100 float page_scale_factor, |
| 100 LayerType* page_scale_application_layer) { | 101 LayerType* page_scale_application_layer) { |
| 101 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, | 102 ExecuteCalculateDrawProperties(root_layer, |
| 103 device_scale_factor, |
| 102 page_scale_factor, | 104 page_scale_factor, |
| 103 page_scale_application_layer, false, false); | 105 page_scale_application_layer, |
| 106 false); |
| 104 } | 107 } |
| 105 | 108 |
| 106 RenderSurfaceLayerList* render_surface_layer_list() const { | 109 RenderSurfaceLayerList* render_surface_layer_list() const { |
| 107 return render_surface_layer_list_.get(); | 110 return render_surface_layer_list_.get(); |
| 108 } | 111 } |
| 109 | 112 |
| 110 LayerImplList* render_surface_layer_list_impl() const { | 113 LayerImplList* render_surface_layer_list_impl() const { |
| 111 return render_surface_layer_list_impl_.get(); | 114 return render_surface_layer_list_impl_.get(); |
| 112 } | 115 } |
| 113 | 116 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 124 FakeLayerTreeHostClient client_; | 127 FakeLayerTreeHostClient client_; |
| 125 int render_surface_layer_list_count_; | 128 int render_surface_layer_list_count_; |
| 126 }; | 129 }; |
| 127 | 130 |
| 128 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 131 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
| 129 public testing::Test {}; | 132 public testing::Test {}; |
| 130 | 133 |
| 131 } // namespace cc | 134 } // namespace cc |
| 132 | 135 |
| 133 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 136 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |