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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <unordered_map> | 7 #include <unordered_map> |
8 | 8 |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 params.settings = &layer_tree_settings_; | 117 params.settings = &layer_tree_settings_; |
118 params.task_graph_runner = &task_graph_runner_; | 118 params.task_graph_runner = &task_graph_runner_; |
119 params.animation_host = | 119 params.animation_host = |
120 AnimationHost::CreateForTesting(ThreadInstance::MAIN); | 120 AnimationHost::CreateForTesting(ThreadInstance::MAIN); |
121 | 121 |
122 layer_tree_host_.reset( | 122 layer_tree_host_.reset( |
123 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); | 123 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); |
124 layer_tree_ = layer_tree_host_->GetLayerTree(); | 124 layer_tree_ = layer_tree_host_->GetLayerTree(); |
125 layer_tree_host_->SetVisible(true); | 125 layer_tree_host_->SetVisible(true); |
126 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); | 126 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); |
127 // Force output surface creation for renderer capabilities. | |
128 layer_tree_host_->Composite(base::TimeTicks()); | |
129 EXPECT_FALSE(layer_tree_host_->output_surface_lost()); | |
130 } | 127 } |
131 | 128 |
132 LayerImpl* LayerImplForScrollAreaAndScrollbar( | 129 LayerImpl* LayerImplForScrollAreaAndScrollbar( |
133 FakeLayerTreeHost* host, | 130 FakeLayerTreeHost* host, |
134 std::unique_ptr<Scrollbar> scrollbar, | 131 std::unique_ptr<Scrollbar> scrollbar, |
135 bool reverse_order, | 132 bool reverse_order, |
136 bool use_solid_color_scrollbar, | 133 bool use_solid_color_scrollbar, |
137 int thumb_thickness, | 134 int thumb_thickness, |
138 int track_start) { | 135 int track_start) { |
139 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 136 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
(...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1129 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1133 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1130 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1134 | 1131 |
1135 // Horizontal Scrollbars. | 1132 // Horizontal Scrollbars. |
1136 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1133 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1137 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1134 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1138 } | 1135 } |
1139 | 1136 |
1140 } // namespace | 1137 } // namespace |
1141 } // namespace cc | 1138 } // namespace cc |
OLD | NEW |