| 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 #include "cc/test/layer_tree_host_common_test.h" | 5 #include "cc/test/layer_tree_host_common_test.h" |
| 6 | 6 |
| 7 #include "cc/layers/layer.h" | 7 #include "cc/layers/layer.h" |
| 8 #include "cc/layers/layer_impl.h" | 8 #include "cc/layers/layer_impl.h" |
| 9 #include "cc/test/fake_layer_tree_host.h" | 9 #include "cc/test/fake_layer_tree_host.h" |
| 10 #include "cc/trees/draw_property_utils.h" | 10 #include "cc/trees/draw_property_utils.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const gfx::Size& bounds, | 41 const gfx::Size& bounds, |
| 42 bool flatten_transform, | 42 bool flatten_transform, |
| 43 bool is_3d_sorted, | 43 bool is_3d_sorted, |
| 44 bool create_render_surface) { | 44 bool create_render_surface) { |
| 45 SetLayerPropertiesForTestingInternal(layer, transform, transform_origin, | 45 SetLayerPropertiesForTestingInternal(layer, transform, transform_origin, |
| 46 position, bounds, flatten_transform, | 46 position, bounds, flatten_transform, |
| 47 is_3d_sorted); | 47 is_3d_sorted); |
| 48 if (create_render_surface) { | 48 if (create_render_surface) { |
| 49 layer->SetHasRenderSurface(true); | 49 layer->SetHasRenderSurface(true); |
| 50 } | 50 } |
| 51 | |
| 52 layer->SetContentBounds(bounds); | |
| 53 } | 51 } |
| 54 | 52 |
| 55 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( | 53 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( |
| 56 Layer* root_layer, | 54 Layer* root_layer, |
| 57 float device_scale_factor, | 55 float device_scale_factor, |
| 58 float page_scale_factor, | 56 float page_scale_factor, |
| 59 Layer* page_scale_layer, | 57 Layer* page_scale_layer, |
| 60 bool can_use_lcd_text, | 58 bool can_use_lcd_text, |
| 61 bool layers_always_allowed_lcd_text) { | 59 bool layers_always_allowed_lcd_text) { |
| 62 EXPECT_TRUE(page_scale_layer || (page_scale_factor == 1.f)); | 60 EXPECT_TRUE(page_scale_layer || (page_scale_factor == 1.f)); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 155 |
| 158 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 156 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 159 } | 157 } |
| 160 | 158 |
| 161 scoped_ptr<FakeLayerTreeHost> | 159 scoped_ptr<FakeLayerTreeHost> |
| 162 LayerTreeHostCommonTestBase::CreateFakeLayerTreeHost() { | 160 LayerTreeHostCommonTestBase::CreateFakeLayerTreeHost() { |
| 163 return FakeLayerTreeHost::Create(&client_, &task_graph_runner_); | 161 return FakeLayerTreeHost::Create(&client_, &task_graph_runner_); |
| 164 } | 162 } |
| 165 | 163 |
| 166 } // namespace cc | 164 } // namespace cc |
| OLD | NEW |