| 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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 int next_id_; | 96 int next_id_; |
| 97 int total_ui_resource_created_; | 97 int total_ui_resource_created_; |
| 98 int total_ui_resource_deleted_; | 98 int total_ui_resource_deleted_; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 class ScrollbarLayerTest : public testing::Test { | 101 class ScrollbarLayerTest : public testing::Test { |
| 102 public: | 102 public: |
| 103 ScrollbarLayerTest() { | 103 ScrollbarLayerTest() { |
| 104 layer_tree_settings_.single_thread_proxy_scheduler = false; | 104 layer_tree_settings_.single_thread_proxy_scheduler = false; |
| 105 layer_tree_settings_.use_zero_copy = true; | 105 layer_tree_settings_.use_zero_copy = true; |
| 106 layer_tree_settings_.scrollbar_animator = LayerTreeSettings::LINEAR_FADE; | 106 layer_tree_settings_.scrollbar_animator = |
| 107 LayerTreeSettings::ANDROID_OVERLAY; |
| 107 layer_tree_settings_.scrollbar_fade_delay = | 108 layer_tree_settings_.scrollbar_fade_delay = |
| 108 base::TimeDelta::FromMilliseconds(20); | 109 base::TimeDelta::FromMilliseconds(20); |
| 109 layer_tree_settings_.scrollbar_fade_duration = | 110 layer_tree_settings_.scrollbar_fade_duration = |
| 110 base::TimeDelta::FromMilliseconds(20); | 111 base::TimeDelta::FromMilliseconds(20); |
| 111 layer_tree_settings_.verify_clip_tree_calculations = true; | 112 layer_tree_settings_.verify_clip_tree_calculations = true; |
| 112 | 113 |
| 113 scrollbar_layer_id_ = -1; | 114 scrollbar_layer_id_ = -1; |
| 114 | 115 |
| 115 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); | 116 animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN); |
| 116 | 117 |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1168 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1169 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1169 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1170 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1170 | 1171 |
| 1171 // Horizontal Scrollbars. | 1172 // Horizontal Scrollbars. |
| 1172 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1173 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1173 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1174 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1174 } | 1175 } |
| 1175 | 1176 |
| 1176 } // namespace | 1177 } // namespace |
| 1177 } // namespace cc | 1178 } // namespace cc |
| OLD | NEW |