| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/tree_synchronizer.h" | 5 #include "cc/trees/tree_synchronizer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); | 498 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); |
| 499 scoped_refptr<Layer> scroll_layer = Layer::Create(); | 499 scoped_refptr<Layer> scroll_layer = Layer::Create(); |
| 500 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); | 500 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); |
| 501 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); | 501 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); |
| 502 | 502 |
| 503 layer_tree_root->AddChild(transient_scroll_clip_layer); | 503 layer_tree_root->AddChild(transient_scroll_clip_layer); |
| 504 transient_scroll_clip_layer->AddChild(transient_scroll_layer); | 504 transient_scroll_clip_layer->AddChild(transient_scroll_layer); |
| 505 transient_scroll_layer->AddChild(scroll_clip_layer); | 505 transient_scroll_layer->AddChild(scroll_clip_layer); |
| 506 scroll_clip_layer->AddChild(scroll_layer); | 506 scroll_clip_layer->AddChild(scroll_layer); |
| 507 | 507 |
| 508 ElementId scroll_element_id = ElementId(5, 4); | 508 ElementId scroll_element_id; |
| 509 scroll_element_id.id = 5; |
| 509 scroll_layer->SetElementId(scroll_element_id); | 510 scroll_layer->SetElementId(scroll_element_id); |
| 510 | 511 |
| 511 transient_scroll_layer->SetScrollClipLayerId( | 512 transient_scroll_layer->SetScrollClipLayerId( |
| 512 transient_scroll_clip_layer->id()); | 513 transient_scroll_clip_layer->id()); |
| 513 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); | 514 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); |
| 514 host_->SetRootLayer(layer_tree_root); | 515 host_->SetRootLayer(layer_tree_root); |
| 515 host_->BuildPropertyTreesForTesting(); | 516 host_->BuildPropertyTreesForTesting(); |
| 516 host_->CommitAndCreatePendingTree(); | 517 host_->CommitAndCreatePendingTree(); |
| 517 host_impl->ActivateSyncTree(); | 518 host_impl->ActivateSyncTree(); |
| 518 | 519 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 545 TestTaskGraphRunner task_graph_runner; | 546 TestTaskGraphRunner task_graph_runner; |
| 546 FakeLayerTreeHostImpl* host_impl = host_->host_impl(); | 547 FakeLayerTreeHostImpl* host_impl = host_->host_impl(); |
| 547 host_impl->CreatePendingTree(); | 548 host_impl->CreatePendingTree(); |
| 548 | 549 |
| 549 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 550 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
| 550 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); | 551 scoped_refptr<Layer> scroll_clip_layer = Layer::Create(); |
| 551 scoped_refptr<Layer> scroll_layer = Layer::Create(); | 552 scoped_refptr<Layer> scroll_layer = Layer::Create(); |
| 552 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); | 553 scoped_refptr<Layer> transient_scroll_clip_layer = Layer::Create(); |
| 553 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); | 554 scoped_refptr<Layer> transient_scroll_layer = Layer::Create(); |
| 554 | 555 |
| 555 ElementId scroll_element_id = ElementId(5, 4); | 556 ElementId scroll_element_id; |
| 557 scroll_element_id.id = 5; |
| 556 scroll_layer->SetElementId(scroll_element_id); | 558 scroll_layer->SetElementId(scroll_element_id); |
| 557 | 559 |
| 558 layer_tree_root->AddChild(transient_scroll_clip_layer); | 560 layer_tree_root->AddChild(transient_scroll_clip_layer); |
| 559 transient_scroll_clip_layer->AddChild(transient_scroll_layer); | 561 transient_scroll_clip_layer->AddChild(transient_scroll_layer); |
| 560 transient_scroll_layer->AddChild(scroll_clip_layer); | 562 transient_scroll_layer->AddChild(scroll_clip_layer); |
| 561 scroll_clip_layer->AddChild(scroll_layer); | 563 scroll_clip_layer->AddChild(scroll_layer); |
| 562 | 564 |
| 563 transient_scroll_layer->SetScrollClipLayerId( | 565 transient_scroll_layer->SetScrollClipLayerId( |
| 564 transient_scroll_clip_layer->id()); | 566 transient_scroll_clip_layer->id()); |
| 565 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); | 567 scroll_layer->SetScrollClipLayerId(scroll_clip_layer->id()); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 host_->CommitAndCreatePendingTree(); | 689 host_->CommitAndCreatePendingTree(); |
| 688 host_impl->ActivateSyncTree(); | 690 host_impl->ActivateSyncTree(); |
| 689 EXPECT_EQ( | 691 EXPECT_EQ( |
| 690 CombinedAnimationScale(0.f, 0.f), | 692 CombinedAnimationScale(0.f, 0.f), |
| 691 host_impl->active_tree()->property_trees()->GetAnimationScales( | 693 host_impl->active_tree()->property_trees()->GetAnimationScales( |
| 692 transform_layer->transform_tree_index(), host_impl->active_tree())); | 694 transform_layer->transform_tree_index(), host_impl->active_tree())); |
| 693 } | 695 } |
| 694 | 696 |
| 695 } // namespace | 697 } // namespace |
| 696 } // namespace cc | 698 } // namespace cc |
| OLD | NEW |