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