| 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/trees/layer_tree_host_common.h" | 10 #include "cc/trees/layer_tree_host_common.h" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 | 13 |
| 13 LayerTreeHostCommonTestBase::LayerTreeHostCommonTestBase() | 14 LayerTreeHostCommonTestBase::LayerTreeHostCommonTestBase() |
| 14 : render_surface_layer_list_count_(0) { | 15 : client_(FakeLayerTreeHostClient::DIRECT_3D), |
| 16 render_surface_layer_list_count_(0) { |
| 15 } | 17 } |
| 16 | 18 |
| 17 LayerTreeHostCommonTestBase::~LayerTreeHostCommonTestBase() { | 19 LayerTreeHostCommonTestBase::~LayerTreeHostCommonTestBase() { |
| 18 } | 20 } |
| 19 | 21 |
| 20 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( | 22 void LayerTreeHostCommonTestBase::SetLayerPropertiesForTesting( |
| 21 Layer* layer, | 23 Layer* layer, |
| 22 const gfx::Transform& transform, | 24 const gfx::Transform& transform, |
| 23 const gfx::Point3F& transform_origin, | 25 const gfx::Point3F& transform_origin, |
| 24 const gfx::PointF& position, | 26 const gfx::PointF& position, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 inputs.can_use_lcd_text = can_use_lcd_text; | 105 inputs.can_use_lcd_text = can_use_lcd_text; |
| 104 inputs.can_adjust_raster_scales = true; | 106 inputs.can_adjust_raster_scales = true; |
| 105 | 107 |
| 106 ++render_surface_layer_list_count_; | 108 ++render_surface_layer_list_count_; |
| 107 inputs.current_render_surface_layer_list_id = | 109 inputs.current_render_surface_layer_list_id = |
| 108 render_surface_layer_list_count_; | 110 render_surface_layer_list_count_; |
| 109 | 111 |
| 110 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 112 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 111 } | 113 } |
| 112 | 114 |
| 115 scoped_ptr<FakeLayerTreeHost> |
| 116 LayerTreeHostCommonTestBase::CreateFakeLayerTreeHost() { |
| 117 return FakeLayerTreeHost::Create(&client_); |
| 118 } |
| 119 |
| 113 } // namespace cc | 120 } // namespace cc |
| OLD | NEW |