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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 node = layer_tree_impl->property_trees()->effect_tree.Node( | 621 node = layer_tree_impl->property_trees()->effect_tree.Node( |
622 scrollbar_layer->effect_tree_index()); | 622 scrollbar_layer->effect_tree_index()); |
623 EXPECT_EQ(node->opacity, 0.f); | 623 EXPECT_EQ(node->opacity, 0.f); |
624 host_impl->ActivateSyncTree(); | 624 host_impl->ActivateSyncTree(); |
625 layer_tree_impl = host_impl->active_tree(); | 625 layer_tree_impl = host_impl->active_tree(); |
626 node = layer_tree_impl->property_trees()->effect_tree.Node( | 626 node = layer_tree_impl->property_trees()->effect_tree.Node( |
627 scrollbar_layer->effect_tree_index()); | 627 scrollbar_layer->effect_tree_index()); |
628 EXPECT_EQ(node->opacity, 0.f); | 628 EXPECT_EQ(node->opacity, 0.f); |
629 | 629 |
630 // This tests that activation does not change the opacity of scrollbar layer. | 630 // This tests that activation does not change the opacity of scrollbar layer. |
631 LayerImpl* scrollbar_layer_impl = | 631 ScrollbarLayerImplBase* scrollbar_layer_impl = |
632 layer_tree_impl->LayerById(scrollbar_layer->id()); | 632 static_cast<ScrollbarLayerImplBase*>( |
633 layer_tree_impl->property_trees()->effect_tree.OnOpacityAnimated( | 633 layer_tree_impl->LayerById(scrollbar_layer->id())); |
634 0.25f, scrollbar_layer_impl->effect_tree_index(), layer_tree_impl); | 634 scrollbar_layer_impl->SetOverlayScrollbarLayerOpacityAnimated(0.25f); |
635 host_impl->CreatePendingTree(); | 635 host_impl->CreatePendingTree(); |
636 layer_impl_tree_root = layer_tree_host_->CommitAndCreatePendingTree(); | 636 layer_impl_tree_root = layer_tree_host_->CommitAndCreatePendingTree(); |
637 layer_tree_impl = layer_impl_tree_root->layer_tree_impl(); | 637 layer_tree_impl = layer_impl_tree_root->layer_tree_impl(); |
638 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); | 638 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); |
639 node = layer_tree_impl->property_trees()->effect_tree.Node( | 639 node = layer_tree_impl->property_trees()->effect_tree.Node( |
640 scrollbar_layer->effect_tree_index()); | 640 scrollbar_layer->effect_tree_index()); |
641 EXPECT_EQ(node->opacity, 0.f); | 641 EXPECT_EQ(node->opacity, 0.f); |
642 host_impl->ActivateSyncTree(); | 642 host_impl->ActivateSyncTree(); |
643 layer_tree_impl = host_impl->active_tree(); | 643 layer_tree_impl = host_impl->active_tree(); |
644 node = layer_tree_impl->property_trees()->effect_tree.Node( | 644 node = layer_tree_impl->property_trees()->effect_tree.Node( |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1167 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
1168 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1168 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
1169 | 1169 |
1170 // Horizontal Scrollbars. | 1170 // Horizontal Scrollbars. |
1171 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1171 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
1172 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1172 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
1173 } | 1173 } |
1174 | 1174 |
1175 } // namespace | 1175 } // namespace |
1176 } // namespace cc | 1176 } // namespace cc |
OLD | NEW |