| 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); |
| 72 | 73 |
| 73 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, | 74 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, |
| 74 float device_scale_factor, | 75 float device_scale_factor, |
| 75 float page_scale_factor, | 76 float page_scale_factor, |
| 76 LayerImpl* page_scale_application_layer, | 77 LayerImpl* page_scale_application_layer, |
| 77 bool can_use_lcd_text); | 78 bool can_use_lcd_text, |
| 79 bool layers_always_allowed_lcd_text); |
| 78 | 80 |
| 79 template <class LayerType> | 81 template <class LayerType> |
| 80 void ExecuteCalculateDrawProperties(LayerType* root_layer) { | 82 void ExecuteCalculateDrawProperties(LayerType* root_layer) { |
| 81 LayerType* page_scale_application_layer = NULL; | 83 LayerType* page_scale_application_layer = NULL; |
| 82 ExecuteCalculateDrawProperties( | 84 ExecuteCalculateDrawProperties(root_layer, 1.f, 1.f, |
| 83 root_layer, 1.f, 1.f, page_scale_application_layer, false); | 85 page_scale_application_layer, false, false); |
| 84 } | 86 } |
| 85 | 87 |
| 86 template <class LayerType> | 88 template <class LayerType> |
| 87 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 89 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 88 float device_scale_factor) { | 90 float device_scale_factor) { |
| 89 LayerType* page_scale_application_layer = NULL; | 91 LayerType* page_scale_application_layer = NULL; |
| 90 ExecuteCalculateDrawProperties(root_layer, | 92 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, 1.f, |
| 91 device_scale_factor, | 93 page_scale_application_layer, false, false); |
| 92 1.f, | |
| 93 page_scale_application_layer, | |
| 94 false); | |
| 95 } | 94 } |
| 96 | 95 |
| 97 template <class LayerType> | 96 template <class LayerType> |
| 98 void ExecuteCalculateDrawProperties(LayerType* root_layer, | 97 void ExecuteCalculateDrawProperties(LayerType* root_layer, |
| 99 float device_scale_factor, | 98 float device_scale_factor, |
| 100 float page_scale_factor, | 99 float page_scale_factor, |
| 101 LayerType* page_scale_application_layer) { | 100 LayerType* page_scale_application_layer) { |
| 102 ExecuteCalculateDrawProperties(root_layer, | 101 ExecuteCalculateDrawProperties(root_layer, device_scale_factor, |
| 103 device_scale_factor, | |
| 104 page_scale_factor, | 102 page_scale_factor, |
| 105 page_scale_application_layer, | 103 page_scale_application_layer, false, false); |
| 106 false); | |
| 107 } | 104 } |
| 108 | 105 |
| 109 RenderSurfaceLayerList* render_surface_layer_list() const { | 106 RenderSurfaceLayerList* render_surface_layer_list() const { |
| 110 return render_surface_layer_list_.get(); | 107 return render_surface_layer_list_.get(); |
| 111 } | 108 } |
| 112 | 109 |
| 113 LayerImplList* render_surface_layer_list_impl() const { | 110 LayerImplList* render_surface_layer_list_impl() const { |
| 114 return render_surface_layer_list_impl_.get(); | 111 return render_surface_layer_list_impl_.get(); |
| 115 } | 112 } |
| 116 | 113 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 127 FakeLayerTreeHostClient client_; | 124 FakeLayerTreeHostClient client_; |
| 128 int render_surface_layer_list_count_; | 125 int render_surface_layer_list_count_; |
| 129 }; | 126 }; |
| 130 | 127 |
| 131 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, | 128 class LayerTreeHostCommonTest : public LayerTreeHostCommonTestBase, |
| 132 public testing::Test {}; | 129 public testing::Test {}; |
| 133 | 130 |
| 134 } // namespace cc | 131 } // namespace cc |
| 135 | 132 |
| 136 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ | 133 #endif // CC_TEST_LAYER_TREE_HOST_COMMON_TEST_H_ |
| OLD | NEW |