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