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 "base/containers/hash_tables.h" | 5 #include "base/containers/hash_tables.h" |
6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
7 #include "cc/animation/scrollbar_animation_controller.h" | 7 #include "cc/animation/scrollbar_animation_controller.h" |
8 #include "cc/layers/append_quads_data.h" | 8 #include "cc/layers/append_quads_data.h" |
9 #include "cc/layers/painted_scrollbar_layer.h" | 9 #include "cc/layers/painted_scrollbar_layer.h" |
10 #include "cc/layers/painted_scrollbar_layer_impl.h" | 10 #include "cc/layers/painted_scrollbar_layer_impl.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 layer_tree_settings_.single_thread_proxy_scheduler = false; | 122 layer_tree_settings_.single_thread_proxy_scheduler = false; |
123 layer_tree_settings_.use_zero_copy = true; | 123 layer_tree_settings_.use_zero_copy = true; |
124 | 124 |
125 LayerTreeHost::InitParams params; | 125 LayerTreeHost::InitParams params; |
126 params.client = &fake_client_; | 126 params.client = &fake_client_; |
127 params.settings = &layer_tree_settings_; | 127 params.settings = &layer_tree_settings_; |
128 params.task_graph_runner = &task_graph_runner_; | 128 params.task_graph_runner = &task_graph_runner_; |
129 | 129 |
130 layer_tree_host_.reset( | 130 layer_tree_host_.reset( |
131 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); | 131 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); |
| 132 layer_tree_host_->SetVisible(true); |
132 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); | 133 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); |
133 // Force output surface creation for renderer capabilities. | 134 // Force output surface creation for renderer capabilities. |
134 layer_tree_host_->Composite(base::TimeTicks()); | 135 layer_tree_host_->Composite(base::TimeTicks()); |
135 EXPECT_FALSE(layer_tree_host_->output_surface_lost()); | 136 EXPECT_FALSE(layer_tree_host_->output_surface_lost()); |
136 } | 137 } |
137 | 138 |
138 const LayerSettings& layer_settings() { return layer_settings_; } | 139 const LayerSettings& layer_settings() { return layer_settings_; } |
139 | 140 |
140 protected: | 141 protected: |
141 FakeLayerTreeHostClient fake_client_; | 142 FakeLayerTreeHostClient fake_client_; |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1025 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1025 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1026 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1026 | 1027 |
1027 // Horizontal Scrollbars. | 1028 // Horizontal Scrollbars. |
1028 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1029 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1029 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1030 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1030 } | 1031 } |
1031 | 1032 |
1032 } // namespace | 1033 } // namespace |
1033 } // namespace cc | 1034 } // namespace cc |
OLD | NEW |