| 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 | 743 |
| 744 layer_tree_root->SetBounds(gfx::Size(2, 2)); | 744 layer_tree_root->SetBounds(gfx::Size(2, 2)); |
| 745 scroll_layer->SetBounds(gfx::Size(10, 10)); | 745 scroll_layer->SetBounds(gfx::Size(10, 10)); |
| 746 layer_tree_host_->UpdateLayers(); | 746 layer_tree_host_->UpdateLayers(); |
| 747 layer_tree_host_->CommitAndCreateLayerImplTree(); | 747 layer_tree_host_->CommitAndCreateLayerImplTree(); |
| 748 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); | 748 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); |
| 749 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( | 749 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( |
| 750 scroll_layer->element_id())); | 750 scroll_layer->element_id())); |
| 751 | 751 |
| 752 scroll_layer->SetBounds(gfx::Size(20, 20)); | 752 scroll_layer->SetBounds(gfx::Size(20, 20)); |
| 753 scroll_layer->ShowScrollbars(); |
| 753 scroll_layer->SetForceRenderSurfaceForTesting(true); | 754 scroll_layer->SetForceRenderSurfaceForTesting(true); |
| 754 layer_tree_host_->UpdateLayers(); | 755 layer_tree_host_->UpdateLayers(); |
| 755 host_impl->CreatePendingTree(); | 756 host_impl->CreatePendingTree(); |
| 756 layer_tree_host_->CommitAndCreatePendingTree(); | 757 layer_tree_host_->CommitAndCreatePendingTree(); |
| 757 host_impl->ActivateSyncTree(); | 758 host_impl->ActivateSyncTree(); |
| 758 EffectNode* node = | 759 EffectNode* node = |
| 759 host_impl->active_tree()->property_trees()->effect_tree.Node( | 760 host_impl->active_tree()->property_trees()->effect_tree.Node( |
| 760 scrollbar_layer->effect_tree_index()); | 761 scrollbar_layer->effect_tree_index()); |
| 761 EXPECT_EQ(node->opacity, 1.f); | 762 EXPECT_EQ(node->opacity, 1.f); |
| 762 } | 763 } |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1277 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1277 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1278 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1278 | 1279 |
| 1279 // Horizontal Scrollbars. | 1280 // Horizontal Scrollbars. |
| 1280 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1281 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1281 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1282 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1282 } | 1283 } |
| 1283 | 1284 |
| 1284 } // namespace | 1285 } // namespace |
| 1285 } // namespace cc | 1286 } // namespace cc |
| OLD | NEW |