| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 DebugScopedSetImplThread impl(&proxy); | 562 DebugScopedSetImplThread impl(&proxy); |
| 563 FakeRenderingStatsInstrumentation stats_instrumentation; | 563 FakeRenderingStatsInstrumentation stats_instrumentation; |
| 564 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 564 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
| 565 new TestSharedBitmapManager()); | 565 new TestSharedBitmapManager()); |
| 566 scoped_ptr<LayerTreeHostImpl> host_impl = | 566 scoped_ptr<LayerTreeHostImpl> host_impl = |
| 567 LayerTreeHostImpl::Create(settings, | 567 LayerTreeHostImpl::Create(settings, |
| 568 NULL, | 568 NULL, |
| 569 &proxy, | 569 &proxy, |
| 570 &stats_instrumentation, | 570 &stats_instrumentation, |
| 571 shared_bitmap_manager.get(), | 571 shared_bitmap_manager.get(), |
| 572 NULL, |
| 572 0); | 573 0); |
| 573 | 574 |
| 574 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 575 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
| 575 host_->SetRootLayer(layer_tree_root); | 576 host_->SetRootLayer(layer_tree_root); |
| 576 | 577 |
| 577 layer_tree_root->SetLayerAnimationControllerForTest( | 578 layer_tree_root->SetLayerAnimationControllerForTest( |
| 578 FakeLayerAnimationController::Create()); | 579 FakeLayerAnimationController::Create()); |
| 579 | 580 |
| 580 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>( | 581 EXPECT_FALSE(static_cast<FakeLayerAnimationController*>( |
| 581 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); | 582 layer_tree_root->layer_animation_controller())->SynchronizedAnimations()); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 601 DebugScopedSetImplThread impl(&proxy); | 602 DebugScopedSetImplThread impl(&proxy); |
| 602 FakeRenderingStatsInstrumentation stats_instrumentation; | 603 FakeRenderingStatsInstrumentation stats_instrumentation; |
| 603 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 604 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
| 604 new TestSharedBitmapManager()); | 605 new TestSharedBitmapManager()); |
| 605 scoped_ptr<LayerTreeHostImpl> host_impl = | 606 scoped_ptr<LayerTreeHostImpl> host_impl = |
| 606 LayerTreeHostImpl::Create(settings, | 607 LayerTreeHostImpl::Create(settings, |
| 607 NULL, | 608 NULL, |
| 608 &proxy, | 609 &proxy, |
| 609 &stats_instrumentation, | 610 &stats_instrumentation, |
| 610 shared_bitmap_manager.get(), | 611 shared_bitmap_manager.get(), |
| 612 NULL, |
| 611 0); | 613 0); |
| 612 | 614 |
| 613 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 615 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
| 614 scoped_refptr<Layer> scroll_parent = Layer::Create(); | 616 scoped_refptr<Layer> scroll_parent = Layer::Create(); |
| 615 layer_tree_root->AddChild(scroll_parent); | 617 layer_tree_root->AddChild(scroll_parent); |
| 616 layer_tree_root->AddChild(Layer::Create()); | 618 layer_tree_root->AddChild(Layer::Create()); |
| 617 layer_tree_root->AddChild(Layer::Create()); | 619 layer_tree_root->AddChild(Layer::Create()); |
| 618 | 620 |
| 619 host_->SetRootLayer(layer_tree_root); | 621 host_->SetRootLayer(layer_tree_root); |
| 620 | 622 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 DebugScopedSetImplThread impl(&proxy); | 676 DebugScopedSetImplThread impl(&proxy); |
| 675 FakeRenderingStatsInstrumentation stats_instrumentation; | 677 FakeRenderingStatsInstrumentation stats_instrumentation; |
| 676 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 678 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
| 677 new TestSharedBitmapManager()); | 679 new TestSharedBitmapManager()); |
| 678 scoped_ptr<LayerTreeHostImpl> host_impl = | 680 scoped_ptr<LayerTreeHostImpl> host_impl = |
| 679 LayerTreeHostImpl::Create(settings, | 681 LayerTreeHostImpl::Create(settings, |
| 680 NULL, | 682 NULL, |
| 681 &proxy, | 683 &proxy, |
| 682 &stats_instrumentation, | 684 &stats_instrumentation, |
| 683 shared_bitmap_manager.get(), | 685 shared_bitmap_manager.get(), |
| 686 NULL, |
| 684 0); | 687 0); |
| 685 | 688 |
| 686 scoped_refptr<Layer> layer_tree_root = Layer::Create(); | 689 scoped_refptr<Layer> layer_tree_root = Layer::Create(); |
| 687 scoped_refptr<Layer> clip_parent = Layer::Create(); | 690 scoped_refptr<Layer> clip_parent = Layer::Create(); |
| 688 scoped_refptr<Layer> intervening = Layer::Create(); | 691 scoped_refptr<Layer> intervening = Layer::Create(); |
| 689 scoped_refptr<Layer> clip_child1 = Layer::Create(); | 692 scoped_refptr<Layer> clip_child1 = Layer::Create(); |
| 690 scoped_refptr<Layer> clip_child2 = Layer::Create(); | 693 scoped_refptr<Layer> clip_child2 = Layer::Create(); |
| 691 layer_tree_root->AddChild(clip_parent); | 694 layer_tree_root->AddChild(clip_parent); |
| 692 clip_parent->AddChild(intervening); | 695 clip_parent->AddChild(intervening); |
| 693 intervening->AddChild(clip_child1); | 696 intervening->AddChild(clip_child1); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 host_impl->active_tree()); | 754 host_impl->active_tree()); |
| 752 | 755 |
| 753 // The clip children should have been unhooked. | 756 // The clip children should have been unhooked. |
| 754 EXPECT_EQ(2u, intervening->children().size()); | 757 EXPECT_EQ(2u, intervening->children().size()); |
| 755 EXPECT_FALSE(clip_child2->clip_parent()); | 758 EXPECT_FALSE(clip_child2->clip_parent()); |
| 756 EXPECT_FALSE(additional_clip_child->clip_parent()); | 759 EXPECT_FALSE(additional_clip_child->clip_parent()); |
| 757 } | 760 } |
| 758 | 761 |
| 759 } // namespace | 762 } // namespace |
| 760 } // namespace cc | 763 } // namespace cc |
| OLD | NEW |