| 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1024 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1026 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1025 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1027 | 1026 |
| 1028 // Horizontal Scrollbars. | 1027 // Horizontal Scrollbars. |
| 1029 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1028 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1030 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1029 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1031 } | 1030 } |
| 1032 | 1031 |
| 1033 } // namespace | 1032 } // namespace |
| 1034 } // namespace cc | 1033 } // namespace cc |
| OLD | NEW |