| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/layer_position_constraint.h" | 5 #include "cc/layers/layer_position_constraint.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 49 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
| 50 root_layer, device_viewport_size, &dummy_render_surface_layer_list); | 50 root_layer, device_viewport_size, &dummy_render_surface_layer_list); |
| 51 inputs.device_scale_factor = device_scale_factor; | 51 inputs.device_scale_factor = device_scale_factor; |
| 52 inputs.page_scale_factor = page_scale_factor; | 52 inputs.page_scale_factor = page_scale_factor; |
| 53 inputs.page_scale_application_layer = page_scale_application_layer; | 53 inputs.page_scale_application_layer = page_scale_application_layer; |
| 54 inputs.can_use_lcd_text = can_use_lcd_text; | 54 inputs.can_use_lcd_text = can_use_lcd_text; |
| 55 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 55 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void ExecuteCalculateDrawProperties(LayerImpl* root_layer) { | 58 void ExecuteCalculateDrawProperties(LayerImpl* root_layer) { |
| 59 LayerImpl* page_scale_application_layer = NULL; | 59 LayerImpl* page_scale_application_layer = nullptr; |
| 60 ExecuteCalculateDrawProperties( | 60 ExecuteCalculateDrawProperties( |
| 61 root_layer, 1.f, 1.f, page_scale_application_layer, false); | 61 root_layer, 1.f, 1.f, page_scale_application_layer, false); |
| 62 } | 62 } |
| 63 | 63 |
| 64 class LayerPositionConstraintTest : public testing::Test { | 64 class LayerPositionConstraintTest : public testing::Test { |
| 65 public: | 65 public: |
| 66 LayerPositionConstraintTest() : host_impl_(&proxy_, &shared_bitmap_manager_) { | 66 LayerPositionConstraintTest() : host_impl_(&proxy_, &shared_bitmap_manager_) { |
| 67 root_ = CreateTreeForTest(); | 67 root_ = CreateTreeForTest(); |
| 68 scroll_ = root_->children()[0]; | 68 scroll_ = root_->children()[0]; |
| 69 fixed_to_top_left_.set_is_fixed_position(true); | 69 fixed_to_top_left_.set_is_fixed_position(true); |
| (...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 fixed_to_container1->draw_transform()); | 1149 fixed_to_container1->draw_transform()); |
| 1150 | 1150 |
| 1151 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, | 1151 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, |
| 1152 container2->draw_transform()); | 1152 container2->draw_transform()); |
| 1153 | 1153 |
| 1154 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, | 1154 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, |
| 1155 fixed_to_container2->draw_transform()); | 1155 fixed_to_container2->draw_transform()); |
| 1156 } | 1156 } |
| 1157 } // namespace | 1157 } // namespace |
| 1158 } // namespace cc | 1158 } // namespace cc |
| OLD | NEW |