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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 int next_id_; | 114 int next_id_; |
115 int total_ui_resource_created_; | 115 int total_ui_resource_created_; |
116 int total_ui_resource_deleted_; | 116 int total_ui_resource_deleted_; |
117 }; | 117 }; |
118 | 118 |
119 class ScrollbarLayerTest : public testing::Test { | 119 class ScrollbarLayerTest : public testing::Test { |
120 public: | 120 public: |
121 ScrollbarLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) { | 121 ScrollbarLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) { |
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 layer_tree_settings_.use_one_copy = false; | |
125 | 124 |
126 LayerTreeHost::InitParams params; | 125 LayerTreeHost::InitParams params; |
127 params.client = &fake_client_; | 126 params.client = &fake_client_; |
128 params.settings = &layer_tree_settings_; | 127 params.settings = &layer_tree_settings_; |
129 params.task_graph_runner = &task_graph_runner_; | 128 params.task_graph_runner = &task_graph_runner_; |
130 | 129 |
131 layer_tree_host_.reset( | 130 layer_tree_host_.reset( |
132 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); | 131 new FakeResourceTrackingLayerTreeHost(&fake_client_, ¶ms)); |
133 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); | 132 fake_client_.SetLayerTreeHost(layer_tree_host_.get()); |
134 // Force output surface creation for renderer capabilities. | 133 // Force output surface creation for renderer capabilities. |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1016 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1018 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1017 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1019 | 1018 |
1020 // Horizontal Scrollbars. | 1019 // Horizontal Scrollbars. |
1021 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1020 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1022 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1021 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1023 } | 1022 } |
1024 | 1023 |
1025 } // namespace | 1024 } // namespace |
1026 } // namespace cc | 1025 } // namespace cc |
OLD | NEW |