OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_test.h" | 5 #include "cc/test/layer_tree_test.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 inner_viewport_container_layer->id()); | 65 inner_viewport_container_layer->id()); |
66 outer_scroll_layer->SetScrollClipLayerId( | 66 outer_scroll_layer->SetScrollClipLayerId( |
67 outer_viewport_container_layer->id()); | 67 outer_viewport_container_layer->id()); |
68 | 68 |
69 inner_viewport_container_layer->SetBounds(inner_bounds); | 69 inner_viewport_container_layer->SetBounds(inner_bounds); |
70 inner_viewport_scroll_layer->SetBounds(outer_bounds); | 70 inner_viewport_scroll_layer->SetBounds(outer_bounds); |
71 outer_viewport_container_layer->SetBounds(outer_bounds); | 71 outer_viewport_container_layer->SetBounds(outer_bounds); |
72 | 72 |
73 inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); | 73 inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true); |
74 outer_scroll_layer->SetIsContainerForFixedPositionLayers(true); | 74 outer_scroll_layer->SetIsContainerForFixedPositionLayers(true); |
75 host->RegisterViewportLayers(NULL, page_scale_layer, | 75 host->GetLayerTree()->RegisterViewportLayers( |
76 inner_viewport_scroll_layer, outer_scroll_layer); | 76 NULL, page_scale_layer, inner_viewport_scroll_layer, outer_scroll_layer); |
77 } | 77 } |
78 | 78 |
79 void CreateVirtualViewportLayers(Layer* root_layer, | 79 void CreateVirtualViewportLayers(Layer* root_layer, |
80 const gfx::Size& inner_bounds, | 80 const gfx::Size& inner_bounds, |
81 const gfx::Size& outer_bounds, | 81 const gfx::Size& outer_bounds, |
82 const gfx::Size& scroll_bounds, | 82 const gfx::Size& scroll_bounds, |
83 LayerTreeHost* host) { | 83 LayerTreeHost* host) { |
84 scoped_refptr<Layer> outer_viewport_scroll_layer = Layer::Create(); | 84 scoped_refptr<Layer> outer_viewport_scroll_layer = Layer::Create(); |
85 | 85 |
86 outer_viewport_scroll_layer->SetBounds(scroll_bounds); | 86 outer_viewport_scroll_layer->SetBounds(scroll_bounds); |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 } | 935 } |
936 | 936 |
937 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { | 937 LayerTreeHost* LayerTreeTest::remote_client_layer_tree_host() { |
938 DCHECK(IsRemoteTest()); | 938 DCHECK(IsRemoteTest()); |
939 DCHECK(task_runner_provider()->IsMainThread() || | 939 DCHECK(task_runner_provider()->IsMainThread() || |
940 task_runner_provider()->IsMainThreadBlocked()); | 940 task_runner_provider()->IsMainThreadBlocked()); |
941 return remote_client_layer_tree_host_.get(); | 941 return remote_client_layer_tree_host_.get(); |
942 } | 942 } |
943 | 943 |
944 } // namespace cc | 944 } // namespace cc |
OLD | NEW |