| 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/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 EXPECT_EQ(node->opacity, 0.f); | 565 EXPECT_EQ(node->opacity, 0.f); |
| 566 host_impl->ActivateSyncTree(); | 566 host_impl->ActivateSyncTree(); |
| 567 layer_tree_impl = host_impl->active_tree(); | 567 layer_tree_impl = host_impl->active_tree(); |
| 568 node = layer_tree_impl->property_trees()->effect_tree.Node( | 568 node = layer_tree_impl->property_trees()->effect_tree.Node( |
| 569 scrollbar_layer->effect_tree_index()); | 569 scrollbar_layer->effect_tree_index()); |
| 570 EXPECT_EQ(node->opacity, 0.f); | 570 EXPECT_EQ(node->opacity, 0.f); |
| 571 | 571 |
| 572 // This tests that activation does not change the opacity of scrollbar layer. | 572 // This tests that activation does not change the opacity of scrollbar layer. |
| 573 LayerImpl* scrollbar_layer_impl = | 573 LayerImpl* scrollbar_layer_impl = |
| 574 layer_tree_impl->LayerById(scrollbar_layer->id()); | 574 layer_tree_impl->LayerById(scrollbar_layer->id()); |
| 575 scrollbar_layer_impl->OnOpacityAnimated(0.25f); | 575 layer_tree_impl->property_trees()->effect_tree.OnOpacityAnimated( |
| 576 0.25f, scrollbar_layer_impl->effect_tree_index(), layer_tree_impl); |
| 576 host_impl->CreatePendingTree(); | 577 host_impl->CreatePendingTree(); |
| 577 layer_impl_tree_root = layer_tree_host_->CommitAndCreatePendingTree(); | 578 layer_impl_tree_root = layer_tree_host_->CommitAndCreatePendingTree(); |
| 578 layer_tree_impl = layer_impl_tree_root->layer_tree_impl(); | 579 layer_tree_impl = layer_impl_tree_root->layer_tree_impl(); |
| 579 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); | 580 EXPECT_TRUE(layer_tree_impl->IsPendingTree()); |
| 580 node = layer_tree_impl->property_trees()->effect_tree.Node( | 581 node = layer_tree_impl->property_trees()->effect_tree.Node( |
| 581 scrollbar_layer->effect_tree_index()); | 582 scrollbar_layer->effect_tree_index()); |
| 582 EXPECT_EQ(node->opacity, 0.f); | 583 EXPECT_EQ(node->opacity, 0.f); |
| 583 host_impl->ActivateSyncTree(); | 584 host_impl->ActivateSyncTree(); |
| 584 layer_tree_impl = host_impl->active_tree(); | 585 layer_tree_impl = host_impl->active_tree(); |
| 585 node = layer_tree_impl->property_trees()->effect_tree.Node( | 586 node = layer_tree_impl->property_trees()->effect_tree.Node( |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); | 1147 TestScale(gfx::Rect(1240, 0, 15, 1333), 2.7754839f); |
| 1147 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); | 1148 TestScale(gfx::Rect(1240, 0, 15, 677), 2.46677136f); |
| 1148 | 1149 |
| 1149 // Horizontal Scrollbars. | 1150 // Horizontal Scrollbars. |
| 1150 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); | 1151 TestScale(gfx::Rect(0, 1240, 1333, 15), 2.7754839f); |
| 1151 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); | 1152 TestScale(gfx::Rect(0, 1240, 677, 15), 2.46677136f); |
| 1152 } | 1153 } |
| 1153 | 1154 |
| 1154 } // namespace | 1155 } // namespace |
| 1155 } // namespace cc | 1156 } // namespace cc |
| OLD | NEW |