| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
| 10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 update_layer_list_impl_.get()); | 159 update_layer_list_impl_.get()); |
| 160 } | 160 } |
| 161 | 161 |
| 162 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( | 162 void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( |
| 163 LayerImpl* root_layer, | 163 LayerImpl* root_layer, |
| 164 float device_scale_factor, | 164 float device_scale_factor, |
| 165 float page_scale_factor, | 165 float page_scale_factor, |
| 166 LayerImpl* page_scale_layer, | 166 LayerImpl* page_scale_layer, |
| 167 bool can_use_lcd_text, | 167 bool can_use_lcd_text, |
| 168 bool layers_always_allowed_lcd_text) { | 168 bool layers_always_allowed_lcd_text) { |
| 169 host_impl()->active_tree()->SetDeviceScaleFactor(device_scale_factor); | 169 root_layer->layer_tree_impl()->SetDeviceScaleFactor(device_scale_factor); |
| 170 host_impl()->active_tree()->SetPageScaleOnActiveTree(page_scale_factor); | 170 if (page_scale_layer) |
| 171 root_layer->layer_tree_impl()->SetViewportLayersFromIds( |
| 172 Layer::INVALID_ID, page_scale_layer->id(), Layer::INVALID_ID, |
| 173 Layer::INVALID_ID); |
| 174 root_layer->layer_tree_impl()->SetPageScaleOnActiveTree(page_scale_factor); |
| 171 | 175 |
| 172 gfx::Transform identity_matrix; | 176 gfx::Transform identity_matrix; |
| 173 gfx::Size device_viewport_size = | 177 gfx::Size device_viewport_size = |
| 174 gfx::Size(root_layer->bounds().width() * device_scale_factor, | 178 gfx::Size(root_layer->bounds().width() * device_scale_factor, |
| 175 root_layer->bounds().height() * device_scale_factor); | 179 root_layer->bounds().height() * device_scale_factor); |
| 176 | 180 |
| 177 render_surface_layer_list_impl_.reset(new LayerImplList); | 181 render_surface_layer_list_impl_.reset(new LayerImplList); |
| 178 | 182 |
| 179 // We are probably not testing what is intended if the root_layer bounds are | 183 // We are probably not testing what is intended if the root_layer bounds are |
| 180 // empty. | 184 // empty. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 232 |
| 229 LayerTreeHostCommonTest::LayerTreeHostCommonTest() | 233 LayerTreeHostCommonTest::LayerTreeHostCommonTest() |
| 230 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} | 234 : LayerTreeHostCommonTestBase(LayerTreeSettings()) {} |
| 231 | 235 |
| 232 LayerTreeHostCommonTest::LayerTreeHostCommonTest( | 236 LayerTreeHostCommonTest::LayerTreeHostCommonTest( |
| 233 const LayerTreeSettings& settings) | 237 const LayerTreeSettings& settings) |
| 234 : LayerTreeHostCommonTestBase(settings) { | 238 : LayerTreeHostCommonTestBase(settings) { |
| 235 } | 239 } |
| 236 | 240 |
| 237 } // namespace cc | 241 } // namespace cc |
| OLD | NEW |