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 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 layer_tree_host_->UpdateLayers(); | 741 layer_tree_host_->UpdateLayers(); |
742 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); | 742 LayerTreeHostImpl* host_impl = layer_tree_host_->host_impl(); |
743 host_impl->CreatePendingTree(); | 743 host_impl->CreatePendingTree(); |
744 layer_tree_host_->CommitAndCreatePendingTree(); | 744 layer_tree_host_->CommitAndCreatePendingTree(); |
745 host_impl->ActivateSyncTree(); | 745 host_impl->ActivateSyncTree(); |
746 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( | 746 EXPECT_TRUE(host_impl->ScrollbarAnimationControllerForElementId( |
747 scroll_layer->element_id())); | 747 scroll_layer->element_id())); |
748 | 748 |
749 scroll_layer->SetBounds(gfx::Size(20, 20)); | 749 scroll_layer->SetBounds(gfx::Size(20, 20)); |
750 scroll_layer->ShowScrollbars(); | 750 scroll_layer->ShowScrollbars(); |
751 scroll_layer->SetForceRenderSurfaceForTesting(true); | 751 scroll_layer->SetForceRenderSurface(true); |
752 layer_tree_host_->UpdateLayers(); | 752 layer_tree_host_->UpdateLayers(); |
753 host_impl->CreatePendingTree(); | 753 host_impl->CreatePendingTree(); |
754 layer_tree_host_->CommitAndCreatePendingTree(); | 754 layer_tree_host_->CommitAndCreatePendingTree(); |
755 host_impl->ActivateSyncTree(); | 755 host_impl->ActivateSyncTree(); |
756 EffectNode* node = | 756 EffectNode* node = |
757 host_impl->active_tree()->property_trees()->effect_tree.Node( | 757 host_impl->active_tree()->property_trees()->effect_tree.Node( |
758 scrollbar_layer->effect_tree_index()); | 758 scrollbar_layer->effect_tree_index()); |
759 EXPECT_EQ(node->opacity, 1.f); | 759 EXPECT_EQ(node->opacity, 1.f); |
760 } | 760 } |
761 | 761 |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1270 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1270 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1271 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1271 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1272 | 1272 |
1273 // Horizontal Scrollbars. | 1273 // Horizontal Scrollbars. |
1274 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1274 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1275 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1275 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1276 } | 1276 } |
1277 | 1277 |
1278 } // namespace | 1278 } // namespace |
1279 } // namespace cc | 1279 } // namespace cc |
OLD | NEW |