OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/fake_layer_tree_host_impl.h" | 5 #include "cc/test/fake_layer_tree_host_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
11 #include "cc/test/fake_layer_tree_host_impl.h" | 11 #include "cc/test/fake_layer_tree_host_impl.h" |
12 #include "cc/test/layer_tree_settings_for_testing.h" | 12 #include "cc/test/layer_tree_settings_for_testing.h" |
13 #include "cc/test/test_shared_bitmap_manager.h" | |
14 #include "cc/trees/layer_tree_impl.h" | 13 #include "cc/trees/layer_tree_impl.h" |
15 | 14 |
16 namespace cc { | 15 namespace cc { |
17 | 16 |
18 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( | 17 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( |
19 TaskRunnerProvider* task_runner_provider, | 18 TaskRunnerProvider* task_runner_provider, |
20 SharedBitmapManager* manager, | |
21 TaskGraphRunner* task_graph_runner) | 19 TaskGraphRunner* task_graph_runner) |
22 : FakeLayerTreeHostImpl(LayerTreeSettingsForTesting(), | 20 : FakeLayerTreeHostImpl(LayerTreeSettingsForTesting(), |
23 task_runner_provider, | 21 task_runner_provider, |
24 manager, | 22 task_graph_runner) {} |
25 task_graph_runner, | |
26 nullptr) {} | |
27 | 23 |
28 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( | 24 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( |
29 const LayerTreeSettings& settings, | 25 const LayerTreeSettings& settings, |
30 TaskRunnerProvider* task_runner_provider, | 26 TaskRunnerProvider* task_runner_provider, |
31 SharedBitmapManager* manager, | |
32 TaskGraphRunner* task_graph_runner) | 27 TaskGraphRunner* task_graph_runner) |
33 : FakeLayerTreeHostImpl(settings, | |
34 task_runner_provider, | |
35 manager, | |
36 task_graph_runner, | |
37 nullptr) {} | |
38 | |
39 FakeLayerTreeHostImpl::FakeLayerTreeHostImpl( | |
40 const LayerTreeSettings& settings, | |
41 TaskRunnerProvider* task_runner_provider, | |
42 SharedBitmapManager* manager, | |
43 TaskGraphRunner* task_graph_runner, | |
44 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager) | |
45 : LayerTreeHostImpl(settings, | 28 : LayerTreeHostImpl(settings, |
46 &client_, | 29 &client_, |
47 task_runner_provider, | 30 task_runner_provider, |
48 &stats_instrumentation_, | 31 &stats_instrumentation_, |
49 manager, | |
50 gpu_memory_buffer_manager, | |
51 task_graph_runner, | 32 task_graph_runner, |
52 AnimationHost::CreateForTesting(ThreadInstance::IMPL), | 33 AnimationHost::CreateForTesting(ThreadInstance::IMPL), |
53 0), | 34 0), |
54 notify_tile_state_changed_called_(false) { | 35 notify_tile_state_changed_called_(false) { |
55 // Explicitly clear all debug settings. | 36 // Explicitly clear all debug settings. |
56 SetDebugState(LayerTreeDebugState()); | 37 SetDebugState(LayerTreeDebugState()); |
57 SetViewportSize(gfx::Size(100, 100)); | 38 SetViewportSize(gfx::Size(100, 100)); |
58 | 39 |
59 // Start an impl frame so tests have a valid frame_time to work with. | 40 // Start an impl frame so tests have a valid frame_time to work with. |
60 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); | 41 base::TimeTicks time_ticks = base::TimeTicks::FromInternalValue(1); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 LayerTreeImpl* layerTree, | 91 LayerTreeImpl* layerTree, |
111 bool force_skip_verify_visible_rect_calculations) { | 92 bool force_skip_verify_visible_rect_calculations) { |
112 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); | 93 RecursiveUpdateNumChildren(layerTree->root_layer_for_testing()); |
113 bool update_lcd_text = false; | 94 bool update_lcd_text = false; |
114 layerTree->BuildLayerListAndPropertyTreesForTesting(); | 95 layerTree->BuildLayerListAndPropertyTreesForTesting(); |
115 layerTree->UpdateDrawProperties(update_lcd_text, | 96 layerTree->UpdateDrawProperties(update_lcd_text, |
116 force_skip_verify_visible_rect_calculations); | 97 force_skip_verify_visible_rect_calculations); |
117 } | 98 } |
118 | 99 |
119 } // namespace cc | 100 } // namespace cc |
OLD | NEW |